feat(calendar): compact variant for next-events teaser
Calendar block now supports variant: "default" | "compact". - default = full calendar (unchanged) - compact = next N events (default 3) + link to a target page New CalendarCompactBlock.svelte: small card with month/day badge, title, date/time/location line, "Alle kommenden Termine →" footer link resolved from the schema's linkTo reference. Filters to future events (12h tolerance for running ones). BlockRenderer dispatches by block.variant inside the calendar case. Schema (cms_content/_types/core/calendar.json5) adds variant + linkTo + limit fields. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -420,6 +420,12 @@ export type CalendarBlockData = Omit<
|
||||
/** Slugs oder aufgelöste calendar_item-Einträge. */
|
||||
items?: (string | CalendarItemData)[];
|
||||
layout?: BlockLayout;
|
||||
/** Variante: "default" voller Kalender, "compact" Anteaser. */
|
||||
variant?: "default" | "compact";
|
||||
/** Compact: Ziel-Page-Referenz hinter dem "Alle Termine"-Link. */
|
||||
linkTo?: string | { _slug?: string;[key: string]: unknown };
|
||||
/** Compact: Anzahl Termine (default 3). */
|
||||
limit?: number;
|
||||
};
|
||||
|
||||
/** Internal component block (_type: "internal_component"). */
|
||||
|
||||
Reference in New Issue
Block a user