diff options
| author | Arne Rief <riearn@proton.me> | 2026-06-15 17:30:13 +0200 |
|---|---|---|
| committer | Arne Rief <riearn@proton.me> | 2026-06-15 17:30:13 +0200 |
| commit | 9bd9c28cae452b43b4fcece040d06728990c2c26 (patch) | |
| tree | d7d9155478a930376c4e647ed2f855af9bf5f242 | |
| parent | d6806ebb4dd1baacaf9414f67d34625978e0fdb9 (diff) | |
Fix pagination langTranslate, HTML cleanup
| -rw-r--r-- | assets/css/list-navigation.css | 5 | ||||
| -rw-r--r-- | i18n/de.toml | 2 | ||||
| -rw-r--r-- | i18n/en.toml | 2 | ||||
| -rw-r--r-- | layouts/_partials/list/pagination.html | 6 | ||||
| -rw-r--r-- | layouts/all-posts.html | 2 | ||||
| -rw-r--r-- | layouts/single.html | 2 | ||||
| -rw-r--r-- | layouts/tags/list.html | 4 | ||||
| -rw-r--r-- | layouts/tags/term.html | 4 |
8 files changed, 12 insertions, 15 deletions
diff --git a/assets/css/list-navigation.css b/assets/css/list-navigation.css index 64c3464..6c22214 100644 --- a/assets/css/list-navigation.css +++ b/assets/css/list-navigation.css @@ -6,10 +6,6 @@ margin: var(--margin-padding-Y-big); } -.pagination__current { - margin-bottom: 0; -} - .recent-posts__view-all-link, .tag-page__view-all-link { display: block; @@ -20,4 +16,3 @@ .tags-index__list > li { margin-bottom: var(--gap-small); } - diff --git a/i18n/de.toml b/i18n/de.toml index 7051518..908e600 100644 --- a/i18n/de.toml +++ b/i18n/de.toml @@ -28,7 +28,7 @@ page_current = "Aktuelle Seite" page_go_to = "Gehe zu Seite" page_navigation = "Seiten Navigation" page_next = "Nächste Seite" -page_position = "Seite {{ . }} von {{ . }}" +page_position = "Seite {{ .current }} von {{ .total }}" page_previous = "Vorherige Seite" # Posts diff --git a/i18n/en.toml b/i18n/en.toml index 826674e..2a82946 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -28,7 +28,7 @@ page_current = "Current page" page_go_to = "Go to page" page_navigation = "Page navigation" page_next = "Next page" -page_position = "Page {{ . }} of {{ . }}" +page_position = "Page {{ .current }} of {{ .total }}" page_previous = "Previous page" # Posts diff --git a/layouts/_partials/list/pagination.html b/layouts/_partials/list/pagination.html index dfe8178..75b5cae 100644 --- a/layouts/_partials/list/pagination.html +++ b/layouts/_partials/list/pagination.html @@ -11,9 +11,9 @@ </a> {{- end }} - <p class="pagination__current"> - {{ lang.Translate "page_position" $paginator.PageNumber $paginator.TotalPages | default (printf "Page %d of %d" $paginator.PageNumber $paginator.TotalPages) }} - </p> + <span class="pagination__current"> + {{ lang.Translate "page_position" (dict "current" $paginator.PageNumber "total" $paginator.TotalPages) | default (printf "Page %d of %d" $paginator.PageNumber $paginator.TotalPages) }} + </span> {{- if $paginator.HasNext }} <a href="{{ $paginator.Next.URL }}" diff --git a/layouts/all-posts.html b/layouts/all-posts.html index 4a94ab6..5b42a9b 100644 --- a/layouts/all-posts.html +++ b/layouts/all-posts.html @@ -1,5 +1,5 @@ {{ define "main" }} -<section class="search-page"> +<section class="list-page"> <header class="all-posts__header"> <h1 class="all-posts__heading"> {{ .Title }} diff --git a/layouts/single.html b/layouts/single.html index e1728d3..e9d83da 100644 --- a/layouts/single.html +++ b/layouts/single.html @@ -15,9 +15,11 @@ {{ .Content }} </div> + {{- if ne .Params.excludeFromLists true }} <footer class="post__footer"> {{ partial "single/tags" . }} {{ partial "single/next-prev" . }} </footer> + {{- end }} </article> {{- end }} diff --git a/layouts/tags/list.html b/layouts/tags/list.html index 87f74de..0a346a5 100644 --- a/layouts/tags/list.html +++ b/layouts/tags/list.html @@ -1,6 +1,6 @@ {{- /* List of All Tags */ -}} {{- define "main" }} -<article class="tags-index"> +<section class="tags-index"> <header class="tags-index__header"> <h1 class="tags-index__headline"> {{ lang.Translate "tags_all" | default "All Tags" }} @@ -33,5 +33,5 @@ </p> {{- end }} </section> -</article> +</section> {{- end }} diff --git a/layouts/tags/term.html b/layouts/tags/term.html index f4dfd73..8cd73f4 100644 --- a/layouts/tags/term.html +++ b/layouts/tags/term.html @@ -1,6 +1,6 @@ {{- /* List of All Articles for a Specific Tag */ -}} {{- define "main" }} -<article class="tag-page"> +<section class="list-page"> <header class="tag-page__header"> <h1 class="tag-page__headline"> <span class="tag-page__label"> @@ -38,5 +38,5 @@ </a> </nav> </footer> -</article> +</section> {{- end }} |
