From a901b3da36d4076fb8f3dd62989fb9bd3595fb1f Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 7 Feb 2022 11:53:45 +0100 Subject: [PATCH] fix: fix usage of terms and taxonomies list templates (#330) --- i18n/de.yaml | 4 +++ i18n/en.yaml | 4 +++ .../list.html => _default/taxonomy.html} | 8 +++-- layouts/_default/terms.html | 31 +++++++++++++++++++ layouts/partials/posts/metadata.html | 10 +----- layouts/posts/list.html | 2 +- src/icons/star.svg | 5 +++ src/icons/tag.svg | 5 +++ src/icons/tags.svg | 5 --- 9 files changed, 56 insertions(+), 18 deletions(-) rename layouts/{taxonomy/list.html => _default/taxonomy.html} (89%) create mode 100644 layouts/_default/terms.html create mode 100644 src/icons/star.svg create mode 100644 src/icons/tag.svg delete mode 100644 src/icons/tags.svg diff --git a/i18n/de.yaml b/i18n/de.yaml index 4ff1dc2..c45f870 100644 --- a/i18n/de.yaml +++ b/i18n/de.yaml @@ -29,6 +29,10 @@ posts_read_time: one: "Eine Minute Lesedauer" other: "{{ . }} Minuten Lesedauer" posts_update_prefix: Aktualisiert am +posts_count: + one: "Ein Artikel" + other: "{{ . }} Artikel" +posts_tagged_with: Alle Artikel mit dem Tag '{{ . }}' footer_build_with: > Entwickelt mit Hugo und diff --git a/i18n/en.yaml b/i18n/en.yaml index 9254e3d..4f1e4e9 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -29,6 +29,10 @@ posts_read_time: one: "One minute to read" other: "{{ . }} minutes to read" posts_update_prefix: Updated on +posts_count: + one: "One post" + other: "{{ . }} posts" +posts_tagged_with: All posts tagged with '{{ . }}' footer_build_with: > Built with Hugo and diff --git a/layouts/taxonomy/list.html b/layouts/_default/taxonomy.html similarity index 89% rename from layouts/taxonomy/list.html rename to layouts/_default/taxonomy.html index 757b496..5b32a6b 100644 --- a/layouts/taxonomy/list.html +++ b/layouts/_default/taxonomy.html @@ -1,14 +1,16 @@ {{ define "main" }} {{ range .Paginator.Pages }} -
+

{{ partial "utils/title" . }}

-
+ +
{{ .Summary }}
+
{{ if .Truncated }} {{ .name }} diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html new file mode 100644 index 0000000..5fa5ee9 --- /dev/null +++ b/layouts/_default/terms.html @@ -0,0 +1,31 @@ +{{ define "main" }} + {{ range .Paginator.Pages.ByTitle }} + + {{ end }} +{{ end }} diff --git a/layouts/partials/posts/metadata.html b/layouts/partials/posts/metadata.html index df01cce..3754f0d 100644 --- a/layouts/partials/posts/metadata.html +++ b/layouts/partials/posts/metadata.html @@ -38,17 +38,9 @@ {{ .name }} {{ end }} - -{{ define "post-author" }} - -{{ end }} diff --git a/layouts/posts/list.html b/layouts/posts/list.html index 757b496..25a77eb 100644 --- a/layouts/posts/list.html +++ b/layouts/posts/list.html @@ -37,7 +37,7 @@ {{ .name }} diff --git a/src/icons/star.svg b/src/icons/star.svg new file mode 100644 index 0000000..aa5bacd --- /dev/null +++ b/src/icons/star.svg @@ -0,0 +1,5 @@ + + +star + + diff --git a/src/icons/tag.svg b/src/icons/tag.svg new file mode 100644 index 0000000..9cbcdc4 --- /dev/null +++ b/src/icons/tag.svg @@ -0,0 +1,5 @@ + + +tag + + diff --git a/src/icons/tags.svg b/src/icons/tags.svg deleted file mode 100644 index 622ed1b..0000000 --- a/src/icons/tags.svg +++ /dev/null @@ -1,5 +0,0 @@ - - -tags - -