Seperate anchor tag and add <span id=.fid> tag

This commit is contained in:
Hyunchul Kim 2020-12-02 05:52:22 +09:00
parent fcba38fb45
commit 9714601c44

View file

@ -67,14 +67,14 @@ def div(args, type_, subtype, tag, name, id):
filename = '<span class="filename">{}</span>'.format(name) filename = '<span class="filename">{}</span>'.format(name)
if 'image' in type_: if 'image' in type_:
html = '<div id="{}" class="{}">{}</div>' html = '<div class="{}"><a class="anchor" id="{}"></a>{}<span class="fid">#{}</span></div>'
elif 'pdf' in subtype: elif 'pdf' in subtype:
html = '<div id="{}" class="{}">{}' + filename + '</div>' html = '<div class="{}"><a class="anchor" id="{}"></a>{}' + filename + '<span class="fid">#{}</span></div>'
elif 'dir' in type_ or 'html' in subtype or 'unkown-file' in subtype: elif 'dir' in type_ or 'html' in subtype or 'unkown-file' in subtype:
html = '<div id="{}" class="{}">{}</div>' html = '<div class="{}"><a class="anchor" id="{}"></a>{}<span class="fid">{}</span></div>'
else: else:
html = '<div id="{}" class="{}">{}' + filename + '</div>' html = '<div class="{}"><a class="anchor" id="{}"></a>{}' + filename + '<span class="fid">#{}</span></div>'
return html.format(id, subtype, tag) return html.format(subtype, id, tag, id)
def check_distribusi_index(args, index): def check_distribusi_index(args, index):