From c6d43a95fa0495a8e89ed6308c2f0427d44ecedd Mon Sep 17 00:00:00 2001 From: robin Date: Sat, 15 Jul 2023 16:15:17 +0000 Subject: [PATCH] next session --- api/collections/fieldLists/column.yml | 50 ++++-- frontend/media/arrow-l.svg | 3 + frontend/media/arrow-r.svg | 3 + frontend/media/calendar.svg | 3 + frontend/media/down.svg | 10 ++ frontend/media/file.svg | 4 + frontend/media/up.svg | 10 ++ frontend/src/App.svelte | 20 ++- frontend/src/lib/components/Footer.svelte | 1 + .../src/lib/components/Menu/Header.svelte | 11 +- frontend/src/lib/components/Menu/Menu.svelte | 45 +++--- .../components/Pagebuilder/Homepage.svelte | 5 +- .../components/Pagebuilder/Pagebuilder.svelte | 101 +++++++++++-- .../lib/components/Pagebuilder/Rows.svelte | 53 ++++++- .../src/lib/components/widgets/boxlist.svelte | 27 ++++ .../src/lib/components/widgets/events.svelte | 143 ++++++++++++++++++ .../components/widgets/extendableBox.svelte | 81 ++++++++++ .../lib/components/widgets/iconBlock.svelte | 52 +++++++ .../lib/components/widgets/infoBoard.svelte | 57 +++++++ .../src/lib/components/widgets/moreBtn.svelte | 7 +- .../lib/components/widgets/nestedCard.svelte | 67 ++++++++ .../components/widgets/pageLinkBlocks.svelte | 60 ++++++++ .../src/lib/components/widgets/persons.svelte | 64 ++++++++ .../components/widgets/publications.svelte | 77 ++++++++++ .../lib/components/widgets/textLink.svelte | 3 +- .../src/lib/components/widgets/topDown.svelte | 66 ++++++++ frontend/src/lib/store.ts | 1 + types/global.d.ts | 36 +++-- 28 files changed, 988 insertions(+), 72 deletions(-) create mode 100644 frontend/media/arrow-l.svg create mode 100644 frontend/media/arrow-r.svg create mode 100644 frontend/media/calendar.svg create mode 100644 frontend/media/down.svg create mode 100644 frontend/media/file.svg create mode 100644 frontend/media/up.svg create mode 100644 frontend/src/lib/components/widgets/boxlist.svelte create mode 100644 frontend/src/lib/components/widgets/events.svelte create mode 100644 frontend/src/lib/components/widgets/extendableBox.svelte create mode 100644 frontend/src/lib/components/widgets/iconBlock.svelte create mode 100644 frontend/src/lib/components/widgets/infoBoard.svelte create mode 100644 frontend/src/lib/components/widgets/nestedCard.svelte create mode 100644 frontend/src/lib/components/widgets/pageLinkBlocks.svelte create mode 100644 frontend/src/lib/components/widgets/persons.svelte create mode 100644 frontend/src/lib/components/widgets/publications.svelte create mode 100644 frontend/src/lib/components/widgets/topDown.svelte diff --git a/api/collections/fieldLists/column.yml b/api/collections/fieldLists/column.yml index aedb579..0e0fdab 100644 --- a/api/collections/fieldLists/column.yml +++ b/api/collections/fieldLists/column.yml @@ -35,7 +35,7 @@ id: boxlist - name: Ausfahrbare Box - id: extendableBox + id: extendableBoxes - name: Text mit Link id: textLink @@ -46,11 +46,11 @@ - name: Seitenlinks id: pageLinkBlocks - - name: networkEvents + - name: Netzwerk Veranstaltungen id: networkEvents - - name: publication - id: publication + - name: Veröffentlichungen + id: publications - name: networkEvents type: object[] @@ -79,17 +79,18 @@ meta: label: downloadDatei -- name: publication - type: object +- name: publications + type: object[] meta: label: Publikationen dependsOn: - eval: $parent.contentType == 'publication' + eval: $parent.contentType == 'publications' subFields: - name: content type: string meta: label: Inhalt + widget: richtext - name: file type: file @@ -262,7 +263,7 @@ meta: label: Beschreibung - name: personPreview - type: object + type: object[] meta: label: Personenvorschau dependsOn: @@ -284,6 +285,22 @@ meta: label: Name + - name: link + type: string + meta: + label: + de: Seite + en: page + widget: select + choices: + endpoint: page + params: + sort: path + projection: navigation + mapping: + id: id + name: path + - name: boxList type: object meta: @@ -301,12 +318,12 @@ meta: label: Name -- name: extendableBox - type: object +- name: extendableBoxes + type: object[] meta: label: Ausklappbare Box dependsOn: - eval: $parent.contentType == 'extendableBox' + eval: $parent.contentType == 'extendableBoxes' subFields: - name: title type: string @@ -318,6 +335,17 @@ meta: widget: richtext label: Text + - name: emailButton + type: boolean + meta: + label: E-Mail Button Anzeigen + + - name: emailSubject + type: string + meta: + label: E-Mail default Betreff + dependsOn: + eval: $parent.emailButton == true - name: textLink type: object diff --git a/frontend/media/arrow-l.svg b/frontend/media/arrow-l.svg new file mode 100644 index 0000000..4124d09 --- /dev/null +++ b/frontend/media/arrow-l.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/media/arrow-r.svg b/frontend/media/arrow-r.svg new file mode 100644 index 0000000..05b9198 --- /dev/null +++ b/frontend/media/arrow-r.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/media/calendar.svg b/frontend/media/calendar.svg new file mode 100644 index 0000000..8cb5390 --- /dev/null +++ b/frontend/media/calendar.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/media/down.svg b/frontend/media/down.svg new file mode 100644 index 0000000..1364407 --- /dev/null +++ b/frontend/media/down.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/frontend/media/file.svg b/frontend/media/file.svg new file mode 100644 index 0000000..a186837 --- /dev/null +++ b/frontend/media/file.svg @@ -0,0 +1,4 @@ + + + + diff --git a/frontend/media/up.svg b/frontend/media/up.svg new file mode 100644 index 0000000..f9af713 --- /dev/null +++ b/frontend/media/up.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index f8978aa..b252122 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -4,7 +4,7 @@ import Menu from "./lib/components/Menu/Menu.svelte" import NotFound from "./lib/components/NotFound.svelte" import Rows from "./lib/components/Pagebuilder/Rows.svelte" - import { location, navigation, pages, serviceNavigation } from "./lib/store" + import { location, navigation, pages, serviceNavigation, rerender } from "./lib/store" import { Route, Router } from "svelte-routing" import { loadPages } from "./lib/functions/getPages" import { loadNavigation } from "./lib/functions/loadNavigation" @@ -55,13 +55,16 @@
+
- + {#key $rerender} + + {/key} @@ -91,14 +94,17 @@ transform: scale(0.5); transform-origin: bottom !important; } + .swiper-button-prev { right: 18%; left: initial !important; } + .swiper-button-next { right: 3%; transform-origin: right; } + @media @tablet { .swiper-button-prev, .swiper-button-next { @@ -127,7 +133,6 @@ } h1, h2 { - font-family: "Libre Caslon Text", serif; } @@ -135,7 +140,6 @@ overflow: hidden !important; } main { - overflow: hidden; min-height: 100vh; background-color: @bg-color; display: flex; @@ -143,6 +147,14 @@ justify-content: space-between; height: 100%; width: 100%; + + .content-container { + flex: 1; + } + } + + html, + body { @media @mobile { font-size: @bodyfontsize; line-height: 1.4; diff --git a/frontend/src/lib/components/Footer.svelte b/frontend/src/lib/components/Footer.svelte index 6716f76..b082681 100644 --- a/frontend/src/lib/components/Footer.svelte +++ b/frontend/src/lib/components/Footer.svelte @@ -21,6 +21,7 @@ diff --git a/frontend/src/lib/components/widgets/boxlist.svelte b/frontend/src/lib/components/widgets/boxlist.svelte new file mode 100644 index 0000000..294e5e1 --- /dev/null +++ b/frontend/src/lib/components/widgets/boxlist.svelte @@ -0,0 +1,27 @@ + + +
+ {#each col.boxList.boxes as name} +
+ {name.name} +
+ {/each} +
+ + diff --git a/frontend/src/lib/components/widgets/events.svelte b/frontend/src/lib/components/widgets/events.svelte new file mode 100644 index 0000000..dc10178 --- /dev/null +++ b/frontend/src/lib/components/widgets/events.svelte @@ -0,0 +1,143 @@ + + +
+ {#each col.networkEvents.slice(0, displayedItems) as nE} +
+
+
calendar
+
+
{months[new Date(nE.beginDate).getMonth()]}
+
+ {new Date(nE.beginDate).getDate()} + {#if nE.endDate} + - {new Date(nE.endDate).getDate()} + {/if} +
+
+
+
+ {nE.title} + + +
+
+ {/each} + {#if displayedItems < col.networkEvents.length} + + {/if} +
+ + diff --git a/frontend/src/lib/components/widgets/extendableBox.svelte b/frontend/src/lib/components/widgets/extendableBox.svelte new file mode 100644 index 0000000..973a5e0 --- /dev/null +++ b/frontend/src/lib/components/widgets/extendableBox.svelte @@ -0,0 +1,81 @@ + + +
+ {#each col.extendableBoxes as box, i} +
+
+

+ {box.title} +

+
+ {#if i !== opened}arrow{:else}arrow{/if} +
+
+
+ {@html box.text} + {#if box.emailButton} + + + + {/if} +
+
+ {/each} +
+ + diff --git a/frontend/src/lib/components/widgets/iconBlock.svelte b/frontend/src/lib/components/widgets/iconBlock.svelte new file mode 100644 index 0000000..fe82ea0 --- /dev/null +++ b/frontend/src/lib/components/widgets/iconBlock.svelte @@ -0,0 +1,52 @@ + + +
+ {#each col.iconBlocks as icon} +
+ img +
+ {icon.bigText} +

{icon.smallText}

+
+
+ {/each} +
+ + diff --git a/frontend/src/lib/components/widgets/infoBoard.svelte b/frontend/src/lib/components/widgets/infoBoard.svelte new file mode 100644 index 0000000..265cbee --- /dev/null +++ b/frontend/src/lib/components/widgets/infoBoard.svelte @@ -0,0 +1,57 @@ + + +
+
+
+ img +
+
+ {col.infoBoard.title} +
+
+
+
+ {@html col.infoBoard.text} +
+
+ + diff --git a/frontend/src/lib/components/widgets/moreBtn.svelte b/frontend/src/lib/components/widgets/moreBtn.svelte index ee6e34c..f2319dd 100644 --- a/frontend/src/lib/components/widgets/moreBtn.svelte +++ b/frontend/src/lib/components/widgets/moreBtn.svelte @@ -2,9 +2,10 @@ import { navigate } from "svelte-routing" export let path: string + export let bright - + diff --git a/frontend/src/lib/components/widgets/nestedCard.svelte b/frontend/src/lib/components/widgets/nestedCard.svelte new file mode 100644 index 0000000..ca6ff54 --- /dev/null +++ b/frontend/src/lib/components/widgets/nestedCard.svelte @@ -0,0 +1,67 @@ + + +
+ {#each col.nestedCard as card} +
+
{card.title}
+
{@html card.description}
+
+ {/each} +
+ + diff --git a/frontend/src/lib/components/widgets/pageLinkBlocks.svelte b/frontend/src/lib/components/widgets/pageLinkBlocks.svelte new file mode 100644 index 0000000..d05f7ea --- /dev/null +++ b/frontend/src/lib/components/widgets/pageLinkBlocks.svelte @@ -0,0 +1,60 @@ + + + + + diff --git a/frontend/src/lib/components/widgets/persons.svelte b/frontend/src/lib/components/widgets/persons.svelte new file mode 100644 index 0000000..6cd1a05 --- /dev/null +++ b/frontend/src/lib/components/widgets/persons.svelte @@ -0,0 +1,64 @@ + + +
+ {#each col.personPreview as pp, i} + + {/each} +
+ + diff --git a/frontend/src/lib/components/widgets/publications.svelte b/frontend/src/lib/components/widgets/publications.svelte new file mode 100644 index 0000000..7475b13 --- /dev/null +++ b/frontend/src/lib/components/widgets/publications.svelte @@ -0,0 +1,77 @@ + + +
+ {#each col.publications.slice(0, displayedItems) as publication} +
+
file
+
+
{@html publication.content}
+ +
+
+ {/each} +
+{#if displayedItems < col.publications.length} + +{/if} + + diff --git a/frontend/src/lib/components/widgets/textLink.svelte b/frontend/src/lib/components/widgets/textLink.svelte index f6c340f..0ffcaf4 100644 --- a/frontend/src/lib/components/widgets/textLink.svelte +++ b/frontend/src/lib/components/widgets/textLink.svelte @@ -3,11 +3,12 @@ import Text from "../widgets/text.svelte" export let description = "" export let path = "" + export let bright = false diff --git a/frontend/src/lib/store.ts b/frontend/src/lib/store.ts index f5a4fa6..eecdd94 100644 --- a/frontend/src/lib/store.ts +++ b/frontend/src/lib/store.ts @@ -13,3 +13,4 @@ export const location = writable(initLoc) export let navigation = writable() export let pages = writable({}) export let serviceNavigation = writable() +export let rerender = writable(0) diff --git a/types/global.d.ts b/types/global.d.ts index cceabfa..2f27c4d 100644 --- a/types/global.d.ts +++ b/types/global.d.ts @@ -12,7 +12,7 @@ interface Page { path: string teaser: teaserHomepage sectionHomepage: Row - rows: Row[] + rows: outerRow[] id: string } @@ -22,7 +22,9 @@ interface teaserHomepage { teaserTitle: string teaserDescription: string } - +interface outerRow { + row: Row +} interface Row { topTitle: string subTitle: string @@ -43,12 +45,13 @@ interface Column { | "nestedCard" | "topDown" | "personPreview" - | "boxList" - | "extendableBox" + | "boxlist" + | "extendableBoxes" | "textLink" - | "iconBlock" + | "iconBlocks" | "pageLinkBlocks" - | "publication" + | "publications" + | "networkEvents" image?: FileField iconCycleSquare?: IconCycleSquare @@ -57,15 +60,15 @@ interface Column { textLink: TextLink infoBoard: InfoBoard worldCard: WorldCard - nestedCard: NestedCard + nestedCard: NestedCard[] topDown: TopDown - personPreview: PersonPreview + personPreview: PersonPreview[] boxList: BoxList - extendableBox: ExtendableBox + extendableBoxes: ExtendableBox[] iconBlocks: iconBlock[] pageLinkBlocks: pageLinkBlock[] networkEvents: NetworkEvent[] - publication: Publication + publications: Publication[] } interface Publication { @@ -74,7 +77,7 @@ interface Publication { } interface NetworkEvent { - beginnDate: Date + beginDate: Date endDate: Date title: string file: FileField @@ -133,19 +136,20 @@ interface TopDown { } interface TopDownRow { - initial: string + inital: string rest: string description: string } interface PersonPreview { - initalImage: FileField + initialImage: FileField hoverImage: FileField name: string + link: string } interface BoxList { - names: { + boxes: { name: string }[] } @@ -153,6 +157,8 @@ interface BoxList { interface ExtendableBox { title: string text: string + emailButton: boolean + emailSubject: string } interface FileField { @@ -168,7 +174,7 @@ interface TextLink { interface Navigation { tree: number - elemente: NavElement[] + pages: NavElement[] } interface NavElement {