Macht 82d4c91 rückgängig – der Text am Akzentkreis und das
Einstellungsfeld „Text im Kreis“ sind wieder da.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
112 lines
4.8 KiB
Svelte
112 lines
4.8 KiB
Svelte
<script lang="ts">
|
|
import ArrowRight from '@lucide/svelte/icons/arrow-right';
|
|
import Search from '@lucide/svelte/icons/search';
|
|
import CalendarPlus from '@lucide/svelte/icons/calendar-plus';
|
|
import HomeHero from '$lib/components/HomeHero.svelte';
|
|
import Tile from '$lib/components/Tile.svelte';
|
|
import PostCard from '$lib/components/PostCard.svelte';
|
|
import { dayOfMonth, eventWhen, monthAbbr, weekday } from '$lib/dates';
|
|
|
|
let { data } = $props();
|
|
</script>
|
|
|
|
<svelte:head>
|
|
<title>{data.brand.appName}</title>
|
|
</svelte:head>
|
|
|
|
<div class="space-y-14 lg:space-y-20">
|
|
{#if data.heroEnabled}
|
|
<HomeHero image={data.hero} headline={data.greeting} tagline={data.heroTagline} highlight={data.highlight} />
|
|
{:else}
|
|
<h1 class="font-bold text-3xl sm:text-4xl text-brand-ink pt-4">{data.greeting}</h1>
|
|
{/if}
|
|
|
|
<!-- Einleitung & Suche -->
|
|
<section class="grid lg:grid-cols-2 gap-6 lg:gap-16 items-end [&>*]:min-w-0">
|
|
<div class="space-y-3">
|
|
<p class="eyebrow eyebrow-rule">{data.brand.orgName}</p>
|
|
{#if data.intro}<p class="text-lg text-ink-2 max-w-xl">{data.intro}</p>{/if}
|
|
</div>
|
|
<form action="/suche" role="search">
|
|
<label class="flex items-center gap-3 rounded-full bg-surface-2 pl-5 pr-1.5 h-15 focus-within:ring-4 focus-within:ring-brand/15 transition">
|
|
<Search class="size-5 text-brand-ink shrink-0" strokeWidth={2.4} />
|
|
<span class="sr-only">Suchen</span>
|
|
<input name="q" type="search" placeholder="Was suchst du?" class="flex-1 min-w-0 bg-transparent outline-none h-full font-semibold placeholder:text-ink-3 placeholder:font-medium" />
|
|
<button class="btn btn-primary">Suchen</button>
|
|
</label>
|
|
</form>
|
|
</section>
|
|
|
|
<!-- Bereiche -->
|
|
{#if data.tiles.length}
|
|
<section aria-labelledby="bereiche" class="space-y-5">
|
|
<div class="space-y-2">
|
|
<p class="eyebrow eyebrow-rule">Bereiche</p>
|
|
<h2 id="bereiche" class="text-2xl sm:text-3xl text-brand-ink">Was möchtest du wissen?</h2>
|
|
</div>
|
|
<div class="grid sm:grid-cols-2 lg:grid-cols-3 gap-2.5">
|
|
{#each data.tiles as t (t.id)}
|
|
<Tile href={t.href} label={t.label} icon={t.icon} />
|
|
{/each}
|
|
</div>
|
|
</section>
|
|
{/if}
|
|
|
|
<!-- Neuigkeiten -->
|
|
<section aria-labelledby="neu" class="space-y-5">
|
|
<div class="flex items-end justify-between gap-4">
|
|
<div class="space-y-2">
|
|
<p class="eyebrow eyebrow-rule">Aktuelles</p>
|
|
<h2 id="neu" class="text-2xl sm:text-3xl text-brand-ink">Neuigkeiten</h2>
|
|
</div>
|
|
<a href="/meldungen" class="btn btn-soft btn-sm shrink-0">Alle <ArrowRight class="size-4" /></a>
|
|
</div>
|
|
{#if data.posts.length}
|
|
<div class="grid md:grid-cols-2 lg:grid-cols-3 gap-x-6 gap-y-8">
|
|
{#each data.posts as p (p.id)}
|
|
<PostCard post={p} />
|
|
{/each}
|
|
</div>
|
|
{:else}
|
|
<p class="text-ink-3">Noch keine Meldungen.</p>
|
|
{/if}
|
|
</section>
|
|
|
|
<!-- Termine als Farbblock -->
|
|
<section aria-labelledby="termine" class="relative -mx-4 lg:mx-0 lg:rounded-[1.75rem] overflow-hidden bg-brand text-on-brand">
|
|
<div aria-hidden="true" class="absolute -right-32 -bottom-40 size-[26rem] rounded-full bg-accent"></div>
|
|
<div class="relative px-5 py-10 sm:px-8 lg:px-12 lg:py-14 grid lg:grid-cols-[1fr_1.4fr] gap-8 lg:gap-14">
|
|
<div class="space-y-4">
|
|
<p class="eyebrow text-on-brand/70">Termine</p>
|
|
<h2 id="termine" class="text-3xl sm:text-4xl">Was steht an?</h2>
|
|
<p class="text-on-brand/80 max-w-sm">Veranstaltungen, Versammlungen und Schließzeiten auf einen Blick.</p>
|
|
<div class="flex flex-wrap gap-2 pt-2">
|
|
<a href="/termine" class="btn bg-white text-brand hover:bg-white/90">Alle Termine</a>
|
|
<a href="/termine.ics" class="btn text-on-brand hover:bg-white/10"><CalendarPlus class="size-4" />Kalender abonnieren</a>
|
|
</div>
|
|
</div>
|
|
{#if data.events.length}
|
|
<ul class="divide-y divide-white/15 border-y border-white/15">
|
|
{#each data.events as e (e.id)}
|
|
<li class="flex items-center gap-5 py-4">
|
|
<span class="w-14 shrink-0 text-center leading-none" aria-hidden="true">
|
|
<span class="block text-[0.7rem] font-semibold uppercase tracking-[0.15em] text-on-brand/70">{weekday(e.startDate)}</span>
|
|
<span class="block text-3xl font-bold my-1">{dayOfMonth(e.startDate)}</span>
|
|
<span class="block text-xs font-semibold uppercase tracking-wider text-on-brand/70">{monthAbbr(e.startDate)}</span>
|
|
</span>
|
|
<span class="min-w-0">
|
|
{#if e.kind === 'closure'}
|
|
<span class="inline-block rounded-full bg-accent px-2.5 py-0.5 text-[0.7rem] font-bold uppercase tracking-wider mb-1">Geschlossen</span>
|
|
{/if}
|
|
<span class="block font-bold text-lg leading-snug">{e.title}</span>
|
|
<span class="block text-sm text-on-brand/75">{eventWhen(e)}{e.location ? ` · ${e.location}` : ''}</span>
|
|
</span>
|
|
</li>
|
|
{/each}
|
|
</ul>
|
|
{:else}
|
|
<p class="text-on-brand/80 self-center">Gerade sind keine Termine geplant.</p>
|
|
{/if}
|
|
</div>
|
|
</section>
|
|
</div>
|