From cd3b5d7c6ad345861850d2d57a6454d67389740e Mon Sep 17 00:00:00 2001 From: Zoey Date: Sun, 9 Jun 2024 15:50:18 +0200 Subject: [PATCH] enable human readable sizes again/fix mobile design and add second sorting arrow Co-Authored-By: David --- rootfs/html/fancyindex/footer.html | 10 ++++++++++ rootfs/html/fancyindex/header.html | 21 +++++++++++++++++++-- rootfs/usr/local/nginx/conf/nginx.conf | 2 +- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/rootfs/html/fancyindex/footer.html b/rootfs/html/fancyindex/footer.html index 9944ab719..cae208f1a 100644 --- a/rootfs/html/fancyindex/footer.html +++ b/rootfs/html/fancyindex/footer.html @@ -25,6 +25,16 @@ tableDiv.id = "tableDiv"; tableDiv.appendChild(document.querySelector("table")); document.getElementById("search").after(tableDiv); + + var headers = document.querySelectorAll("th"); + headers.forEach((header) => { + var links = header.querySelectorAll("a"); + var ascendingLink = document.createElement("a"); + ascendingLink.textContent = " ↑ "; + ascendingLink.href = links[0].href; + links[0].removeAttribute("href"); + links[1].after(ascendingLink); + }); diff --git a/rootfs/html/fancyindex/header.html b/rootfs/html/fancyindex/header.html index c8e37cc41..8f944e348 100644 --- a/rootfs/html/fancyindex/header.html +++ b/rootfs/html/fancyindex/header.html @@ -1,4 +1,4 @@ - + Directory index @@ -109,6 +109,8 @@ border-bottom-width: 1px; border-bottom-style: solid; line-height: 2.5rem; + padding: 0.4rem; + overflow-wrap: break-word; } tr a { @@ -147,13 +149,28 @@ #box { padding-right: 1rem; padding-left: 1rem; - margin: 2rem; + margin: 0.5rem; + margin-top: 1.5rem; margin-bottom: 0rem; } th { padding-right: 0rem; } + + #search { + font-size: 16px; + margin-left: auto; + margin-right: auto; + } + + table { + font-size: medium; + } + + td { + max-width: 10rem; + } }
diff --git a/rootfs/usr/local/nginx/conf/nginx.conf b/rootfs/usr/local/nginx/conf/nginx.conf index eca4ac493..bdec1e012 100644 --- a/rootfs/usr/local/nginx/conf/nginx.conf +++ b/rootfs/usr/local/nginx/conf/nginx.conf @@ -100,7 +100,7 @@ http { fancyindex off; fancyindex_localtime on; fancyindex_show_path on; - fancyindex_exact_size on; + fancyindex_exact_size off; fancyindex_show_dotfiles off; fancyindex_hide_symlinks off; fancyindex_case_sensitive on;