From dac4024abcfea76f14522a84bee4b7258c37b72d Mon Sep 17 00:00:00 2001 From: Arne Rief Date: Wed, 20 Aug 2025 21:36:19 +0200 Subject: Language selection & theme toggle --- layouts/partials/list/recent-posts.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'layouts/partials/list') diff --git a/layouts/partials/list/recent-posts.html b/layouts/partials/list/recent-posts.html index c1075e2..d774138 100644 --- a/layouts/partials/list/recent-posts.html +++ b/layouts/partials/list/recent-posts.html @@ -1,5 +1,5 @@ {{- /* -List of Recent Posts. Accepts a dict with the following optional parameters: +List of specified number of the most recent and published posts. Accepts a dict with the following optional parameters: @context {int} count: Number of posts to display (default: 10). @context {string} title: Section title (default: "Recent Articles"). @@ -11,7 +11,6 @@ List of Recent Posts. Accepts a dict with the following optional parameters: {{- $count := .count | default 10 -}} {{- $title := .title | default (lang.Translate "posts.recent" | default "Recent Articles") -}} {{- $showViewAll := .show_view_all | default true -}} -

@@ -19,7 +18,6 @@ List of Recent Posts. Accepts a dict with the following optional parameters:

- {{- /* Get published 10 most recent posts */ -}} {{- $recentPosts := where site.RegularPages "Date" "!=" nil }} {{- $recentPosts = where $recentPosts ".Date" "le" now }} {{- $recentPosts = first $count $recentPosts }} @@ -35,14 +33,14 @@ List of Recent Posts. Accepts a dict with the following optional parameters: {{- if $showViewAll }} - + {{ lang.Translate "posts.view_all" | default "View all posts" }} {{- end }} {{ else }}
-

+

{{ lang.Translate "list.empty" | default "No posts in this section." }}

-- cgit v1.2.3