aboutsummaryrefslogtreecommitdiff
path: root/src/templates.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates.py')
-rw-r--r--src/templates.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/templates.py b/src/templates.py
index c605e57..8125f69 100644
--- a/src/templates.py
+++ b/src/templates.py
@@ -8,15 +8,15 @@ page: str = '''
<meta name="viewport" content="width=device-width">
<title>Files</title>
- <link rel="stylesheet" href="/main.css">
- <script src="/main.js"></script>
+ <link rel="stylesheet" href="/static/main.css">
+ <script src="/static/main.js"></script>
<a href="/">
<h1>Files</h1>
</a>
'''
-index: str = f'''
+pub index: str = f'''
{page}
<form>
@@ -79,8 +79,14 @@ index: str = f'''
</form>
'''
-def download(href: str, filename: str, expires: str) -> str:
+def file_page(file_id: str, filename: str, expires: str) -> str:
+ href = f'{file_id}/download'
expires_in = datetime.datetime.strptime(expires, '%Y-%m-%d %H:%M:%S') - datetime.datetime.now()
+
+ print()
+ print(href)
+ print()
+
return f'''
{page}