From fde0bdf421571a9cf947df5ba648ebe46b8d5c8b Mon Sep 17 00:00:00 2001 From: Gregory Trolliet Date: Fri, 8 Sep 2023 14:19:38 +0200 Subject: [PATCH 1/6] [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" . }} From 18d74969beb3b813055ce6a92f93b70788ecd250 Mon Sep 17 00:00:00 2001 From: Gregory Trolliet Date: Fri, 8 Sep 2023 14:20:27 +0200 Subject: [PATCH 2/6] Fix the RSS url --- layouts/partials/header.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 021136b..c107966 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -20,7 +20,7 @@ {{ end }} - + {{ if and (.Site.Params.favicon) (fileExists (print "static/images/" .Site.Params.favicon)) }} {{ $name := .Site.Params.favicon }} {{ $splitted := split $name "." }} From 45f889419ee21ec47c00d0e8b1d33b1d4c4a4636 Mon Sep 17 00:00:00 2001 From: Gregory Trolliet Date: Fri, 8 Sep 2023 14:21:36 +0200 Subject: [PATCH 3/6] [THEME] Remove the footer --- layouts/_default/single.html | 1 - layouts/archives/single.html | 1 - 2 files changed, 2 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 38bc8ac..0296cf9 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -10,7 +10,6 @@ {{ .Content }} - {{ partial "footer.html" . }} diff --git a/layouts/archives/single.html b/layouts/archives/single.html index 9c43e46..a219df3 100644 --- a/layouts/archives/single.html +++ b/layouts/archives/single.html @@ -57,7 +57,6 @@ {{ partial "article-footer.html" . }} - {{ partial "footer.html" . }} From 4bc3a9824ebe665d0bc8a3f0ef0a5b02f600b362 Mon Sep 17 00:00:00 2001 From: Gregory Trolliet Date: Fri, 8 Sep 2023 14:22:04 +0200 Subject: [PATCH 4/6] [THEME] Remove the footer --- layouts/index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layouts/index.html b/layouts/index.html index 950f532..e2a4b7e 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -9,13 +9,15 @@

{{ .Title }}

+ + {{ partial "social.html" . }} +
{{ .Summary }}
{{ end }} {{ end }} - {{ partial "footer.html" . }} From 65e10d6e7c20acf3864fe405b97390f12cfbd748 Mon Sep 17 00:00:00 2001 From: Gregory Trolliet Date: Fri, 8 Sep 2023 14:23:10 +0200 Subject: [PATCH 5/6] [THEME] Move the social medias in the middle of the home page --- layouts/partials/author.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layouts/partials/author.html b/layouts/partials/author.html index 9fe0fe5..2199bb5 100644 --- a/layouts/partials/author.html +++ b/layouts/partials/author.html @@ -6,4 +6,6 @@

{{ .Site.Params.author }}

{{ .Site.Params.info }}

+ {{ partial "social.html" . }} + From 05907377febe5e6e8f34d36e9c34a02bdf7e2e77 Mon Sep 17 00:00:00 2001 From: Gregory Trolliet Date: Fri, 8 Sep 2023 14:23:33 +0200 Subject: [PATCH 6/6] [THEME] Fix the gallery for the archives --- layouts/archives/single.html | 17 +++++++++++------ static/css/style.css | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/layouts/archives/single.html b/layouts/archives/single.html index a219df3..596ca63 100644 --- a/layouts/archives/single.html +++ b/layouts/archives/single.html @@ -11,23 +11,28 @@ {{ $img := newScratch }} {{ $folder := (print "/content/" .File.Dir "gallery/") }} {{ $files := readDir $folder }} + {{ $img.Set "max" 0 }} {{ range sort $files "Name" "asc" }} {{ if not .IsDir }} - {{ $img.Add "list" (slice .Name) }} + {{ if not (in .Name "thumb") }} + {{ $img.Add "list" (slice .Name) }} + {{ $img.Set "max" (add ($img.Get "max") 1) }} + {{ end }} {{ end }} {{ end }} - {{ with ($img.Get "list") }} - {{ $img.Set "max" (add 1 (int (index (split (index (split (index (last 1 .) 0) ".") 0) "img") 1))) }} - {{ end }} {{ range $index, $val := $img.Get "list" }} {{ $curr := index (split $val ".") 0 }} {{ $prec := mod (add (sub $index 1) ($img.Get "max")) ($img.Get "max") }} {{ $next := mod (add $index 1) ($img.Get "max") }} - + + + + + -