diff --git a/api/collections/fieldLists/cards.yml b/api/collections/fieldLists/cards.yml index ec6dd1b..b5c8a4c 100644 --- a/api/collections/fieldLists/cards.yml +++ b/api/collections/fieldLists/cards.yml @@ -9,6 +9,32 @@ meta: label: Dieser Titel wird in der Karte angezeigt (Name des Landes). +- name: verticalAlignment + type: string + meta: + label: Vertikale Ausrichtung + widget: select + choices: + - name: Oben + id: flex-start + - name: Mitte + id: center + - name: Unten + id: flex-end + +- name: horizontalAlignment + type: string + meta: + label: Horizontale Ausrichtung + widget: select + choices: + - name: Links + id: flex-start + - name: Mitte + id: center + - name: Rechts + id: flex-end + - name: properties type: number[] meta: diff --git a/api/collections/fieldLists/column.yml b/api/collections/fieldLists/column.yml index 0e0fdab..72128f7 100644 --- a/api/collections/fieldLists/column.yml +++ b/api/collections/fieldLists/column.yml @@ -211,11 +211,19 @@ dependsOn: eval: $parent.contentType == 'worldCard' subFields: - - name: cards + - name: row type: object[] meta: - label: Karten - subFields: !include cards.yml + label: Zeilen + subFields: + - name: cards + type: object[] + meta: + label: Karten + metaElements: + - verticalAlignment + - horizontalAlignment + subFields: !include cards.yml - name: nestedCard type: object[] diff --git a/frontend/src/lib/components/Pagebuilder/Homepage.svelte b/frontend/src/lib/components/Pagebuilder/Homepage.svelte index 9b0f567..52df72a 100644 --- a/frontend/src/lib/components/Pagebuilder/Homepage.svelte +++ b/frontend/src/lib/components/Pagebuilder/Homepage.svelte @@ -107,7 +107,7 @@ align-items: center; justify-content: center; swiper-container { - max-width: 1600px; + max-width: 1800px; } .inner-container { display: flex; diff --git a/frontend/src/lib/components/Pagebuilder/Pagebuilder.svelte b/frontend/src/lib/components/Pagebuilder/Pagebuilder.svelte index 4b463ff..e1acd26 100644 --- a/frontend/src/lib/components/Pagebuilder/Pagebuilder.svelte +++ b/frontend/src/lib/components/Pagebuilder/Pagebuilder.svelte @@ -13,6 +13,7 @@ import Text from "../widgets/text.svelte" import TextLink from "../widgets/textLink.svelte" import TopDown from "../widgets/topDown.svelte" + import WorldCard from "../widgets/Worldcard/worldcard.svelte" import { rerender } from "../../store" import IconCycleCircle from "../widgets/iconCycleCircle.svelte" import IconCycleBox from "../widgets/iconCycleBox.svelte" @@ -91,8 +92,10 @@ {:else if col.contentType == "iconCycleCircle"} - {:else} + {:else if col.contentType == "iconCycleSquare"} + {:else if col.contentType == "worldCard"} + {/if} {/each} diff --git a/frontend/src/lib/components/Pagebuilder/Rows.svelte b/frontend/src/lib/components/Pagebuilder/Rows.svelte index f0b0f9c..dbaaac2 100644 --- a/frontend/src/lib/components/Pagebuilder/Rows.svelte +++ b/frontend/src/lib/components/Pagebuilder/Rows.svelte @@ -46,10 +46,10 @@ justify-content: flex-start; width: 100%; position: relative; - + overflow-x: hidden; gap: 10px; - + & > .row { padding: 10px; padding-top: 80px; @@ -75,7 +75,7 @@ & > .content { width: 100%; - max-width: 1600px; + max-width: 1800px; padding: 0px 2.5vw; position: relative; &.bright { diff --git a/frontend/src/lib/components/widgets/Worldcard/card.svelte b/frontend/src/lib/components/widgets/Worldcard/card.svelte new file mode 100644 index 0000000..2bb8ebc --- /dev/null +++ b/frontend/src/lib/components/widgets/Worldcard/card.svelte @@ -0,0 +1,154 @@ + + +
+ card + +
+
+
+
+ {card.title} +
+ +
+ {#each props as propertyRow, i (i)} +
+ {#each propertyRow as property, j (j)} +
+
+
+ {properties[property][0]} +
+
{properties[property][1]}
+
+
+ {/each} +
+ {/each} +
+
+
+
+
+ + diff --git a/frontend/src/lib/components/widgets/Worldcard/selectbox.svelte b/frontend/src/lib/components/widgets/Worldcard/selectbox.svelte new file mode 100644 index 0000000..a993d99 --- /dev/null +++ b/frontend/src/lib/components/widgets/Worldcard/selectbox.svelte @@ -0,0 +1,47 @@ + + + + + diff --git a/frontend/src/lib/components/widgets/Worldcard/worldcard.svelte b/frontend/src/lib/components/widgets/Worldcard/worldcard.svelte new file mode 100644 index 0000000..d4b73c2 --- /dev/null +++ b/frontend/src/lib/components/widgets/Worldcard/worldcard.svelte @@ -0,0 +1,111 @@ + + +
+
+ {#each col.worldCard.row as row} +
+ {#each row.cards as card} + + {/each} +
+ {/each} +
+ +
+

WÄHLEN SIE IHRE ANLAGEKLASSEN

+ {#each props as propertyRow, i} +
+ {#each propertyRow as property, j} + + {/each} +
+ {/each} +
+
+ + diff --git a/frontend/src/lib/components/widgets/iconCycleBox.svelte b/frontend/src/lib/components/widgets/iconCycleBox.svelte index 2dbdf90..a4e0cb1 100644 --- a/frontend/src/lib/components/widgets/iconCycleBox.svelte +++ b/frontend/src/lib/components/widgets/iconCycleBox.svelte @@ -11,7 +11,7 @@
- {#each col.iconCycleSquare.boxes as box, i} + {#each col?.iconCycleSquare?.boxes as box, i}
diff --git a/types/global.d.ts b/types/global.d.ts index d24066e..6fa0358 100644 --- a/types/global.d.ts +++ b/types/global.d.ts @@ -119,10 +119,15 @@ interface InfoBoard { } interface WorldCard { + rows: WorldCardRow[] +} +interface worldCardRow { cards: Card[] } interface Card { + verticalAlignment: string + horizontalAlignment: string image: FileField title: string properties: number[]