aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/templates
diff options
context:
space:
mode:
authorHsiangNianian <i@jyunko.cn>2024-08-16 15:23:07 +0800
committerHsiangNianian <i@jyunko.cn>2024-08-16 15:23:07 +0800
commitee281cb6ef11b8e115e02032a7c899927d2e92e5 (patch)
treeec83b3b57920b181c6c988bc6901a3730f725506 /templates
parent0817897398dd3ef7f0738838b20cc6c1e67db323 (diff)
downloadfiles-ee281cb6ef11b8e115e02032a7c899927d2e92e5.tar.gz
files-ee281cb6ef11b8e115e02032a7c899927d2e92e5.zip
chore: init project
Diffstat (limited to 'templates')
-rw-r--r--templates/file_info.html25
-rw-r--r--templates/files.html17
-rw-r--r--templates/index.html0
-rw-r--r--templates/login.html19
-rw-r--r--templates/upload.html16
5 files changed, 77 insertions, 0 deletions
diff --git a/templates/file_info.html b/templates/file_info.html
new file mode 100644
index 0000000..9e88c64
--- /dev/null
+++ b/templates/file_info.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>File Info</title>
+</head>
+<body>
+ <h1>File Info: {{ filename }}</h1>
+ {% if file_type == 'image' %}
+ <img src="{{ url_for('download_file', filename=filename) }}" alt="{{ filename }}">
+ {% elif file_type == 'text' %}
+ <iframe src="{{ url_for('download_file', filename=filename) }}" width="100%" height="600px"></iframe>
+ {% elif file_type == 'zip' %}
+ <h2>Contents of {{ filename }}:</h2>
+ <ul>
+ {% for item in zip_contents %}
+ <li>{{ item }}</li>
+ {% endfor %}
+ </ul>
+ {% else %}
+ <p>Cannot display this file type.</p>
+ {% endif %}
+ <a href="{{ url_for('uploaded_files') }}">Back to files</a>
+</body>
+</html> \ No newline at end of file
diff --git a/templates/files.html b/templates/files.html
new file mode 100644
index 0000000..5095242
--- /dev/null
+++ b/templates/files.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>Uploaded Files</title>
+</head>
+<body>
+ <h1>Uploaded Files</h1>
+ <ul>
+ {% for file in files %}
+ <li><a href="{{ url_for('file_info', filename=file) }}">{{ file }}</a></li>
+ {% endfor %}
+ </ul>
+ <a href="{{ url_for('upload_file') }}">Upload More Files</a>
+ <a href="{{ url_for('logout') }}">Logout</a>
+</body>
+</html> \ No newline at end of file
diff --git a/templates/index.html b/templates/index.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/templates/index.html
diff --git a/templates/login.html b/templates/login.html
new file mode 100644
index 0000000..e0c5d68
--- /dev/null
+++ b/templates/login.html
@@ -0,0 +1,19 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>Login</title>
+</head>
+<body>
+ <h1>Login</h1>
+ <form method="post">
+ <label for="username">Username:</label>
+ <input type="text" id="username" name="username" required>
+ <br>
+ <label for="password">Password:</label>
+ <input type="password" id="password" name="password" required>
+ <br>
+ <button type="submit">Login</button>
+ </form>
+</body>
+</html> \ No newline at end of file
diff --git a/templates/upload.html b/templates/upload.html
new file mode 100644
index 0000000..e024330
--- /dev/null
+++ b/templates/upload.html
@@ -0,0 +1,16 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>Upload File</title>
+</head>
+<body>
+ <h1>Upload File</h1>
+ <form method="post" enctype="multipart/form-data">
+ <input type="file" name="file" required>
+ <button type="submit">Upload</button>
+ </form>
+ <a href="{{ url_for('uploaded_files') }}">View Uploaded Files</a>
+ <a href="{{ url_for('logout') }}">Logout</a>
+</body>
+</html> \ No newline at end of file