From 6c774c491383378b37e8d6fe70d394b68243457c Mon Sep 17 00:00:00 2001 From: Peter Meier Date: Thu, 4 Jun 2026 11:25:34 +0200 Subject: [PATCH] refactor: SearchableTextBlock Redesign, Ort-Badge Truncate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - SearchableTextBlock: Farbverlauf-Header entfernt, Tag/Tags durch .chip ersetzt, Suche auf Adressbuch-Style ausgerichtet, Kopier-Buttons auf Icon-only reduziert, border-l-4 Akzent entfernt - EventBadges: whitespace-nowrap entfernt, truncate max-w-[16rem] + title für lange Ortstexte - PostCard: min-w-0 auf Badges-Container für korrekte Truncate-Propagation - iconify-mdi-subset: qrcode + download Icons ergänzt Co-Authored-By: Claude Sonnet 4.6 --- src/lib/components/EventBadges.svelte | 8 +- src/lib/components/PostCard.svelte | 2 +- .../blocks/SearchableTextBlock.svelte | 98 +++++++------------ src/lib/iconify-mdi-subset.generated.json | 15 ++- 4 files changed, 44 insertions(+), 79 deletions(-) diff --git a/src/lib/components/EventBadges.svelte b/src/lib/components/EventBadges.svelte index a8c883c..5492fac 100644 --- a/src/lib/components/EventBadges.svelte +++ b/src/lib/components/EventBadges.svelte @@ -34,14 +34,14 @@ {/if} {#if locationText} {#if locationHref} - + {:else} - + {/if} {/if} diff --git a/src/lib/components/PostCard.svelte b/src/lib/components/PostCard.svelte index 9a35cca..631b908 100644 --- a/src/lib/components/PostCard.svelte +++ b/src/lib/components/PostCard.svelte @@ -84,7 +84,7 @@ {/if} {#if eventDate} -
+
{/if} diff --git a/src/lib/components/blocks/SearchableTextBlock.svelte b/src/lib/components/blocks/SearchableTextBlock.svelte index 1c56a5b..f26a802 100644 --- a/src/lib/components/blocks/SearchableTextBlock.svelte +++ b/src/lib/components/blocks/SearchableTextBlock.svelte @@ -9,9 +9,6 @@ } from "$lib/block-types"; import "$lib/iconify-offline"; import Icon from "@iconify/svelte"; - import Tag from "../Tag.svelte"; - import Tags from "../Tags.svelte"; - import Tooltip from "$lib/ui/Tooltip.svelte"; import { t as tStatic, T } from "$lib/translations"; import type { Translations } from "$lib/translations"; @@ -28,7 +25,6 @@ function t(key: string, replacements?: Record) { return tStatic(translations ?? null, key, replacements); } - const helpTooltipText = $derived(t(T.searchable_text_help)); const layoutClasses = $derived(getBlockLayoutClasses(block.layout)); const fragments = $derived.by(() => { @@ -198,14 +194,12 @@ data-block-slug={block._slug} > {#if block.title || descriptionHtml} -
+
{#if block.title} -

- {block.title} -

+

{block.title}

{/if} {#if descriptionHtml} -
+
{@html descriptionHtml}
{/if} @@ -216,58 +210,42 @@ class="sticky top-14 z-10 px-4 md:px-6 py-3 border-b border-stein-200 bg-white/95 backdrop-blur-sm shadow-sm" >
-
- - - +
+
{#if allTags.length > 0} -
-
- (selectedTag = "all")} - /> - {#each allTags as tag} - (selectedTag = tag)} - /> - {/each} -
+
+ + {#each allTags as tag} + + {/each}
{/if}
@@ -310,9 +288,7 @@ {@const itemKey = fragment.title || String(i)} {@const isOpen = openTitles.has(itemKey)}
{#if fragment.tags.length > 0} - - - +
+ {#each fragment.tags as tag} + {tag} + {/each} +
{/if}
{#if isOpen} @@ -368,20 +342,14 @@
{@html highlightInHtml(fragment.textHtml, searchQuery.trim())} diff --git a/src/lib/iconify-mdi-subset.generated.json b/src/lib/iconify-mdi-subset.generated.json index 6870a61..c26d2d5 100644 --- a/src/lib/iconify-mdi-subset.generated.json +++ b/src/lib/iconify-mdi-subset.generated.json @@ -75,6 +75,12 @@ "printer-outline": { "body": "" }, + "qrcode": { + "body": "" + }, + "download": { + "body": "" + }, "loading": { "body": "" }, @@ -84,18 +90,12 @@ "map-outline": { "body": "" }, - "download": { - "body": "" - }, "sort-alphabetical-ascending": { "body": "" }, "account-group-outline": { "body": "" }, - "qrcode": { - "body": "" - }, "map-marker-outline": { "body": "" }, @@ -135,9 +135,6 @@ "youtube": { "body": "" }, - "help-circle-outline": { - "body": "" - }, "check": { "body": "" },