Skip to content

Commit

Permalink
new design for fancyindex by @DavidCraftDev
Browse files Browse the repository at this point in the history
Co-Authored-By: David <[email protected]>
  • Loading branch information
Zoey2936 and DavidCraftDev committed Jun 8, 2024
1 parent 22ab2db commit ed45b6c
Show file tree
Hide file tree
Showing 11 changed files with 197 additions and 7,920 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN apk upgrade --no-cache -a && \
echo "APPSEC_FAILURE_ACTION=deny" | tee -a /src/crowdsec-nginx-bouncer/lua-mod/config_example.conf && \
sed -i "s|BOUNCING_ON_TYPE=all|BOUNCING_ON_TYPE=ban|g" /src/crowdsec-nginx-bouncer/lua-mod/config_example.conf

FROM zoeyvid/nginx-quic:288
FROM zoeyvid/nginx-quic:290
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]

ARG CRS_VER=v4.3.0
Expand Down
30 changes: 30 additions & 0 deletions rootfs/app/fancyindex/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
</div>
<p id="notice">Powered by <a href="https://github.com/ZoeyVid/NPMplus">NPMplus</a></p>
<script>
var input = document.createElement("input");
input.id = "search";
input.type = "text";
input.placeholder = "Search here...";
document.querySelector("h1").after(input);
var items = [].slice.call(document.querySelectorAll("#list tbody tr"));
function filterItems(item, filter) {
return !item.querySelector("td").textContent.trim().includes(filter);
}
input.addEventListener("keyup", function () {
items.forEach((item) => {
item.hidden = false;
});
items
.filter((item) => filterItems(item, this.value.trim()))
.forEach((item) => {
item.hidden = true;
});
});

var tableDiv = document.createElement("div");
tableDiv.id = "tableDiv";
tableDiv.appendChild(document.querySelector("table"));
document.getElementById("search").after(tableDiv);
</script>
</body>
</html>
160 changes: 160 additions & 0 deletions rootfs/app/fancyindex/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
<!doctype html>
<html>
<head>
<title>Directory index</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="application-name" content="NPMplus" />
<meta name="author" content="ZoeyVid" />
<meta name="description" content="Directory index of NPMplus" />
<meta name="keywords" content="NPMplus, default" />
<!-- TODO: Icon -->
<link rel="icon" type="image/webp" href="/fancyindex/favicon.webp" />
</head>
<body>
<style>
@media (prefers-color-scheme: dark) {
body {
background-color: rgb(17 24 39);
color: white;
}

#box {
background-color: rgb(31 41 55);
}

tr a {
color: white;
}

td,
th {
border-bottom-color: white;
}

#search {
border-bottom: 2px solid white !important;
color: white;
}
}

@media (prefers-color-scheme: light) {
body {
background-color: white;
color: black;
}

#box {
background-color: rgb(229 231 235);
}

tr a {
color: black;
}

td,
th {
border-bottom-color: black;
}

#search {
border-bottom: 2px solid black !important;
color: black;
}
}

body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
text-align: center;
}

#box {
border-radius: 2rem;
padding: 1rem;
margin: 8rem;
margin-top: 10vh;
margin-bottom: 0rem;
}

#tableDiv {
overflow-x: auto;
margin-bottom: 3rem;
}

h1 {
font-size: 48px;
}

p {
font-size: 24px;
}

#notice {
font-size: 12px;
text-align: center;
bottom: 0;
}

table {
max-width: max-content;
margin-left: auto;
margin-right: auto;
border-collapse: collapse;
text-align: left;
font-size: large;
}

td,
th {
border-bottom-width: 1px;
border-bottom-style: solid;
line-height: 2.5rem;
}

tr a {
text-decoration: none;
}

tr a:hover {
text-decoration: underline;
}

th a {
font-weight: bold;
}

th {
padding-right: 10rem;
}

#search {
margin-bottom: 2rem;
background-color: transparent;
border: none;
outline: none;
font-size: 24px;
}

@media (max-width: 600px) {
h1 {
font-size: 32px;
}

p {
font-size: 16px;
}

#box {
padding-right: 1rem;
padding-left: 1rem;
margin: 2rem;
margin-bottom: 0rem;
}

th {
padding-right: 0rem;
}
}
</style>
<div id="box">
<h1>Directory:
33 changes: 0 additions & 33 deletions rootfs/app/nftd/addNginxFancyIndexForm.js

This file was deleted.

14 changes: 0 additions & 14 deletions rootfs/app/nftd/footer.html

This file was deleted.

18 changes: 0 additions & 18 deletions rootfs/app/nftd/header.html

This file was deleted.

2 changes: 0 additions & 2 deletions rootfs/app/nftd/jquery.min.js

This file was deleted.

3 changes: 0 additions & 3 deletions rootfs/app/nftd/showdown.min.js

This file was deleted.

Loading

0 comments on commit ed45b6c

Please sign in to comment.