diff options
| author | Arne Rief <riearn@proton.me> | 2025-09-04 20:05:27 +0200 |
|---|---|---|
| committer | Arne Rief <riearn@proton.me> | 2025-09-04 20:05:27 +0200 |
| commit | 26df3baeb1afcb4c41ec99f940b237b9589caa42 (patch) | |
| tree | ee970fe0810d56a4b83174d282127593ba418547 /layouts/partials/list | |
| parent | 2204aa9db535af9b0c38487f74a56bd0ac9f07e2 (diff) | |
Ready for deployment
Diffstat (limited to 'layouts/partials/list')
| -rw-r--r-- | layouts/partials/list/pagination.html | 4 | ||||
| -rw-r--r-- | layouts/partials/list/post-card.html | 16 | ||||
| -rw-r--r-- | layouts/partials/list/recent-posts.html | 19 |
3 files changed, 21 insertions, 18 deletions
diff --git a/layouts/partials/list/pagination.html b/layouts/partials/list/pagination.html index 47d90ff..d1170e1 100644 --- a/layouts/partials/list/pagination.html +++ b/layouts/partials/list/pagination.html @@ -7,7 +7,7 @@ rel="prev" aria-label="{{ lang.Translate "pagination.previous_page" | default "Previous page" }}" > - ← {{ lang.Translate "common.previous" | default "Previous" }} + ← {{ lang.Translate "common.previous" | default "Previous" }} </a> {{- end }} @@ -21,7 +21,7 @@ rel="next" aria-label="{{ lang.Translate "pagination.next_page" | default "Next page" }}" > - {{ lang.Translate "common.next" | default "Next" }} → + {{ lang.Translate "common.next" | default "Next" }} → </a> {{- end }} </nav> diff --git a/layouts/partials/list/post-card.html b/layouts/partials/list/post-card.html index 75be9ce..254cc6b 100644 --- a/layouts/partials/list/post-card.html +++ b/layouts/partials/list/post-card.html @@ -10,11 +10,17 @@ <time datetime="{{ $post.Date.Format "2006-01-02T15:04:05Z07:00" }}" class="post-card__publish-date"> {{ $post.Date | time.Format ":date_medium" }} </time> - {{- with $post.ReadingTime }} - <p class="post-card__reading-time"> - {{ lang.Translate "list.reading_time" . | default (printf "Estimated reading time: %s min" .) }} - </p> - {{- end }} + <!-- Uncomment for post meta info + <p class="post-card__meta-info"> + <span class="post-card__reading-time"> + {{ lang.Translate "list.reading_time" $post.ReadingTime | default (printf "Estimated reading time: %s min" $post.ReadingTime) }} + </span> + | + <span class="post-card__word-count"> + {{ lang.Translate "list.word_count" $post.WordCount | default (printf "%s words" $post.WordCount) }} + </span> + </p> + --> </div> </header> diff --git a/layouts/partials/list/recent-posts.html b/layouts/partials/list/recent-posts.html index d774138..2404910 100644 --- a/layouts/partials/list/recent-posts.html +++ b/layouts/partials/list/recent-posts.html @@ -18,10 +18,7 @@ List of specified number of the most recent and published posts. Accepts a dict </h2> </header> - {{- $recentPosts := where site.RegularPages "Date" "!=" nil }} - {{- $recentPosts = where $recentPosts ".Date" "le" now }} - {{- $recentPosts = first $count $recentPosts }} - + {{- $recentPosts := where site.RegularPages "Params.excludeFromLists" "!=" true | first $count }} {{- if $recentPosts }} <div class="recent-posts__content"> <ul class="recent-posts__list" role="list"> @@ -33,16 +30,16 @@ List of specified number of the most recent and published posts. Accepts a dict </ul> {{- if $showViewAll }} - <a href="{{ with site.GetPage "/posts" }}{{ .RelPermalink }}{{ else }}/posts/{{ end }}" class="recent-posts__view-all-link"> - {{ lang.Translate "posts.view_all" | default "View all posts" }} + {{- with site.GetPage "/all-posts"}} + <a href="{{ .RelPermalink }}" class="recent-posts__view-all-link"> + {{ lang.Translate "posts.view_all" | default "View all posts" }} » </a> + {{- end }} {{- end }} </div> {{ else }} - <div class="recent-posts__empty"> - <p class="recent-posts__empty-message"> - {{ lang.Translate "list.empty" | default "No posts in this section." }} - </p> - </div> + <p class="recent-posts__empty-message"> + {{ lang.Translate "list.empty" | default "No posts in this section." }} + </p> {{- end }} </section> |
