Tabelle auf 10% von links, Besucherzahl auch bei schmalen Display dazu

This commit is contained in:
rxf
2025-07-27 12:53:35 +02:00
parent 7ad7b34aa9
commit 7300a46cb2
2 changed files with 11 additions and 5 deletions

View File

@@ -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;
}

View File

@@ -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 += `
<option value="${d.datum}" ${isselected} ${isFuehrung}> ${datstr} </option>`;
<option value="${d.datum}" ${isselected} ${isFuehrung}> ${datstr} ${count || 0}B</option>`;
} else {
select += `
<option value="${d.datum}" ${isselected} ${isFuehrung}> ${datstr} (${d.grp}) ${count || 0} Besucher</option>`;
<option value="${d.datum}" ${isselected} ${isFuehrung}> ${datstr} ${grpstr} ${count || 0} Besucher</option>`;
}
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') {