feat(link-list): CMS-Feld columns (auto|single) für Spaltenlayout
single = immer untereinander, auto = breitenbasiert mehrspaltig ab >4. Regionalplan-Generatorenliste (w1-w40) auf single. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -216,6 +216,8 @@ export interface LinkListBlockData {
|
||||
_slug?: string;
|
||||
headline?: string;
|
||||
links?: Array<string | { url?: string; linkName?: string; newTab?: boolean }>;
|
||||
/** Spaltenlayout: "auto" = mehrspaltig bei >4 Links, "single" = immer untereinander. */
|
||||
columns?: "auto" | "single";
|
||||
layout?: BlockLayout;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
links.length > 0 &&
|
||||
links.every((l) => l.icon && l.showText === false),
|
||||
);
|
||||
// "single" = immer einspaltig (CMS-Override); sonst breitenbasiert mehrspaltig bei >4
|
||||
const multiColumn = $derived(block.columns !== "single" && links.length > 4);
|
||||
</script>
|
||||
|
||||
<div class="link-list {layoutClasses}" data-block="LinkList" data-block-type="link_list" data-block-slug={block._slug}>
|
||||
@@ -35,7 +37,7 @@
|
||||
<ul
|
||||
class={iconOnlyAll
|
||||
? "flex flex-wrap gap-3"
|
||||
: links.length > 4
|
||||
: multiColumn
|
||||
? "grid grid-cols-[repeat(auto-fill,minmax(13rem,1fr))] gap-x-8 gap-y-1.5"
|
||||
: "flex flex-col gap-1.5"}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user