From e09d6eb2a9f5f4860619670e89202ddac502fe0b Mon Sep 17 00:00:00 2001 From: robin Date: Sun, 19 Nov 2023 17:46:01 +0000 Subject: [PATCH] meta --- api/collections/content.yml | 35 +++++++++++++++++++ .../lib/components/Pagebuilder/Rows.svelte | 24 +++++++++++++ types/global.d.ts | 5 +++ 3 files changed, 64 insertions(+) diff --git a/api/collections/content.yml b/api/collections/content.yml index 988a6f8..a8428f8 100644 --- a/api/collections/content.yml +++ b/api/collections/content.yml @@ -23,6 +23,7 @@ meta: - source: active name: Aktiv filter: true + tablist: activeTab: general @@ -372,3 +373,37 @@ fields: - source: nextPage subFields: !include fieldLists/row.yml + + - name: meta + type: object + meta: + label: Meta Agaben + dependsOn: + eval: $.type == "page" + subFields: + - name: title + type: string + meta: + label: Titel + containerProps: + layout: + size: + default: "col-6" + small: "col-12" + large: "col-6" + - name: description + type: string + meta: + label: Beschreibung + widget: richtext + containerProps: + layout: + size: + default: "col-6" + small: "col-12" + large: "col-6" + - name: keywords + type: string + meta: + label: Schlüsselwörter + widget: richtext diff --git a/frontend/src/lib/components/Pagebuilder/Rows.svelte b/frontend/src/lib/components/Pagebuilder/Rows.svelte index 9f7ebef..120c3ab 100644 --- a/frontend/src/lib/components/Pagebuilder/Rows.svelte +++ b/frontend/src/lib/components/Pagebuilder/Rows.svelte @@ -49,6 +49,30 @@ } + + {#key page} + + {#if page?.pageTitle} + {page.pageTitle} + {:else if page?.meta?.title} + {page.meta.title} + {/if} + + + {#if page?.meta?.description} + + {/if} + + + {#if page?.meta?.keywords} + + {/if} + + {#if page?.active === false} + + {/if} + {/key} +
{#if page} {#if path == "/"}{/if} diff --git a/types/global.d.ts b/types/global.d.ts index cb399d2..503b223 100644 --- a/types/global.d.ts +++ b/types/global.d.ts @@ -19,6 +19,11 @@ interface Page { jobOffer: jobOffer rows: Row[] id: string + meta: { + title: string + description: string + keywords: string + } } interface teaserHomepage {