@@ -41,13 +41,15 @@ def main():
41
41
"<a class=\" my-auto text-blue-700\" href=\" ../\" >../</a></th><td>-</td><td>-</td></tr>" if dirname != "." else "" ,
42
42
]))
43
43
for subdirname in dirnames :
44
- f .write ("<tr class=\" w-1/4 bg-white border-b hover:bg-gray-50\" ><th scope=\" row\" class=\" py-2 px-2 lg:px-6 font-medium text-gray-900 whitespace-nowrap flex align-middle\" ><img style=\" max-width:23px; margin-right:5px\" src=\" " + get_icon_base64 ("o.folder" ) + "\" />" + "<a class=\" my-auto text-blue-700\" href=\" " + subdirname + "/\" >" +
45
- subdirname + "/</a></th><td>-</td><td>-</td></tr>\n " )
44
+ if subdirname [0 ] != '.' :
45
+ f .write ("<tr class=\" w-1/4 bg-white border-b hover:bg-gray-50\" ><th scope=\" row\" class=\" py-2 px-2 lg:px-6 font-medium text-gray-900 whitespace-nowrap flex align-middle\" ><img style=\" max-width:23px; margin-right:5px\" src=\" " + get_icon_base64 ("o.folder" ) + "\" />" + "<a class=\" my-auto text-blue-700\" href=\" " + subdirname + "/\" >" +
46
+ subdirname + "/</a></th><td>-</td><td>-</td></tr>\n " )
46
47
for filename in filenames :
47
- path = (dirname == '.' and filename or dirname +
48
- '/' + filename )
49
- f .write ("<tr class=\" w-1/4 bg-white border-b hover:bg-gray-50\" ><th scope=\" row\" class=\" py-2 px-2 lg:px-6 font-medium text-gray-900 whitespace-nowrap flex align-middle\" ><img style=\" max-width:23px; margin-right:5px\" src=\" " + get_icon_base64 (filename ) + "\" />" + "<a class=\" my-auto text-blue-700\" href=\" " + filename + "\" >" + filename + "</a></th><td>" +
50
- get_file_size (path ) + "</td><td>" + get_file_modified_time (path ) + "</td></tr>\n " )
48
+ if filename [0 ] != '.' :
49
+ path = (dirname == '.' and filename or dirname +
50
+ '/' + filename )
51
+ f .write ("<tr class=\" w-1/4 bg-white border-b hover:bg-gray-50\" ><th scope=\" row\" class=\" py-2 px-2 lg:px-6 font-medium text-gray-900 whitespace-nowrap flex align-middle\" ><img style=\" max-width:23px; margin-right:5px\" src=\" " + get_icon_base64 (filename ) + "\" />" + "<a class=\" my-auto text-blue-700\" href=\" " + filename + "\" >" + filename + "</a></th><td>" +
52
+ get_file_size (path ) + "</td><td>" + get_file_modified_time (path ) + "</td></tr>\n " )
51
53
52
54
f .write ("\n " .join ([
53
55
get_template_foot (),
@@ -85,6 +87,7 @@ def get_template_head(foldername):
85
87
with open ("/src/template/head.html" , "r" , encoding = "utf-8" ) as file :
86
88
head = file .read ()
87
89
head = head .replace ("{{foldername}}" , foldername )
90
+ head = head .replace ("{{nexticon}}" , get_icon_base64 ("icon.nt" ))
88
91
return head
89
92
90
93
0 commit comments