From dee863b5e0812f95db4caf367983864a74b63ccc Mon Sep 17 00:00:00 2001 From: Oscar Najera Date: Mon, 6 Jan 2025 01:05:02 +0100 Subject: translate posts listing --- layouts/404.html | 4 ++-- layouts/_default/search.html | 2 +- layouts/_default/single.html | 2 +- layouts/index.html | 8 ++++---- layouts/partials/metadata.html | 15 ++++++++------- layouts/partials/post.html | 28 +++++++++++++++------------- layouts/project/single.html | 2 +- 7 files changed, 32 insertions(+), 29 deletions(-) (limited to 'layouts') diff --git a/layouts/404.html b/layouts/404.html index 0e11279..2d722bb 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -10,7 +10,7 @@ {{ $query := where (where (where (where site.RegularPages.ByDate.Reverse "Title" "!=" "") "Kind" "in" (slice "page" "section")) "Params.private" "!=" true) "Permalink" "!=" "" }} {{ $count := len $query }} {{ if gt $count 0 }} -

{{ T "recent_pages" }}

+

{{ T "recent_pages" }}

{{ end }} -

+

{{ T "try_search" }}

diff --git a/layouts/_default/search.html b/layouts/_default/search.html index e297398..726ae68 100644 --- a/layouts/_default/search.html +++ b/layouts/_default/search.html @@ -29,7 +29,7 @@
-

+

diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 00132c3..66f67ea 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -5,7 +5,7 @@ {{ with .Params.subtitle }} -

{{ . }}

+

{{ . }}

{{ end }} {{ partial "meta_links.html" . }} diff --git a/layouts/index.html b/layouts/index.html index fd160ce..7f7b5dd 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -5,20 +5,20 @@ {{ define "main" }} {{ range (where .Pages "Type" "in" .Site.Params.mainSections).ByWeight }} {{ if gt (len .Pages) 0 }} -
+

{{ .Title }}

{{ range first 3 .Pages.ByPublishDate.Reverse }} {{ partial "post.html" . }} {{ end }} -
+ diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html index 668ac20..8679be6 100644 --- a/layouts/partials/metadata.html +++ b/layouts/partials/metadata.html @@ -1,13 +1,13 @@ {{ $dateTime := .PublishDate.Format "2006-01-02" }} {{ $dateFormat := .Site.Params.dateFormat | default ":date_medium" }} -
+
{{ T "author_by" }} — {{ range .Params.authors }} {{ $name := . }} {{ $path := printf "/%s/%s" "authors" ( $name | urlize ) }} {{ with $.GetPage $path }} {{ if isset .Params "name" }} - + {{- default $name .Params.name -}} {{ else }} @@ -30,17 +30,18 @@ {{ end }} {{ if eq .Section "post" }} - | {{ .ReadingTime }} + | + {{ .ReadingTime }} {{ i18n "minute_read" }} {{ end }} {{ with .GetTerms "tags" }} | - + {{ range . }} - + {{- .Title -}} {{ end }} @@ -48,11 +49,11 @@ {{ with .GetTerms "categories" }} | - + {{ range . }} - + {{- .Title -}} {{ end }} diff --git a/layouts/partials/post.html b/layouts/partials/post.html index 637381b..a7e62ef 100644 --- a/layouts/partials/post.html +++ b/layouts/partials/post.html @@ -1,7 +1,7 @@ -
+
{{ partial "meta_links.html" . }} - -
+ +
{{ $image := "" }} {{ if (.Resources.ByType "image").GetMatch "featured*" }} {{ $image = (.Resources.ByType "image").GetMatch "*featured*" }} @@ -9,24 +9,26 @@ {{ $image = resources.Get (index .Params.images 0) }} {{ end }} {{ with $image }} -
+
{{ end }} -

{{ .Title }}

-
diff --git a/layouts/project/single.html b/layouts/project/single.html index c48a2cf..a177a10 100644 --- a/layouts/project/single.html +++ b/layouts/project/single.html @@ -5,7 +5,7 @@ {{ with .Params.subtitle }} -

{{ . }}

+

{{ . }}

{{ end }} {{ partial "meta_links.html" . }} -- cgit v1.2.3