From 436ddf6f23242eb709b591cd5e9cbf1553f8d390 Mon Sep 17 00:00:00 2001 From: Joris Date: Mon, 20 May 2024 09:40:11 +0200 Subject: Allow to upload file and download from given link --- src/templates.py | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 src/templates.py (limited to 'src/templates.py') diff --git a/src/templates.py b/src/templates.py new file mode 100644 index 0000000..1308fc0 --- /dev/null +++ b/src/templates.py @@ -0,0 +1,97 @@ +import html + +page: str = ''' + + + + + + Files + + + + +

Files

+
+''' + +index: str = f''' + {page} + +
+ + + + + + +
+
+ Uploading… +
+ +
+
+ + +
+''' + +def download(href: str, filename: str, expires: str) -> str: + return f''' + {page} + +
+ {html.escape(filename)} +
+ Expires: {html.escape(expires)} +
+
+ ''' + +not_found: str = f''' + {page} + + Sorry, the file you are looking for can not be found. It may have already expired. +''' -- cgit v1.2.3