From 02da0ff0fc067c0292a3bdfb71833559f479ce9b Mon Sep 17 00:00:00 2001 From: _ <> Date: Sun, 8 Nov 2020 17:58:14 +0000 Subject: [PATCH] :bug: Redirect to add trailing slashes for directories --- ptth_handlebars/file_server_dir.html | 39 +++-- ptth_handlebars/file_server_root.html | 4 +- src/bin/ptth_file_server.rs | 8 +- src/http_serde.rs | 30 +++- src/lib.rs | 8 +- src/server/file_server.rs | 198 ++++++++++++++++++++------ todo.md | 24 +++- 7 files changed, 238 insertions(+), 73 deletions(-) diff --git a/ptth_handlebars/file_server_dir.html b/ptth_handlebars/file_server_dir.html index 552fb24..4d4cdc0 100644 --- a/ptth_handlebars/file_server_dir.html +++ b/ptth_handlebars/file_server_dir.html @@ -9,10 +9,16 @@ .entry { display: inline-block; padding: 10px; - min-width: 50%; + width: 100%; text-decoration: none; } - .entry_list div:nth-child(odd) { + .grey { + color: #888; + } + .entry_list { + width: 100%; + } + .entry_list tr:nth-child(even) { background-color: #ddd; } @@ -24,21 +30,30 @@
{{path}}
-Name | +Size | +
---|---|
📁 ../ | ++ |
+{{this.icon}} {{this.file_name}}{{this.trailing_slash}} | +{{this.size}} | +