Remove location information

This commit is contained in:
Adam Hopkins 2023-01-24 10:48:54 +02:00
parent 6673acf544
commit fed2ef3527
No known key found for this signature in database
GPG Key ID: 9F85EE6C807303FB

View File

@ -349,7 +349,6 @@ async def file_stream(
class AutoIndex: class AutoIndex:
INDEX_STYLE = """ INDEX_STYLE = """
html { font-family: sans-serif } html { font-family: sans-serif }
h2 { color: #888; }
ul { padding: 0; list-style: none; } ul { padding: 0; list-style: none; }
li { li {
display: flex; justify-content: space-between; display: flex; justify-content: space-between;
@ -361,10 +360,9 @@ class AutoIndex:
""" """
OUTPUT_HTML = ( OUTPUT_HTML = (
"<!DOCTYPE html><html lang=en>" "<!DOCTYPE html><html lang=en>"
"<meta charset=UTF-8><title>{title} - {location}</title>\n" "<meta charset=UTF-8><title>{title}</title>\n"
"<style>{style}</style>\n" "<style>{style}</style>\n"
"<h1>{title}</h1>\n" "<h1>{title}</h1>\n"
"<h2>{location}</h2>\n"
"{body}" "{body}"
) )
FILE_WRAPPER_HTML = "<ul>{first_line}{files}</ul>" FILE_WRAPPER_HTML = "<ul>{first_line}{files}</ul>"
@ -396,7 +394,6 @@ class AutoIndex:
self.OUTPUT_HTML.format( self.OUTPUT_HTML.format(
title="📁 File browser", title="📁 File browser",
style=self.INDEX_STYLE, style=self.INDEX_STYLE,
location=self.directory.absolute(),
body=self._list_files(), body=self._list_files(),
) )
) )