diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea926a6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +venv/ +kver.db +*.env +__pycache__/ +static/media/ diff --git a/static/js/main.js b/static/js/main.js index fda02e8..7e57cd3 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -1,3 +1,26 @@ $(() => { $('#auth-visible').hide() + + + // Startdatum festlegen (Beispiel: 1. Januar 2025, 00:00:00 Uhr) + const startDate = new Date('2025-12-13T12:44:00').getTime(); + + function updateCounter() { + const now = new Date().getTime(); + const diff = now - startDate; + + // Berechne Tage, Stunden, Minuten + const days = Math.floor(diff / (1000 * 60 * 60 * 24)); + const hours = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); + const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60)); + const seconds = Math.floor((diff % (1000 * 60)) / 1000); + + // Zeige den Counter an + $('#uptime-counter').html(`${days} Tage, ${hours} Stunden, ${minutes} Minuten und ${seconds} Sekunden ohne Datenverlust!`); + } + + // Aktualisiere den Counter sofort und dann jede Minute + updateCounter(); + setInterval(updateCounter, 1000); + }) diff --git a/templates/baseof.html b/templates/baseof.html index a4518ea..f842429 100644 --- a/templates/baseof.html +++ b/templates/baseof.html @@ -17,6 +17,9 @@ crossorigin="anonymous"> + +
Impressum @@ -25,6 +28,8 @@