feat: serve styled mirror directories with nginx fancyindex

This commit is contained in:
2026-11-01 20:37:13 +08:00
parent 706ed6faf1
commit d3a5e99e8a
18 changed files with 597 additions and 14 deletions
+7
View File
@@ -0,0 +1,7 @@
// Run before the stylesheet so the directory shares the main site's preference.
try {
var preference = localStorage.getItem('mirrorouc.theme');
document.documentElement.dataset.theme = preference === 'dark' || (preference !== 'light' && matchMedia('(prefers-color-scheme: dark)').matches) ? 'dark' : 'light';
} catch (_) {
document.documentElement.dataset.theme = matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
}