added details and pop-up to event calendar
All checks were successful
publish / publish (push) Successful in 26s

This commit is contained in:
Jannik Menzel 2025-06-20 17:26:03 +02:00
parent e905c11f70
commit 2264cd53b5
7 changed files with 234 additions and 146 deletions

View file

@ -0,0 +1,38 @@
<!-- Darkmode JS -->
<script>
(function () {
try {
const stored = localStorage.getItem("theme");
const systemPrefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
const isDark = stored ? stored === "dark" : systemPrefersDark;
if (isDark) {
document.documentElement.classList.add("dark");
}
} catch (e) {
// ignore errors
}
})();
</script>
<!-- Localization Auto Redirect -->
{{ if .IsHome }}
<script>
const cachedLang = localStorage.getItem("language");
const path = window.location.pathname;
if (cachedLang) {
if (cachedLang === "de" && path !== "/") {
window.location.href = "/";
} else if (cachedLang === "en" && path !== "/en/") {
window.location.href = "/en/";
}
} else {
const lang = navigator.language;
if (lang.startsWith("de")) {
localStorage.setItem("language", "de");
} else {
localStorage.setItem("language", "en");
}
}
</script>
{{ end }}