From c00f5a9fb3720de62a4e7cea5f33d3abf2e8e95a Mon Sep 17 00:00:00 2001 From: Mario Linz Date: Sun, 20 Mar 2022 15:02:40 +0100 Subject: [PATCH] =?UTF-8?q?Prototyp=20-=20Neue=20allgemeine=20Collection?= =?UTF-8?q?=20f=C3=BCr=20Artikel.=20Durch=20das=20Svend-Walter=20Projekt?= =?UTF-8?q?=20und=20ein=20paaar=20Gespr=C3=A4chen=20mit=20Daniela,=20was?= =?UTF-8?q?=20in=20einem=20Projekt=20typischerwise=20f=C3=BCr=20typische?= =?UTF-8?q?=20Inhalts-Artikel=20ben=C3=B6tigt=20wird,=20ist=20diese=20Coll?= =?UTF-8?q?ection=20entstanden.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/collections/_article.yml | 255 +++++++++++++++++++++++++++++++---- api/collections/articles.yml | 18 +-- api/collections/content.yml | 4 +- 3 files changed, 241 insertions(+), 36 deletions(-) diff --git a/api/collections/_article.yml b/api/collections/_article.yml index 7542806..ce61e62 100644 --- a/api/collections/_article.yml +++ b/api/collections/_article.yml @@ -2,10 +2,72 @@ name: article type: tabs meta: label: - de: Inhalt des Artikel - en: Content of Article + de: Einstellungen zum Artikel + en: Article Setings activeTab: 0 subFields: + - name: general + type: object + meta: + label: + de: Allgemein + en: General + css: + subFields: + - name: public + type: boolean + meta: + label: + de: Veröffentlicht + en: Public + helperText: + de: "Der Artikel wird auf der Seite angezeigt." + en: "This article is displayed on the page." + - name: publish_date + type: object + meta: + label: + de: Datum der Veröffentlichung + en: Release Date + css: "grid grid-50" + subFields: + - name: public_from + type: date + meta: + inputProps: + type: "datetime-local" + label: + de: Datum (ab) + en: Date (from) + - name: public_until + type: date + meta: + inputProps: + type: "datetime-local" + label: + de: Datum (bis) + en: Date (until) + - name: position + type: string + meta: + widget: select + label: + de: Position auf der Seite + en: Position on page + defaultValue: [] + choices: + - { id: "content", name: "Inhaltsbereich" } + - { id: "sidebar", name: "Sidebar" } + - name: sort + type: number + meta: + inputProps: + type: number + placeholder: 0 + label: { de: "Sortierung", en: "Sorting" } + helperText: + de: "1...5...10...100" + en: "1...5...10...100" - name: content type: object meta: @@ -14,6 +76,10 @@ subFields: en: Content css: subFields: + - name: slug + type: string + meta: + label: { de: "Permalink", en: "Permalink" } - name: title type: string meta: @@ -69,6 +135,10 @@ subFields: type: file meta: label: { de: "Datei", en: "File" } + - name: caption + type: string + meta: + label: { de: "Bildunterschrift", en: "Caption" } - name: contentAttachments type: object meta: @@ -95,45 +165,178 @@ subFields: meta: label: { de: "", en: "" } - name: layout - type: object + type: tabs meta: label: de: Layout en: Layout css: subFields: - - name: meta + - name: variant + type: string + meta: + widget: select + label: + de: Erscheinungsbild + en: Appearance + defaultValue: ["_self"] + choices: + - { id: "top", name: { de: "Artikelbild oben (volle Breite)", en: "Article picture top (full width)" } } + - { id: "right", name: { de: "Artikelbild rechts (volle Höhe)", en: "Article picture right (full height)" } } + - { id: "bottom", name: { de: "Artikelbild unten (volle Breite)", en: "Article picture left (full width)" } } + - { id: "left", name: { de: "Artikelbild links (volle Höhe)", en: "Article picture left (full height)" } } + - { id: "after-teaser", name: { de: "Artikelbild unter Teaser (volle Breite)" , en: "Article picture under teaser (full width)" } } + - { id: "top-left", name: { de: "Artikelbild oben links", en: "Article picture above left" } } + - { id: "top-right", name: { de: "Artikelbild oben rechts", en: "Article picture above right" } } + - { id: "bottom-left", name: { de: "Artikelbild unten links", en: "Article picture below left" } } + - { id: "bottom-right", name: { de: "Artikelbild unten rechts", en: "Article picture below right" } } + - name: margin + type: object + meta: + label: { de: "Abstand nach außen (Margin)", en: "Distance to the outside (Margin)" } + subFields: + - name: top + type: string + meta: + widget: select + label: + de: Oben + en: Top + choices: + - { id: "", name: "Kein Abstand" } + - { id: "mt-xs", name: "Sehr kleiner Abstand" } + - { id: "mt-sm", name: "Kleiner Abstand" } + - { id: "mt-md", name: "Normal" } + - { id: "mt-lg", name: "Großer Abstand" } + - { id: "mt-xl", name: "Sehr großer Abstand" } + - name: right + type: string + meta: + widget: select + label: + de: Rechts + en: Right + choices: + - { id: "", name: "Kein Abstand" } + - { id: "mr-xs", name: "Sehr kleiner Abstand" } + - { id: "mr-sm", name: "Kleiner Abstand" } + - { id: "mr-md", name: "Normal" } + - { id: "mr-lg", name: "Großer Abstand" } + - { id: "mr-xl", name: "Sehr großer Abstand" } + - name: bottom + type: string + meta: + widget: select + label: + de: Unten + en: Bottom + choices: + - { id: "", name: "Kein Abstand" } + - { id: "mb-xs", name: "Sehr kleiner Abstand" } + - { id: "mb-sm", name: "Kleiner Abstand" } + - { id: "mb-md", name: "Normal" } + - { id: "mb-lg", name: "Großer Abstand" } + - { id: "mb-xl", name: "Sehr großer Abstand" } + - name: left + type: string + meta: + widget: select + label: + de: Links + en: Left + choices: + - { id: "", name: "Kein Abstand" } + - { id: "ml-xs", name: "Sehr kleiner Abstand" } + - { id: "ml-sm", name: "Kleiner Abstand" } + - { id: "ml-md", name: "Normal" } + - { id: "ml-lg", name: "Großer Abstand" } + - { id: "ml-xl", name: "Sehr großer Abstand" } + - name: padding + type: object + meta: + label: { de: "Abstand nach innen (Padding)", en: "Distance inside (Padding)" } + subFields: + - name: top + type: string + meta: + widget: select + label: + de: Oben + en: Top + choices: + - { id: "", name: "Kein Abstand" } + - { id: "pt-xs", name: "Sehr kleiner Abstand" } + - { id: "pt-sm", name: "Kleiner Abstand" } + - { id: "pt-md", name: "Normal" } + - { id: "pt-lg", name: "Großer Abstand" } + - { id: "pt-xl", name: "Sehr großer Abstand" } + - name: right + type: string + meta: + widget: select + label: + de: Rechts + en: Right + choices: + - { id: "", name: "Kein Abstand" } + - { id: "pr-xs", name: "Sehr kleiner Abstand" } + - { id: "pr-sm", name: "Kleiner Abstand" } + - { id: "pr-md", name: "Normal" } + - { id: "pr-lg", name: "Großer Abstand" } + - { id: "pr-xl", name: "Sehr großer Abstand" } + - name: bottom + type: string + meta: + widget: select + label: + de: Unten + en: Bottom + choices: + - { id: "", name: "Kein Abstand" } + - { id: "pb-xs", name: "Sehr kleiner Abstand" } + - { id: "pb-sm", name: "Kleiner Abstand" } + - { id: "pb-md", name: "Normal" } + - { id: "pb-lg", name: "Großer Abstand" } + - { id: "pb-xl", name: "Sehr großer Abstand" } + - name: left + type: string + meta: + widget: select + label: + de: Links + en: Left + choices: + - { id: "", name: "Kein Abstand" } + - { id: "pl-xs", name: "Sehr kleiner Abstand" } + - { id: "pl-sm", name: "Kleiner Abstand" } + - { id: "pl-md", name: "Normal" } + - { id: "pl-lg", name: "Großer Abstand" } + - { id: "pl-xl", name: "Sehr großer Abstand" } + - name: link type: object meta: label: - de: Meta - en: Meta + de: Verlinkung + en: Link css: subFields: - - name: metaTitle + - name: url type: string meta: - label: - { - de: "Erweitert den Titel der Webseite für diesen Artikel", - en: "Expands the title of the web page for this article", - } - - name: metaDescription + label: { de: "Ziel-URL", en: "Target URL" } + - name: text type: string meta: - label: - { - de: "Erweitert die Beschreibung der Webseite für diesen Artikel", - en: "Expands the description of the web page for this item", - } - - name: metaKeywords + label: { de: "Link-Beschriftung", en: "Link-Text" } + - name: target type: string meta: + widget: select label: - { - de: "Erweitert die SEO / Schlüsselwörter für diesen Artikel", - en: "Expands the SEO / keywords for this article", - } - helperText: - de: "Beispiel: Stichwort1, Stichwort2, Stichwort3" - en: "Example: keyword1, keyword2, keyword3" + de: Zielfenster + en: Target + defaultValue: ["_self"] + choices: + - { id: "_self", name: "(Standardwert) gleicher Tab oder Seite" } + - { id: "_blank", name: "Neuer Tab oder Fenster" } + - { id: "_parent", name: "Elternfenster" } diff --git a/api/collections/articles.yml b/api/collections/articles.yml index bb12870..c18e989 100644 --- a/api/collections/articles.yml +++ b/api/collections/articles.yml @@ -10,7 +10,7 @@ meta: # Icon (Material UI) für den Navigationseintrag muiIcon: file-document-edit-outline # Standardsortierung der Liste - defaultSort: { field: "name", order: "ASC" } + defaultSort: { field: "article.general.sort", order: "ASC" } # Admin-Backend Ansichten defaultImageFilter: s views: @@ -19,18 +19,18 @@ meta: mediaQuery: "(max-width:599px)" primaryText: path columns: - - public - - image - - title - - position + - article.general.public + - article.content.title + - article.general.position + - article.general.sort # Desktop - type: table mediaQuery: "(min-width:600px)" columns: - - public - - image - - title - - position + - article.general.public + - article.content.title + - article.general.position + - article.general.sort imageFilter: xs: diff --git a/api/collections/content.yml b/api/collections/content.yml index 5666285..e09e2fa 100644 --- a/api/collections/content.yml +++ b/api/collections/content.yml @@ -23,6 +23,8 @@ meta: - type: simpleList mediaQuery: "(max-width:599px)" primaryText: path + columns: + - path # Desktop - type: table mediaQuery: "(min-width:600px)" @@ -106,6 +108,6 @@ fields: - name: blocks type: object[] meta: - label: { de: "Oben", en: "Top" } + label: { de: "Artikel dieser Seite", en: "Page Articles" } subFields: - !include _article.yml