Small changes

This commit is contained in:
relikd
2020-09-20 14:37:28 +02:00
parent 59321406ab
commit 825ed70658
4 changed files with 41 additions and 39 deletions

View File

@@ -45,17 +45,18 @@ def gen_pager(current, total):
def gen_page(arr, base, page_id=1, total=1):
title = 'Apps (AZ)'
path = mylib.path_add(base, str(page_id))
mylib.mkdir(path)
with open(mylib.path_add(path, 'index.html'), 'w') as fp:
content = ''.join([gen_entry(x) for x in arr])
pagination = gen_pager(page_id, total) # if total > 1 else ''
fp.write(mylib.template_with_base('''
<h2 class="center">Apps (AZ)</h2>
<div id="app-toc" class="center no_ul_all">
<h2 class="center">{}</h2>
<div id="app-toc" class="center no-ul-all">
{}
</div>
{}'''.format(content, pagination), title="Index"))
{}'''.format(title, content, pagination), title=title))
def process(per_page=60):

View File

@@ -25,7 +25,7 @@ def dropdown_choose(button):
<label for="dropdown">Choose list:</label>
<div class="dropdown" name="dropdown">
<button class="bg1 border">{button}</button>
<nav class="bg1 no_ul_all">
<nav class="bg1 no-ul-all">
<a href="index.html">Most frequent</a>
<a href="by_name.html">Full list (AZ)</a>
<a href="by_count.html">Full list (by count)</a>