diff --git a/distribusi/distribusi/distribusi.py b/distribusi/distribusi/distribusi.py index 198e58d..ccc3f34 100644 --- a/distribusi/distribusi/distribusi.py +++ b/distribusi/distribusi/distribusi.py @@ -54,6 +54,9 @@ def thumbnail(image, name, args): print('Thumbnailer:', e) return "
{}
".format(name, name, name) +def folder(name, id): + html = '
'+name+'
' + return html.format(name) def div(args, type_, subtype, tag, name): id_name = name.split('.')[0].replace(' ', '_') @@ -191,13 +194,15 @@ def distribusify(args, directory): # noqa else: html.append('../') + i = 0; for name in dirs: if args.menu_with_index: a = "{}".replace('{}', name) else: a = "{}/".replace('{}', name) - html.insert(0, div(args, 'dir', 'dir', a, 'folder')) + html.insert(0, folder(name, 'folder-{}'.format(i))) + i = i + 1 index = os.path.join(root, 'index.html') if os.path.exists(index): diff --git a/distribusi/distribusi/page_template.py b/distribusi/distribusi/page_template.py index 24a1e93..1e67abc 100644 --- a/distribusi/distribusi/page_template.py +++ b/distribusi/distribusi/page_template.py @@ -15,6 +15,28 @@ html_head = """ video {width:640px;max-height:640px;} %s + """