better align clock and logo; made clock more dynamic
This commit is contained in:
1 parent
7330e296e4
commit
c82600632b
3 files changed
+24
-9
No files matched your search
@@ -17,7 +17,7 @@
|
||||
<aside class="sidebar">
|
||||
<div class="top">
|
||||
<div class="date" id="date"></div>
|
||||
<div class="logo"><img src="/static/Logo.svg" alt="Filmhuis Den Haag" style="width: 100%; height: auto; filter: invert(1);"></div>
|
||||
<div class="logo"><img src="/static/Logo.svg" alt="Filmhuis Den Haag"></div>
|
||||
</div>
|
||||
<h2>Prijzen</h2>
|
||||
<div id="prijzen"></div>
|
||||
|
||||
@@ -51,7 +51,7 @@ function renderClock() {
|
||||
const d = new Date();
|
||||
const hh = String(d.getHours()).padStart(2, "0");
|
||||
const mm = String(d.getMinutes()).padStart(2, "0");
|
||||
document.getElementById("date").textContent = `${hh} ${mm}`;
|
||||
document.getElementById("date").innerHTML = `${hh}<span class="colon">:</span>${mm}`;
|
||||
}
|
||||
|
||||
async function refresh() {
|
||||
@@ -68,6 +68,7 @@ async function refresh() {
|
||||
}
|
||||
|
||||
renderClock();
|
||||
setInterval(renderClock, 1_000); // every second: updates minutes + blinks the colon
|
||||
refresh(); // initial paint
|
||||
setInterval(refresh, POLL_MS); // poll every 5 minutes
|
||||
setInterval(renderClock, 30_000); // keep the clock accurate
|
||||
@@ -14,7 +14,7 @@ body {
|
||||
color: var(--ink);
|
||||
overflow: hidden;
|
||||
}
|
||||
.screen { display: grid; grid-template-columns: 1fr 340px; height: 100vh; }
|
||||
.screen { display: grid; grid-template-columns: 1fr 420px; height: 100vh; }
|
||||
|
||||
/* ---------- left: film list ---------- */
|
||||
.programme { padding: 28px 40px 40px 48px; display: flex; flex-direction: column; }
|
||||
@@ -79,17 +79,31 @@ body {
|
||||
.sidebar .top {
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr;
|
||||
align-items: baseline;
|
||||
gap: 20px;
|
||||
align-items: start;
|
||||
gap: 24px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.sidebar .date {
|
||||
font-size: 56px; font-weight: 600;
|
||||
font-variant-numeric: tabular-nums;
|
||||
font-size: 56px;
|
||||
font-weight: 600;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.sidebar .logo { font-size: 13px; font-weight: 600; letter-spacing: 1px; text-align: right; line-height: 1.3; text-transform: uppercase; }
|
||||
.sidebar .date .colon {
|
||||
animation: blink 1s steps(1) infinite;
|
||||
}
|
||||
@keyframes blink {
|
||||
50% { opacity: 0; }
|
||||
}
|
||||
.sidebar .logo {
|
||||
filter: invert(1);
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding-top: 4px;
|
||||
}
|
||||
.sidebar .logo img {
|
||||
height: 46px;
|
||||
width: auto;
|
||||
}
|
||||
.sidebar h2 { margin-top: 56px; font-size: 20px; font-weight: 600; margin-bottom: 14px; }
|
||||
.price-row { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 9px; font-size: 17px; }
|
||||
.price-row .price { white-space: nowrap; }
|
||||
|
||||
Reference in new issue
Block a user