From de6968f3d80fffec806868014deb94ea9ca8f050 Mon Sep 17 00:00:00 2001 From: Mario Linz Date: Thu, 9 Jun 2022 10:57:55 +0200 Subject: [PATCH] =?UTF-8?q?Generelle=20Angaben=20zum=20Ver=C3=B6ffentlichu?= =?UTF-8?q?ngs-Datum=20und=20dessen=20Check-Interval=20werden=20nun=20ber?= =?UTF-8?q?=C3=BCcksichtigt=20auf=20der=20Seite=20mit=20abgefragt.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/collections/fields/_article.yml | 48 ++++------ src/components/widgets/Article.svelte | 104 ++++++++++++++++++++- src/css/theme-2022/components/article.less | 3 +- 3 files changed, 119 insertions(+), 36 deletions(-) diff --git a/api/collections/fields/_article.yml b/api/collections/fields/_article.yml index f0e36ed..b6acdba 100644 --- a/api/collections/fields/_article.yml +++ b/api/collections/fields/_article.yml @@ -5,7 +5,7 @@ meta: label: de: Einstellungen zum Artikel en: Article Setings - activeTab: 1 + activeTab: 0 subFields: - name: general type: object @@ -31,7 +31,6 @@ subFields: label: de: Datum der Veröffentlichung en: Release Date - css: "grid grid-50" subFields: - name: from type: string @@ -51,6 +50,19 @@ subFields: label: de: Datum (bis) en: Date (until) + - name: interval + type: string + meta: + inputProps: + placeholder: 60000 + label: + { + de: "Zeit-Interval für Live-Check der Veröffentlichung.", + en: "Time interval for publication live check", + } + helperText: + de: "Der Zeit-Interval wird in ms (Millisekunden) angebeben. Standard ist 60000 (60sec)" + en: "The time interval is specified in ms (milliseconds). Default is 60000 (60sec)" - name: tags type: string[] meta: @@ -190,34 +202,12 @@ subFields: label: de: Erscheinungsbild en: Appearance - defaultValue: top-left + defaultValue: default 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: "default", name: { de: "Artikelbild oben links", en: "Article picture above left" } } - - { id: "top-right", name: { de: "Artikelbild oben rechts", en: "Article picture above right" } } + - { id: "top", name: { de: "Artikelbild oben", en: "Article picture top" } } + - { id: "right", name: { de: "Artikelbild rechts", en: "Article picture right" } } + - { id: "bottom", name: { de: "Artikelbild unten", en: "Article picture left" } } + - { id: "default", name: { de: "Artikelbild links", en: "Article picture left" } } - name: properties type: object meta: diff --git a/src/components/widgets/Article.svelte b/src/components/widgets/Article.svelte index 7206628..d549d7d 100644 --- a/src/components/widgets/Article.svelte +++ b/src/components/widgets/Article.svelte @@ -1,7 +1,7 @@ -{#if article} -
- {#if article?.layout?.variant === "default"} +{#if article && published} +
+ {#if article?.layout?.variant === "top"} {#if article?.content?.types?.media?.files?.length} {@html article?.content?.types?.details} {/if} - {:else if article?.layout?.variant === "left"} + {:else if article?.layout?.variant === "right"} +
+
+ {#if article?.content?.title} +
{@html article?.content?.title}
+ {/if} + + {#if article?.content?.subtitle} +
{@html article?.content?.subtitle}
+ {/if} + + {#if article?.content?.types?.teaser} + + {/if} + + {#if article?.content?.types?.details && showDetails} +
{@html article?.content?.types?.details}
+ {/if} +
+
+ {#if article?.content?.types?.media?.files?.length} + + {/if} +
+
+ {:else if article?.layout?.variant === "bottom"} + {#if article?.content?.title} +
{@html article?.content?.title}
+ {/if} + + {#if article?.content?.subtitle} +
{@html article?.content?.subtitle}
+ {/if} + + {#if article?.content?.types?.teaser} + + {/if} + + {#if article?.content?.types?.details && showDetails} +
{@html article?.content?.types?.details}
+ {/if} + {#if article?.content?.types?.media?.files?.length} + + {/if} + {:else if article?.layout?.variant === "left" || article?.layout?.variant === "default"}
{#if article?.content?.types?.media?.files?.length} diff --git a/src/css/theme-2022/components/article.less b/src/css/theme-2022/components/article.less index 06d9c7b..f9ce54b 100644 --- a/src/css/theme-2022/components/article.less +++ b/src/css/theme-2022/components/article.less @@ -1,8 +1,7 @@ article, .article { overflow-wrap: anywhere; - background: rgba(0, 0, 0, 0.03); - padding: @space-md; + border: 1px dashed @on-background; & ~ article, & ~ .article {