b7093b703a
- Palette: gray/zinc/slate/neutral → stein, red → fire, amber → erde, sky → himmel, green → wald - Footer: replaced raw rgb with stein tokens - Radius: unified to rounded-xs across cards, buttons, inputs, pagination - Buttons: .btn-primary/.btn-secondary now font-medium; added secondary - Card hover: -translate-y-0.5 + shadow + wald-300 border - Header active link: wald border-bottom + wald-700 text - Mobile nav: bigger touch targets + wald active accent - Pagination: prev/next text labels + wald-500 active state with separated shape/color classes to avoid Tailwind conflicts - Lead paragraph: scoped .markdown > p:first-child for top-level MarkdownBlock only via [data-block-type="markdown"] - Section dividers: subtle wald-200 gradient between content rows - Global focus-visible ring (wald-500) - Inline hex → palette tokens (Badge amber, Tag custom-color contrast) - Font weights snapped to design system (300/400/500/600/700) - transition-all → transition-colors where only color changes - Removed em-dashes from user-visible templates Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
79 lines
2.7 KiB
Svelte
79 lines
2.7 KiB
Svelte
<script lang="ts">
|
|
import Icon from "@iconify/svelte";
|
|
import "$lib/iconify-offline";
|
|
import Accordion from "./Accordion.svelte";
|
|
import { t, T } from "$lib/translations";
|
|
import type { Translations } from "$lib/translations";
|
|
|
|
let {
|
|
embedUrl = null,
|
|
linkUrl = null,
|
|
locationText = null,
|
|
label = "Karte",
|
|
translations = null,
|
|
}: {
|
|
embedUrl?: string | null;
|
|
linkUrl?: string | null;
|
|
locationText?: string | null;
|
|
label?: string;
|
|
translations?: Translations | null;
|
|
} = $props();
|
|
|
|
let overlayVisible = $state(true);
|
|
</script>
|
|
|
|
<Accordion id="map-section" {label} open class="mt-12">
|
|
<div class="overflow-hidden rounded-lg border border-wald-200 shadow-sm">
|
|
{#if embedUrl}
|
|
<div>
|
|
<div class="relative">
|
|
<iframe
|
|
src={embedUrl}
|
|
width="600"
|
|
height="300"
|
|
class="block w-full border-0"
|
|
loading="lazy"
|
|
title={locationText ? `Karte: ${locationText}` : "Veranstaltungsort"}
|
|
></iframe>
|
|
{#if overlayVisible}
|
|
<div
|
|
role="button"
|
|
tabindex="0"
|
|
class="absolute inset-0 flex items-center justify-center bg-black/20 backdrop-blur-[1px] cursor-pointer select-none"
|
|
aria-label="Karte aktivieren"
|
|
onclick={() => { overlayVisible = false; }}
|
|
onkeydown={(e) => { if (e.key === 'Enter' || e.key === ' ') overlayVisible = false; }}
|
|
>
|
|
<div class="flex items-center gap-2 rounded-full bg-white/90 px-4 py-2 text-xs font-medium text-stein-700 shadow">
|
|
<Icon icon="mdi:cursor-default-click" class="size-4 shrink-0" aria-hidden="true" />
|
|
{t(translations, T.post_map_activate)}
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
{#if linkUrl}
|
|
<a
|
|
href={linkUrl}
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
class="flex items-center gap-1.5 px-3 py-1.5 bg-wald-50 text-wald-700 text-[.65rem] font-medium hover:bg-wald-100 transition-colors border-t border-wald-200"
|
|
>
|
|
<Icon icon="mdi:open-in-new" class="size-3.5 shrink-0" aria-hidden="true" />
|
|
{t(translations, T.post_map_open_osm)}
|
|
</a>
|
|
{/if}
|
|
</div>
|
|
{:else if linkUrl}
|
|
<a
|
|
href={linkUrl}
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
class="flex items-center gap-2 px-3 py-2 bg-wald-50 text-wald-700 text-xs font-medium hover:bg-wald-100 transition-colors"
|
|
>
|
|
<Icon icon="mdi:map-marker" class="size-4 shrink-0" aria-hidden="true" />
|
|
{locationText ?? t(translations, T.post_map_open_osm)}
|
|
</a>
|
|
{/if}
|
|
</div>
|
|
</Accordion>
|