From 1815c2ebfebb361910d8de6693f08222f6ca1d34 Mon Sep 17 00:00:00 2001 From: fingadumbledore Date: Sun, 22 Oct 2023 14:05:30 +0200 Subject: [PATCH] =?UTF-8?q?ein=20paar=20weitere=20=C3=A4nderungen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- party/static/css/session.css | 208 ++++++++++++++++++++++++++++++++++- party/static/js/session.js | 34 ++++++ party/templates/session.html | 39 +++++-- 3 files changed, 271 insertions(+), 10 deletions(-) diff --git a/party/static/css/session.css b/party/static/css/session.css index 3d3ce84..f1756e7 100644 --- a/party/static/css/session.css +++ b/party/static/css/session.css @@ -52,6 +52,14 @@ p { } +.uhrzeit { + position: fixed; + top: 0; + left: 15%; + color: rgb(220, 220, 210); + font-size: 100%; +} + /*Systeminformationen im Balken*/ .cpuinfo { position: fixed; @@ -486,5 +494,203 @@ margin-right: auto; .button-wrapper:last-child { margin-left: 5%; } + + + .hidden1 { + display: none; +} - \ No newline at end of file + +#punkte_button{ + background-color: #454443; + position: fixed; + width: 10%; + height: 5%; + border-radius: 10px; + cursor: pointer; + background-position: center; + background-repeat: no-repeat; + background-size: 60%; + border: none; + padding: 10px; + color: white; + font-size: 16px; + bottom: 10%; + top: 15%; + right: 58%; +} +#zeit_button{ + background-color: #454443; + position: fixed; + width: 10%; + height: 5%; + border-radius: 10px; + cursor: pointer; + background-position: center; + background-repeat: no-repeat; + background-size: 60%; + border: none; + padding: 10px; + color: white; + font-size: 16px; + bottom: 10%; + top: 15%; + right: 45%; +} +#team_button{ + background-color: #454443; + position: fixed; + width: 10%; + height: 5%; + border-radius: 10px; + cursor: pointer; + background-position: center; + background-repeat: no-repeat; + background-size: 60%; + border: none; + padding: 10px; + color: white; + font-size: 16px; + bottom: 10%; + top: 15%; + right: 33%; +} + +#next { + position: fixed; + top: 15%; + left: 55%; + width: 70px; + height: 30px; + padding: 30px; + background-color: #454443; + border-radius: 10px; + background-position: center; + background-repeat: no-repeat; + background-size: 40%; + background-image: url('/static/icons/next.png'); +} + #back { + position: fixed; + top: 15%; + left: 35%; + width: 70px; + height: 30px; + padding: 30px; + background-color: #454443; + border-radius: 10px; + background-position: center; + background-repeat: no-repeat; + background-size: 30%; + background-image: url('/static/icons/back.png'); +} + #play{ + position: fixed; + top: 15%; + left: 45%; + width: 70px; + height: 30px; + padding: 30px; + background-color: #454443; + border-radius: 10px; + background-position: center; + background-repeat: no-repeat; + background-size: 60%; + background-image: url('/static/icons/play.png'); +} + +#mate_reset{ + background-color: #454443; + position: fixed; + width: 10%; + height: 5%; + border-radius: 10px; + cursor: pointer; + background-position: center; + background-repeat: no-repeat; + background-size: 60%; + border: none; + padding: 10px; + color: white; + font-size: 16px; + bottom: 10%; + top: 15%; + right: 45%; + +} + +#mate_hinzu{ + background-color: #454443; + position: fixed; + width: 20%; + height: 5%; + border-radius: 10px; + cursor: pointer; + background-position: center; + background-repeat: no-repeat; + background-size: 60%; + border: none; + padding: 10px; + color: white; + font-size: 16px; + bottom: 10%; + top: 25%; + right: 41%; + +} + +#save_settings{ + position: fixed; + width: 10%; + height: 5%; + background-color: #0f9225; + border-radius: 10px; + cursor: pointer; + background-position: center; + background-repeat: no-repeat; + background-size: 60%; + border: none; + padding: 10px; + color: white; + font-size: 16px; + bottom: 10%; + top: 90%; + right: 32%; +} + +#abort_settings{ + position: fixed; + width: 10%; + height: 5%; + background-color: #af0a0a; + border-radius: 10px; + cursor: pointer; + background-position: center; + background-repeat: no-repeat; + background-size: 60%; + border: none; + padding: 10px; + color: white; + font-size: 16px; + bottom: 10%; + top: 90%; + right: 43%; +} +#reset_settings{ + position: fixed; + width: 10%; + height: 5%; + background-color: #454443; + border-radius: 10px; + cursor: pointer; + background-position: center; + background-repeat: no-repeat; + background-size: 60%; + border: none; + padding: 10px; + color: white; + font-size: 16px; + bottom: 10%; + top: 90%; + right: 54%; +} \ No newline at end of file diff --git a/party/static/js/session.js b/party/static/js/session.js index cefae2f..5280f7c 100644 --- a/party/static/js/session.js +++ b/party/static/js/session.js @@ -74,3 +74,37 @@ function handleSwitchDiv(index) { function skipSong() {} function lastSong() {} function pausePlaySong() {} + + +function updateClock() { + var now = new Date(); + var hours = now.getHours(); + var minutes = now.getMinutes(); + + // Führende Nullen hinzufügen, wenn die Stunden oder Minuten einstellig sind + if (hours < 10) { + hours = "0" + hours; + } + if (minutes < 10) { + minutes = "0" + minutes; + } + + var timeString = hours + ":" + minutes; + + document.getElementById("uhrzeit").innerHTML = timeString; +} + +setInterval(updateClock, 1000); + +function showDiv(divId) { + const divToShow = document.getElementById(divId); + const divs = document.querySelectorAll('div'); + + for (const div of divs) { + div.classList.add('hidden'); + } + + divToShow.classList.remove('hidden'); +} + + diff --git a/party/templates/session.html b/party/templates/session.html index 2bed0d9..7b75beb 100644 --- a/party/templates/session.html +++ b/party/templates/session.html @@ -24,6 +24,8 @@

%

+

+

Nächstes Event:

Peter

@@ -84,11 +86,11 @@

Games

- - - + + + -