spike(spa-mini): tag-dedup + cover-bild-größe begrenzen

- tagsAll() dedupliziert Werte (Schutz gegen Clients, die doppelte
  t-Tags ins Event schreiben; real beobachtet bei einem existierenden
  Post mit zweimal "relilab").
- Cover-Bild in der Einzelansicht auf max 480px Breite + zentriert,
  damit es nicht die gesamte Viewportbreite füllt.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jörg Lohrer 2026-04-15 14:29:57 +02:00
parent f070ea33c0
commit 865e429c5a
1 changed files with 11 additions and 2 deletions

View File

@ -123,10 +123,18 @@
word-wrap: break-word;
overflow-wrap: break-word;
}
article img {
article img,
#content > p > img {
max-width: 100%;
height: auto;
border-radius: 4px;
display: block;
margin: 0 auto;
}
/* Cover-Bild (direktes <p> als Sibling unter .meta) auf vernünftige Größe begrenzen */
#content > p:has(> img) {
max-width: 480px;
margin: 1rem auto 1.5rem;
}
article a {
color: var(--accent);
@ -250,7 +258,8 @@
}
function tagsAll(event, name) {
return event.tags.filter(t => t[0] === name).map(t => t[1]);
// Dedup, falls ein Client doppelte Tags geschrieben hat
return [...new Set(event.tags.filter(t => t[0] === name).map(t => t[1]))];
}
function fmtDate(unixSeconds) {