fix: WindkarteBlock col-span + data-block attrs
Deploy / verify (push) Successful in 52s
Deploy / deploy (push) Successful in 1m24s

Block fehlte layoutClasses (col-span) und data-block/type/slug attrs.
Layout-Feld zu WindMapBlockData ergänzt.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Peter Meier
2026-05-15 18:14:56 +02:00
parent 3cb728d677
commit a1dcedd855
2 changed files with 10 additions and 1 deletions
+1
View File
@@ -430,4 +430,5 @@ export interface WindMapBlockData {
subtitle?: string;
/** Explizite Auswahl von wind_area-Slugs. Leer/null = alle published areas. */
areas?: (string | { _slug: string;[key: string]: unknown })[];
layout?: BlockLayout;
}
@@ -6,11 +6,14 @@
import type { WindArea } from "$lib/windkarte";
import WindAreaPanel from "$lib/components/WindAreaPanel.svelte";
import { useTranslate, T } from "$lib/translations";
import { getBlockLayoutClasses } from "$lib/block-layout";
const t = useTranslate();
let { block }: { block: WindMapBlockData } = $props();
const layoutClasses = $derived(getBlockLayoutClasses(block.layout));
const CMS_BASE = (
env.PUBLIC_CMS_URL || "http://localhost:3000"
).replace(/\/$/, "");
@@ -87,7 +90,12 @@ let areas = $state<WindArea[]>([]);
});
</script>
<div class="wind-map-block">
<div
class="wind-map-block {layoutClasses}"
data-block="WindMap"
data-block-type="wind_map"
data-block-slug={block._slug}
>
{#if block.title || block.subtitle}
<div class="mb-4">
{#if block.title}