From 7300a46cb29415f468b0b6244940d9d27991d488 Mon Sep 17 00:00:00 2001 From: rxf Date: Sun, 27 Jul 2025 12:53:35 +0200 Subject: [PATCH] Tabelle auf 10% von links, Besucherzahl auch bei schmalen Display dazu --- sternwarte/intern/anmeld/css/anmeld.css | 3 ++- sternwarte/intern/anmeld/js/anmeld.js | 13 +++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/sternwarte/intern/anmeld/css/anmeld.css b/sternwarte/intern/anmeld/css/anmeld.css index 8aa04ed..f07c11a 100644 --- a/sternwarte/intern/anmeld/css/anmeld.css +++ b/sternwarte/intern/anmeld/css/anmeld.css @@ -33,7 +33,7 @@ h5 { font-size: 1rem; border: 1px solid #aaa; border-radius: 4px; - width: 55%; + width: 65%; max-width: 100%; box-sizing: border-box; background-color: #fff; @@ -67,6 +67,7 @@ h5 { } #tabAnmeld, #tnames { + margin-left: 10%; width: 100%; border-collapse: collapse; } diff --git a/sternwarte/intern/anmeld/js/anmeld.js b/sternwarte/intern/anmeld/js/anmeld.js index ff7aa78..8fbfb43 100644 --- a/sternwarte/intern/anmeld/js/anmeld.js +++ b/sternwarte/intern/anmeld/js/anmeld.js @@ -391,17 +391,20 @@ Beobachtergruppe Sternwarte Welzheim`, const count = await fetchFromDbase({cmd: 'GET_COUNTS', fdate: d.datum}); const isFuehrung = (count && count > 0) ? '' : 'disabled'; let datstr + let grpstr if (query.typ == 'regular') { datstr = bauDate(d.wtag, d.datum, d.uhrzeit) + grpstr = `(${d.grp})` } else { datstr = bauDate('So', d.datum, '11') + grpstr = " " } if (isSmallScreen) { select += ` - `; + `; } else { select += ` - `; + `; } i++; summ += count ? parseInt(count) : 0; @@ -423,6 +426,7 @@ Beobachtergruppe Sternwarte Welzheim`, } async function main(n) { + let index = 0 const today = moment().subtract(14, 'days').format("YYYYMMDD"); const dates = await fetchFromDbase({cmd:'GET_DATES', anzahl:n, date: today}); const last = await fetchFromDbase({cmd:'GET_LASTANMELDUNG', date: today}); @@ -430,13 +434,14 @@ Beobachtergruppe Sternwarte Welzheim`, let mq = window.matchMedia('(max-width: 800px)'); isSmallScreen = mq.matches switchText(); - mq.addEventListener('change', (e) => { + mq.addEventListener('change', async (e) => { isSmallScreen = e.matches switchText(); + await buildFuehrungsDates(dates, last); showAktAnmeldungen(actualdate); }); - const index = await buildFuehrungsDates(dates, last); + index = await buildFuehrungsDates(dates, last); await showAktAnmeldungen(dates[index].datum); if (query.name !== 'Null') {