From 9dd76ebd9e3dccb76d6fb492972e49b30b5e4d0d Mon Sep 17 00:00:00 2001 From: Richard Zink Date: Wed, 7 Oct 2026 14:22:02 +0200 Subject: [PATCH] Use lat/lon from CONFIG.location; hide debug panel when debug=0; remove street address --- config.js | 8 +++++++- index.html | 12 ++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/config.js b/config.js index 2eb3eae..39729a7 100644 --- a/config.js +++ b/config.js @@ -66,7 +66,13 @@ window.CONFIG = { theme: 'ash', units: 'metric', language: 'de', - timeFormat: 'DD. MMMM, YYYY \t HH:mm:SS' + timeFormat: 'DD. MMMM, YYYY ‒ HH:mm:SS', + location: { + // Latitude and longitude for sun/moon calculations + // Default: Passau, Germany + lat: 48.5667, + lon: 13.4319 + } }; // List of available themes. The key is the theme id (used in config.theme), diff --git a/index.html b/index.html index 07d078e..586c8ec 100644 --- a/index.html +++ b/index.html @@ -156,6 +156,9 @@ display: none; } } + #debug-panel.disabled { + display: none !important; + } #info-panel { position: fixed; top: 2vh; @@ -497,8 +500,8 @@ var effect = (VANTA.CLOUDS2 || VANTA.CLOUDS)({ var CYCLE = 20000; - var PASSAU_LAT = 48.5667; - var PASSAU_LON = 13.4319; + var PASSAU_LAT = (window.CONFIG && window.CONFIG.location && window.CONFIG.location.lat) || 48.5667; + var PASSAU_LON = (window.CONFIG && window.CONFIG.location && window.CONFIG.location.lon) || 13.4319; var realDayProgress = 0; @@ -1811,6 +1814,11 @@ window.weatherThemes = { // Update weather every 15 minutes applyI18n(); populateDebugSelects(); + // Apply debug flag from CONFIG + var debugEl = document.getElementById('debug-panel'); + if (debugEl && !(window.CONFIG && window.CONFIG.debug)) { + debugEl.style.display = 'none'; + } animate(); tick();