From 7ea23531e91c4dbc84d84205c893e2eccb52846b Mon Sep 17 00:00:00 2001 From: Peter Meier Date: Tue, 12 May 2026 20:43:21 +0200 Subject: [PATCH] feat(calendar): grid color polish, month header layout, direct event links - month label left + larger, prev/next arrows grouped right - weekday headers colored (himmel/stein by weekday/weekend) - day cells colored by weekday/weekend + event state - event anchor IDs, onDestroy SSR fix, ImageModal component - copy link button, action buttons always show text Co-Authored-By: Claude Sonnet 4.6 --- .../components/blocks/CalendarBlock.svelte | 300 +++++++++++------- 1 file changed, 186 insertions(+), 114 deletions(-) diff --git a/src/lib/components/blocks/CalendarBlock.svelte b/src/lib/components/blocks/CalendarBlock.svelte index db712fd..f816b64 100644 --- a/src/lib/components/blocks/CalendarBlock.svelte +++ b/src/lib/components/blocks/CalendarBlock.svelte @@ -11,10 +11,7 @@ mapsUrl, type CalendarItemICS, } from "$lib/calendar-ics"; - import { - getCmsImageUrl, - extractCmsImageField, - } from "$lib/rusty-image"; + import { getCmsImageUrl, extractCmsImageField } from "$lib/rusty-image"; import "$lib/iconify-offline"; import Icon from "@iconify/svelte"; import ImageModal from "$lib/components/ImageModal.svelte"; @@ -432,9 +429,7 @@ const webcalUrl = $derived( feedHost ? `webcal://${feedHost}/api/kalender.ics` : "#", ); - const icsUrl = $derived( - feedHost ? `/api/kalender.ics` : "#", - ); + const icsUrl = $derived(feedHost ? `/api/kalender.ics` : "#"); const isApplePlatform = $derived( feedHost ? /iPhone|iPad|iPod|Macintosh/.test(navigator.userAgent) @@ -566,7 +561,10 @@ class="event-item {isNext ? 'event-item-next' : ''}" data-urgency={urgency} > -
+
@@ -716,12 +714,28 @@ {#if item.image} {@const imageField = extractCmsImageField(item.image)} {#if imageField} - {@const thumbSrc = getCmsImageUrl(imageField.url, { width: 160, height: 160, fit: "cover" })} - {@const fullSrc = getCmsImageUrl(imageField.url, { width: 1400, fit: "contain" })} - {@const imageAlt = imageField.alt ?? (typeof item.image === "object" && "description" in item.image ? (item.image.description ?? "") : "")} + {@const thumbSrc = getCmsImageUrl(imageField.url, { + width: 160, + height: 160, + fit: "cover", + })} + {@const fullSrc = getCmsImageUrl(imageField.url, { + width: 1400, + fit: "contain", + })} + {@const imageAlt = + imageField.alt ?? + (typeof item.image === "object" && + "description" in item.image + ? (item.image.description ?? "") + : "")} {/if} @@ -767,7 +787,9 @@ class="size-3.5 shrink-0" aria-hidden="true" /> - {t(T.calendar_open_maps)} + {t(T.calendar_open_maps)} {/if} {#if item.attachment?.src} @@ -775,10 +797,18 @@ - {/if} {#if feedHost} {@const shareKey = @@ -820,17 +854,22 @@ aria-label={t(T.post_action_copy)} >