diff --git a/api/collections/content.yml b/api/collections/content.yml index de9b7c4..1aa8f63 100644 --- a/api/collections/content.yml +++ b/api/collections/content.yml @@ -15,6 +15,7 @@ meta: label: Allgemein subFields: - source: path + - name: teaser label: Teaser subFields: @@ -84,6 +85,7 @@ fields: helperText: "Ein Pfad sollte mit einem / starten und ohne eins enden." - !include fields/teaserHomepage.yml + - name: rows type: object[] meta: diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index 1e387ad..f8978aa 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -44,6 +44,13 @@ getPages() let activeMenu = false + $: { + if (activeMenu) { + document.body.classList.add("overflow") + } else { + document.body.classList.remove("overflow") + } + }
@@ -69,9 +76,68 @@ diff --git a/frontend/src/lib/assets/css/base.less b/frontend/src/lib/assets/css/base.less index 8d5c61e..8f3a7a5 100644 --- a/frontend/src/lib/assets/css/base.less +++ b/frontend/src/lib/assets/css/base.less @@ -3,12 +3,13 @@ padding: 0; box-sizing: border-box; } - +html { + background-color: black; +} body { color: #333 !important; height: 100%; background-color: #f9f9f9; - overflow: hidden !important; } ul { diff --git a/frontend/src/lib/assets/fonts/LibreCaslonText-Regular.woff2 b/frontend/src/lib/assets/fonts/LibreCaslonText-Regular.woff2 new file mode 100644 index 0000000..d898b4a Binary files /dev/null and b/frontend/src/lib/assets/fonts/LibreCaslonText-Regular.woff2 differ diff --git a/frontend/src/lib/components/Menu/Header.svelte b/frontend/src/lib/components/Menu/Header.svelte index 6e5821f..d60b419 100644 --- a/frontend/src/lib/components/Menu/Header.svelte +++ b/frontend/src/lib/components/Menu/Header.svelte @@ -3,7 +3,7 @@ export let opened = false -
+
@@ -19,7 +19,13 @@ diff --git a/frontend/src/lib/components/Pagebuilder/Pagebuilder.svelte b/frontend/src/lib/components/Pagebuilder/Pagebuilder.svelte index b02f116..f05adf8 100644 --- a/frontend/src/lib/components/Pagebuilder/Pagebuilder.svelte +++ b/frontend/src/lib/components/Pagebuilder/Pagebuilder.svelte @@ -1,8 +1,65 @@ -
+{#if Object.keys(row).length} + {#if row.topTitle} +

{row.topTitle}

+ {/if} + {#if row.pageTitle} +

{row.pageTitle}

+ {/if} + {#if row.title} +

{row.title}

+ {/if} + {#if row.subTitle} +

{row.subTitle}

+ {/if} +
+ {#each row?.columns as col} +
+ {#if col?.contentType == "text"} + + {:else if col?.contentType == "textLink"} + + {:else if col.contentType == "image"} + + {/if} +
+ {/each} +
+{/if} diff --git a/frontend/src/lib/components/Pagebuilder/Rows.svelte b/frontend/src/lib/components/Pagebuilder/Rows.svelte index 7fc8eb3..1a39c08 100644 --- a/frontend/src/lib/components/Pagebuilder/Rows.svelte +++ b/frontend/src/lib/components/Pagebuilder/Rows.svelte @@ -1,6 +1,7 @@ -
+
{#if page} - {page.path} + {#if path == "/"}{/if} + {#each page.rows as row} +
+ +
+ {/each} {/if}
diff --git a/frontend/src/lib/components/widgets/image.svelte b/frontend/src/lib/components/widgets/image.svelte new file mode 100644 index 0000000..05d4e77 --- /dev/null +++ b/frontend/src/lib/components/widgets/image.svelte @@ -0,0 +1,24 @@ + + +
+ img +
+ + diff --git a/frontend/src/lib/components/widgets/moreBtn.svelte b/frontend/src/lib/components/widgets/moreBtn.svelte new file mode 100644 index 0000000..ee6e34c --- /dev/null +++ b/frontend/src/lib/components/widgets/moreBtn.svelte @@ -0,0 +1,21 @@ + + + + + diff --git a/frontend/src/lib/components/widgets/text.svelte b/frontend/src/lib/components/widgets/text.svelte new file mode 100644 index 0000000..11a05a7 --- /dev/null +++ b/frontend/src/lib/components/widgets/text.svelte @@ -0,0 +1,13 @@ + + +
+ {@html text} +
+ + diff --git a/frontend/src/lib/components/widgets/textLink.svelte b/frontend/src/lib/components/widgets/textLink.svelte new file mode 100644 index 0000000..f6c340f --- /dev/null +++ b/frontend/src/lib/components/widgets/textLink.svelte @@ -0,0 +1,21 @@ + + + + + diff --git a/types/global.d.ts b/types/global.d.ts index 8bab12d..cceabfa 100644 --- a/types/global.d.ts +++ b/types/global.d.ts @@ -1,10 +1,16 @@ +interface FileField { + path: string + src: string + type: string +} + interface Pages { [key: string]: Page } interface Page { path: string - teaserHomepage: teaserHomepage + teaser: teaserHomepage sectionHomepage: Row rows: Row[] id: string @@ -12,9 +18,9 @@ interface Page { interface teaserHomepage { showTeaser: boolean - subtitle: string - title: string - description: string + subTitle: string + teaserTitle: string + teaserDescription: string } interface Row { @@ -48,6 +54,7 @@ interface Column { iconCycleSquare?: IconCycleSquare iconCycleCircle?: IconCycleCircle text: string + textLink: TextLink infoBoard: InfoBoard worldCard: WorldCard nestedCard: NestedCard