83 lines
2.1 KiB
HTML
83 lines
2.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
|
<meta name="viewport" content="width=device-width">
|
|
<style type="text/css">
|
|
@font-face{
|
|
font-family:'JetBrains Mono';
|
|
src:url('/fancyindex/JetBrainsMono-Bold.ttf') format('truetype');
|
|
font-weight:bold;
|
|
font-display:swap;
|
|
}
|
|
body,html {
|
|
background: #222 url(/fancyindex/background.jpg) center/cover fixed;
|
|
color:white;
|
|
font:16px 'JetBrains Mono',monospace;
|
|
}
|
|
.size,
|
|
.date {
|
|
text-shadow: 0 0 0.5rem black;
|
|
}
|
|
th {
|
|
text-align: left;
|
|
font-weight: bold;
|
|
background-color: rgba(34, 34, 34, 0.4);
|
|
border-bottom: 1px solid rgba(34, 34, 34, 0.4);
|
|
padding: 0.1em 0.5em;
|
|
}
|
|
td {
|
|
padding: 0.1em 0.5em;
|
|
background-color: rgba(34, 34, 34, 0.4);
|
|
}
|
|
|
|
h1 {
|
|
text-shadow: 0 0 0 black;
|
|
}
|
|
#list {border:1px solid #222;width:100%;}
|
|
a {color:white; text-decoration: none; filter: drop-shadow(0 0 0.4rem black);}
|
|
a:hover {color:whitesmoke; text-decoration: underline; filter: drop-shadow(0 0 0.4rem black);}
|
|
</style>
|
|
<title>QwQ</title>
|
|
</head>
|
|
<body>
|
|
<h1 style="text-align: center;" id="folder-name"></h1>
|
|
|
|
<script>
|
|
var ready = (callback) => {
|
|
if (document.readyState != "loading") callback();
|
|
else document.addEventListener("DOMContentLoaded", callback);
|
|
}
|
|
|
|
ready(() => {
|
|
document.body.childNodes.forEach((e) => {
|
|
if (e.nodeType == Node.TEXT_NODE && e.textContent.trim() !== "")
|
|
e.remove();
|
|
});
|
|
|
|
const path = window.location.pathname;
|
|
const segments = path.split('/').filter(Boolean);
|
|
const container = document.getElementById('folder-name');
|
|
container.innerHTML = "";
|
|
|
|
let homeLink = document.createElement("a");
|
|
homeLink.href = "/";
|
|
homeLink.textContent = "🏠";
|
|
container.appendChild(homeLink);
|
|
|
|
let currentPath = "";
|
|
segments.forEach((seg, i) => {
|
|
currentPath += "/" + seg;
|
|
|
|
let sep = document.createTextNode(" -> ");
|
|
container.appendChild(sep);
|
|
|
|
let link = document.createElement("a");
|
|
link.href = currentPath + "/";
|
|
link.textContent = seg;
|
|
container.appendChild(link);
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|