diff options
| author | mg | 2023-04-26 19:51:53 +0200 |
|---|---|---|
| committer | mg | 2023-04-26 19:51:53 +0200 |
| commit | 47ab99f89149352a94ebcebd034d034048881812 (patch) | |
| tree | ab7f9be34f82ac18401a385c722fe1b14fc7bbf7 /templates/file_list.html | |
| parent | 288816341e60d81203effc5952a746dd10455247 (diff) | |
add web-ui (#2)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: https://git.mgrote.net/mg/python-api-server/pulls/2
Diffstat (limited to 'templates/file_list.html')
| -rw-r--r-- | templates/file_list.html | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/templates/file_list.html b/templates/file_list.html new file mode 100644 index 0000000..bfb8f2c --- /dev/null +++ b/templates/file_list.html @@ -0,0 +1,48 @@ +<!doctype html> +<html> +<head> + <title>File List</title> + <style> + table { + border-collapse: collapse; + width: 100%; + } + + th, td { + text-align: left; + padding: 8px; + border-bottom: 1px solid #ddd; + } + + tr:hover { + background-color: #f5f5f5; + } + + th { + background-color: #4CAF50; + color: white; + } + </style> +</head> +<body> + <h1>File List</h1> + <table> + <thead> + <tr> + <th>Name</th> + <th>Size (KB)</th> + <th>Last Modified</th> + </tr> + </thead> + <tbody> + {% for file in files %} + <tr> + <td><a href="{{ url_for('download_file', filename=file.name) }}">{{ file.name }}</a> + <td>{{ '%.2f' % (file.size / 1024) }} KB</td> + <td>{{ file.last_modified }}</td> + </tr> + {% endfor %} + </tbody> + </table> +</body> +</html> |