Files
PyPost/html/base/index.html
2025-10-12 17:36:11 +02:00

68 lines
2.2 KiB
HTML

<!DOCTYPE html>
<html lang="en" style="height:100%;margin:0;">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Auto Index</title>
<!-- Preload + async load -->
<link rel="preload" as="style" href="/css/indexer.css" onload="this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="/css/indexer.css"></noscript>
<link rel="icon" href="/css/favicon/favicon.ico" type="image/x-icon">
<!-- Defer theme toggle -->
<script src="/js/shared/theme.js" defer></script>
<script>
document.addEventListener("DOMContentLoaded", () => {
// Create heading dynamically
const h = document.createElement("h1");
h.id = "nojs";
h.innerHTML = '<img src="/css/icons/folder.webp" width="40" height="40" alt="📁" loading="lazy" style="margin-right:8px;">Index of PyPost';
h.onclick = toggleDarkMode;
document.body.prepend(h);
console.log("JavaScript enabled — index enhanced!");
});
</script>
<!-- Register service worker -->
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/js/post/sw.js').catch(console.error);
}
</script>
</head>
<body>
<main style="flex:1;">
<noscript>
<div style="display:inline-flex;align-items:center;flex-wrap:wrap;">
<img src="/css/icons/script.webp" width="45" height="45" alt="Script icon" style="margin-right:8px;">
<h1 style="margin:0;">Please enable JavaScript!</h1>
</div>
<p>
<i><strong>If you might be wondering, what does the Script do?</strong></i><br>
<ul>
<li>Strips the .HTML ending from filenames</li>
<li>Enables search, sorting, and back navigation</li>
<li>Allows Markdown source downloads</li>
</ul>
</p>
</noscript>
<p id="available" style="display:flex;align-items:center;gap:8px;">
<img src="/css/icons/available.webp" width="40" height="40" alt="Available" loading="lazy">
<span>Available pages:</span>
</p>
<!-- CONTENT -->
<!-- Core scripts: async load -->
<script src="/js/normal.js" defer></script>
<script src="/js/search.js" defer></script>
<script src="/js/ulorder.js" defer></script>
</body>
</html>