Skip to content

Commit

Permalink
enable human readable sizes again/fix mobile design and add second so…
Browse files Browse the repository at this point in the history
…rting arrow

Co-Authored-By: David <[email protected]>
  • Loading branch information
Zoey2936 and DavidCraftDev committed Jun 10, 2024
1 parent 1326238 commit cd3b5d7
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
10 changes: 10 additions & 0 deletions rootfs/html/fancyindex/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "&nbsp;↑&nbsp;";
ascendingLink.href = links[0].href;
links[0].removeAttribute("href");
links[1].after(ascendingLink);
});
</script>
</body>
</html>
21 changes: 19 additions & 2 deletions rootfs/html/fancyindex/header.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<html>
<head>
<title>Directory index</title>
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
}
}
</style>
<div id="box">
Expand Down
2 changes: 1 addition & 1 deletion rootfs/usr/local/nginx/conf/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cd3b5d7

Please sign in to comment.