diff --git a/scripts/generate-icons.mjs b/scripts/generate-icons.mjs index 4fda330..1f6be58 100644 --- a/scripts/generate-icons.mjs +++ b/scripts/generate-icons.mjs @@ -48,6 +48,7 @@ const EXTRA_ICONS = [ 'telegram', 'import-contacts', 'arrow-top-right', + 'open-in-new', 'card-account-details-outline', 'qrcode', 'sort-alphabetical-ascending', diff --git a/src/lib/block-types.ts b/src/lib/block-types.ts index 7277c2d..7f5802b 100644 --- a/src/lib/block-types.ts +++ b/src/lib/block-types.ts @@ -334,6 +334,14 @@ export interface OrganisationsBlockData { layout?: BlockLayout; } +export interface OrganisationsMapBlockData { + _type?: "organisations_map"; + _slug?: string; + headline?: string; + organisations?: (string | OrganisationEntry)[]; + layout?: BlockLayout; +} + export interface ContactEntry { _type?: "contact"; _slug?: string; diff --git a/src/lib/components/BlockRenderer.svelte b/src/lib/components/BlockRenderer.svelte index 14ba194..d675e17 100644 --- a/src/lib/components/BlockRenderer.svelte +++ b/src/lib/components/BlockRenderer.svelte @@ -22,6 +22,7 @@ import DeadlineBannerBlock from "./blocks/DeadlineBannerBlock.svelte"; import WindkarteBlock from "./blocks/WindkarteBlock.svelte"; import AdressbuchBlock from "./blocks/AdressbuchBlock.svelte"; + import OrganisationsMapBlock from "./blocks/OrganisationsMapBlock.svelte"; import type { Translations } from "$lib/translations"; import type { ResolvedBlock, @@ -49,6 +50,7 @@ LiveStrommixBlockData, WindMapBlockData, StellingnahmeGeneratorBlockData, + OrganisationsMapBlockData, } from "$lib/block-types"; let { @@ -113,6 +115,8 @@ {:else if type === "adressbuch"} +{:else if type === "organisations_map"} + {:else if type === "stellungnahme_generator"} {#await import("./blocks/StellingnahmeGeneratorBlock.svelte") then m} {@const Comp = m.default} diff --git a/src/lib/components/blocks/OrganisationsMapBlock.svelte b/src/lib/components/blocks/OrganisationsMapBlock.svelte new file mode 100644 index 0000000..635e8c2 --- /dev/null +++ b/src/lib/components/blocks/OrganisationsMapBlock.svelte @@ -0,0 +1,191 @@ + + +
+ {#if block.headline} +

{block.headline}

+ {/if} + +
+ +
+ + + {#if selectedOrg} +
+
+
+

+ {selectedOrg.name} +

+ +
+ + {#if selectedOrg.location?.text} +

+ + {selectedOrg.location.text} +

+ {/if} + + {#if selectedOrg.resolvedLogoSrc} + {selectedOrg.name + {/if} + + {#if descriptionHtml} +
+ {@html descriptionHtml} +
+ {/if} + + {#if getLink(selectedOrg)} + + + {getLinkLabel(selectedOrg)} + + {/if} +
+
+ {/if} +
+ +

{orgs.length} Bürgerinitiativen · Marker anklicken für Details

+
+ + diff --git a/src/lib/iconify-mdi-subset.generated.json b/src/lib/iconify-mdi-subset.generated.json index c26d2d5..e67026a 100644 --- a/src/lib/iconify-mdi-subset.generated.json +++ b/src/lib/iconify-mdi-subset.generated.json @@ -135,9 +135,6 @@ "youtube": { "body": "" }, - "check": { - "body": "" - }, "clock-alert-outline": { "body": "" }, @@ -147,6 +144,9 @@ "content-save-outline": { "body": "" }, + "check": { + "body": "" + }, "check-circle": { "body": "" },