From 9d58c92e94de6389c7780480fbfb660876f48d7c Mon Sep 17 00:00:00 2001 From: Peter Meier Date: Tue, 19 May 2026 14:32:42 +0200 Subject: [PATCH] ui: card-surface utility, rounded corners, calendar polish, banner layout - Add .card-surface utility (@layer components): rounded-sm border shadow-sm - Card.svelte, CalendarBlock, SearchableTextBlock, BlogOverview use card-surface - OrganisationsBlock: logo h-12 rounded-sm, description style cleanup, pt-1 for hover clip fix - DeadlineBanner: container-custom width constraint, text left-aligned - WindAreaPanel stats: card-surface - CalendarBlock: rounded-sm day headers, past days opacity-20 + diagonal strike - Add .day-past pseudo-element utility for diagonal line Co-Authored-By: Claude Sonnet 4.6 --- src/app.css | 26 +++++++++++++++++++ src/lib/components/BlogOverview.svelte | 2 +- src/lib/components/Card.svelte | 11 +++----- .../components/blocks/CalendarBlock.svelte | 6 +++-- .../blocks/DeadlineBannerBlock.svelte | 9 ++++--- .../blocks/OrganisationsBlock.svelte | 10 +++---- .../blocks/SearchableTextBlock.svelte | 2 +- 7 files changed, 46 insertions(+), 20 deletions(-) diff --git a/src/app.css b/src/app.css index 4e9a5aa..be55aae 100644 --- a/src/app.css +++ b/src/app.css @@ -10,6 +10,32 @@ @import "tailwindcss"; +/* ========================================================================== + Component Utilities + ========================================================================== */ + +@layer components { + /* Shared card surface: border, background, shadow, radius */ + .card-surface { + @apply rounded-sm border border-stein-200 bg-white shadow-sm; + } + + /* Diagonal strikethrough for past calendar days */ + .day-past::after { + content: ''; + position: absolute; + inset: 2px; + background: linear-gradient( + to top right, + transparent calc(50% - 0.5px), + rgba(0, 0, 0, 0.12) calc(50% - 0.5px), + rgba(0, 0, 0, 0.12) calc(50% + 0.5px), + transparent calc(50% + 0.5px) + ); + pointer-events: none; + } +} + /* ========================================================================== Design Tokens – Windwiderstand (01-colors, 02-typography, 06-tokens.json) ========================================================================== */ diff --git a/src/lib/components/BlogOverview.svelte b/src/lib/components/BlogOverview.svelte index fdcc8c6..95c96f8 100644 --- a/src/lib/components/BlogOverview.svelte +++ b/src/lib/components/BlogOverview.svelte @@ -235,7 +235,7 @@ {#each filteredResults as hit} {#if hit.image}
{/if} diff --git a/src/lib/components/blocks/OrganisationsBlock.svelte b/src/lib/components/blocks/OrganisationsBlock.svelte index ae3c5fc..92b9fd2 100644 --- a/src/lib/components/blocks/OrganisationsBlock.svelte +++ b/src/lib/components/blocks/OrganisationsBlock.svelte @@ -64,12 +64,12 @@ {#snippet defaultCard(o: OrganisationEntry, linkUrl: string | undefined, logoField: ReturnType, orgIndex: number)} -
+
{#if logoField} {o.badge.label}
{/if} -
{o.name ?? ""}
+
{o.name ?? ""}
{#if o.description} -

{o.description}

+

{o.description}

{/if} {/snippet} @@ -140,7 +140,7 @@
{#each orgs as org, orgIndex} {#if typeof org === "object" && org !== null} diff --git a/src/lib/components/blocks/SearchableTextBlock.svelte b/src/lib/components/blocks/SearchableTextBlock.svelte index 7719abe..1c56a5b 100644 --- a/src/lib/components/blocks/SearchableTextBlock.svelte +++ b/src/lib/components/blocks/SearchableTextBlock.svelte @@ -193,7 +193,7 @@