chore: checkpoint initial — Zektyc dataset, avant humanisation
- site vitrine + fingerprint test + zmap + z-panel - remplacement duckdns -> riricdev.tail5ea5cd.ts.net (canonical/og/alternates/docs) - suppression du token DuckDNS (plus utilisé)
This commit is contained in:
commit
8e7ec41f18
104 changed files with 19256 additions and 0 deletions
29
public/js/theme.js
Normal file
29
public/js/theme.js
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
(function () {
|
||||
var STORAGE_KEY = "zektyc-theme"
|
||||
var DEFAULT = "dark"
|
||||
|
||||
function getPreferred() {
|
||||
try {
|
||||
var stored = localStorage.getItem(STORAGE_KEY)
|
||||
if (stored === "light" || stored === "dark") return stored
|
||||
} catch (e) {}
|
||||
return DEFAULT
|
||||
}
|
||||
|
||||
function apply(theme) {
|
||||
document.documentElement.setAttribute("data-theme", theme)
|
||||
}
|
||||
|
||||
apply(getPreferred())
|
||||
|
||||
document.addEventListener("click", function (e) {
|
||||
var btn = e.target.closest ? e.target.closest(".theme-btn") : null
|
||||
if (!btn) return
|
||||
var current = document.documentElement.getAttribute("data-theme") || DEFAULT
|
||||
var next = current === "dark" ? "light" : "dark"
|
||||
apply(next)
|
||||
try {
|
||||
localStorage.setItem(STORAGE_KEY, next)
|
||||
} catch (e) {}
|
||||
})
|
||||
})();
|
||||
Loading…
Reference in a new issue