From fde0bdf421571a9cf947df5ba648ebe46b8d5c8b Mon Sep 17 00:00:00 2001 From: Gregory Trolliet Date: Fri, 8 Sep 2023 14:19:38 +0200 Subject: [PATCH] [THEME] Add two categories, based on article categorie --- i18n/fr.toml | 7 +++++++ layouts/archives/list.html | 18 ++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/i18n/fr.toml b/i18n/fr.toml index 6feb502..2a60565 100644 --- a/i18n/fr.toml +++ b/i18n/fr.toml @@ -10,6 +10,13 @@ other = "tags" one = "archive" other = "archives" +[shows] +one = "spectacle" +other = "spectacles" +[movies] +one = "film" +other = "films" + [reading_time] one = "Une minute de lecture" other = "{{ .Count }} minutes de lecture" diff --git a/layouts/archives/list.html b/layouts/archives/list.html index ad45179..1e1bdec 100644 --- a/layouts/archives/list.html +++ b/layouts/archives/list.html @@ -10,15 +10,29 @@ {{ i18n "articles" | title }} +

+ {{ i18n "shows" | title }} +

{{- range .Paginator.Pages -}} - {{- .Render "li" -}} + {{ if in .Params.categories "Spectacle" }} + {{- .Render "li" -}} + {{- end -}} + {{- end -}} +
+

+ {{ i18n "movies" | title }} +

+
+ {{- range .Paginator.Pages -}} + {{ if in .Params.categories "Film" }} + {{- .Render "li" -}} + {{- end -}} {{- end -}}
{{ partial "pagination.html" . }} - {{ partial "footer.html" . }}