From 652f15830dd0b5119211316e768198e4609081ac Mon Sep 17 00:00:00 2001 From: Mario Linz Date: Wed, 15 Jun 2022 11:06:47 +0200 Subject: [PATCH] =?UTF-8?q?M=C3=B6glichkeit,=20in=20die=20Artikel-Details?= =?UTF-8?q?=20zu=20springen=20implementiert,=20ohne=20einen=20extra=20URL?= =?UTF-8?q?=20Pfad=20zu=20ben=C3=B6tigen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/collections/articles.yml | 6 +- .../{ => article}/_article-attachments.yml | 0 .../{ => article}/_article-layout-margin.yml | 0 .../{ => article}/_article-layout-padding.yml | 0 .../fields/{ => article}/_article-link.yml | 0 .../fields/{ => article}/_article-media.yml | 0 .../fields/{ => article}/_article.yml | 2 +- src/components/routes/Content.svelte | 64 ++++++++++++++++--- src/components/widgets/Article.svelte | 19 +++++- src/components/widgets/Navigation.svelte | 4 +- src/css/theme-2022/components/article.less | 1 + 11 files changed, 78 insertions(+), 18 deletions(-) rename api/collections/fields/{ => article}/_article-attachments.yml (100%) rename api/collections/fields/{ => article}/_article-layout-margin.yml (100%) rename api/collections/fields/{ => article}/_article-layout-padding.yml (100%) rename api/collections/fields/{ => article}/_article-link.yml (100%) rename api/collections/fields/{ => article}/_article-media.yml (100%) rename api/collections/fields/{ => article}/_article.yml (99%) diff --git a/api/collections/articles.yml b/api/collections/articles.yml index 96b6267..bed29df 100644 --- a/api/collections/articles.yml +++ b/api/collections/articles.yml @@ -114,10 +114,6 @@ permissions: # update: # type: javascript # file: hooks/article/put_return.js -# delete: -# return: -# type: javascript -# file: hooks/article/delete_return.js fields: - - !include fields/_article.yml + - !include fields/article/_article.yml diff --git a/api/collections/fields/_article-attachments.yml b/api/collections/fields/article/_article-attachments.yml similarity index 100% rename from api/collections/fields/_article-attachments.yml rename to api/collections/fields/article/_article-attachments.yml diff --git a/api/collections/fields/_article-layout-margin.yml b/api/collections/fields/article/_article-layout-margin.yml similarity index 100% rename from api/collections/fields/_article-layout-margin.yml rename to api/collections/fields/article/_article-layout-margin.yml diff --git a/api/collections/fields/_article-layout-padding.yml b/api/collections/fields/article/_article-layout-padding.yml similarity index 100% rename from api/collections/fields/_article-layout-padding.yml rename to api/collections/fields/article/_article-layout-padding.yml diff --git a/api/collections/fields/_article-link.yml b/api/collections/fields/article/_article-link.yml similarity index 100% rename from api/collections/fields/_article-link.yml rename to api/collections/fields/article/_article-link.yml diff --git a/api/collections/fields/_article-media.yml b/api/collections/fields/article/_article-media.yml similarity index 100% rename from api/collections/fields/_article-media.yml rename to api/collections/fields/article/_article-media.yml diff --git a/api/collections/fields/_article.yml b/api/collections/fields/article/_article.yml similarity index 99% rename from api/collections/fields/_article.yml rename to api/collections/fields/article/_article.yml index 001275b..1277e5c 100644 --- a/api/collections/fields/_article.yml +++ b/api/collections/fields/article/_article.yml @@ -24,7 +24,7 @@ subFields: helperText: de: "Der Artikel wird auf der Seite angezeigt." en: "This article is displayed on the page." - - !include _locale.yml + - !include ../_locale.yml - name: tags type: string[] meta: diff --git a/src/components/routes/Content.svelte b/src/components/routes/Content.svelte index a88d114..8a21d7e 100644 --- a/src/components/routes/Content.svelte +++ b/src/components/routes/Content.svelte @@ -1,17 +1,19 @@ @@ -114,12 +165,9 @@ {#if loading} +{:else if article} +
{:else if content} - {:else}
diff --git a/src/components/widgets/Article.svelte b/src/components/widgets/Article.svelte index d690cfb..f0fe806 100644 --- a/src/components/widgets/Article.svelte +++ b/src/components/widgets/Article.svelte @@ -1,7 +1,6 @@