feat(windkarte): InfoAccordion, anlagen-Hinweis, Tooltip ohne Icons
- Disclaimer aus CMS-Feld (hinweis_text) via InfoAccordion statt Hardcode - info_text-Feld für Block-Fließtext ergänzt - anlagen_geplant_hinweis-Feld in WindArea + Panel-Anzeige - Tooltip-Icons entfernt (square-outline/wind-turbine/map-marker inline SVGs) - Panel: square-outline → ruler-square für Fläche - Iconify-Subset neu generiert Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
import type { WindMapBlockData } from "$lib/block-types";
|
||||
import type { WindArea } from "$lib/windkarte";
|
||||
import WindAreaPanel from "$lib/components/WindAreaPanel.svelte";
|
||||
import InfoAccordion from "$lib/components/InfoAccordion.svelte";
|
||||
import { useTranslate, T } from "$lib/translations";
|
||||
import { getBlockLayoutClasses } from "$lib/block-layout";
|
||||
import Icon from "@iconify/svelte";
|
||||
@@ -103,7 +104,7 @@ let areas = $state<WindArea[]>([]);
|
||||
data-block-type="wind_map"
|
||||
data-block-slug={block._slug}
|
||||
>
|
||||
{#if block.title || block.subtitle}
|
||||
{#if block.title || block.subtitle || block.info_text}
|
||||
<div class="mb-4">
|
||||
{#if block.title}
|
||||
<h2 class="text-xl font-semibold text-stein-800">{block.title}</h2>
|
||||
@@ -111,20 +112,18 @@ let areas = $state<WindArea[]>([]);
|
||||
{#if block.subtitle}
|
||||
<p class="mt-0.5 text-sm text-stein-500">{block.subtitle}</p>
|
||||
{/if}
|
||||
{#if block.info_text}
|
||||
<div class="markdown prose prose-sm prose-zinc max-w-none mt-2 text-stein-600">{@html block.info_text}</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<!-- Daten-Disclaimer (default geschlossen, oberhalb der Karte) -->
|
||||
<details class="data-disclaimer mb-3 rounded-md border border-stein-200 bg-stein-50 text-xs text-stein-600">
|
||||
<summary class="flex cursor-pointer items-center gap-1.5 px-3 py-1.5 font-medium text-stein-700 hover:bg-stein-100 list-none">
|
||||
<Icon icon="mdi:information-outline" class="size-3.5 shrink-0 text-stein-500" />
|
||||
<span class="flex-1">Hinweis zu den Daten</span>
|
||||
<Icon icon="mdi:chevron-down" class="disclaimer-chevron size-4 shrink-0 text-stein-500 transition-transform" />
|
||||
</summary>
|
||||
<p class="border-t border-stein-200 px-3 py-2 leading-relaxed">
|
||||
Diese Karte zeigt zu den Vorranggebieten die amtlichen Angaben aus den Prüfbögen, also Flächengröße und Windhöffigkeit. Wir hatten zusätzlich eigene Schätzwerte zu Anlagenzahl und Anlagenhöhe ergänzt. Diese waren keine amtlichen Festlegungen, der Regionalplan legt beides nicht fest, das entscheidet sich erst im Genehmigungsverfahren. Wir haben diese Schätzwerte entfernt, um Missverständnisse zu vermeiden. Wer einen Fehler findet, kann sich gern bei uns melden.
|
||||
</p>
|
||||
</details>
|
||||
<!-- Daten-Disclaimer aus dem CMS-Feld `hinweis_text` -->
|
||||
{#if block.hinweis_text}
|
||||
<div class="mb-3">
|
||||
<InfoAccordion title="Hinweis zu den Daten" body={block.hinweis_text} />
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="map-container relative overflow-hidden rounded-xl border border-stein-200 shadow-sm">
|
||||
<!-- Reset button -->
|
||||
@@ -235,10 +234,6 @@ let areas = $state<WindArea[]>([]);
|
||||
height: clamp(460px, 75vh, 620px);
|
||||
}
|
||||
|
||||
.data-disclaimer[open] :global(.disclaimer-chevron) {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
/* Panel: mobile = bottom sheet, sm+ = right side panel */
|
||||
.panel-slide {
|
||||
position: absolute;
|
||||
|
||||
Reference in New Issue
Block a user