summaryrefslogtreecommitdiff
path: root/layouts/_default/all-posts.html
diff options
context:
space:
mode:
authorArne Rief <riearn@proton.me>2025-09-04 20:05:27 +0200
committerArne Rief <riearn@proton.me>2025-09-04 20:05:27 +0200
commit26df3baeb1afcb4c41ec99f940b237b9589caa42 (patch)
treeee970fe0810d56a4b83174d282127593ba418547 /layouts/_default/all-posts.html
parent2204aa9db535af9b0c38487f74a56bd0ac9f07e2 (diff)
Ready for deployment
Diffstat (limited to 'layouts/_default/all-posts.html')
-rw-r--r--layouts/_default/all-posts.html36
1 files changed, 36 insertions, 0 deletions
diff --git a/layouts/_default/all-posts.html b/layouts/_default/all-posts.html
new file mode 100644
index 0000000..319a8d5
--- /dev/null
+++ b/layouts/_default/all-posts.html
@@ -0,0 +1,36 @@
+{{ define "main" }}
+<section class="search-page">
+ <header class="all-posts__header">
+ <h1 class="all-posts__heading">
+ {{ .Title }}
+ </h1>
+ {{- with .Content }}
+ <div class="all-posts__description">
+ {{ . }}
+ </div>
+ {{- else }}
+ {{- $description := or .Description (lang.Translate "posts.all_description" | default "All posts on this website, from newest to oldest.") }}
+ <p class="all-posts__description">
+ {{ $description }}
+ </p>
+ {{- end }}
+ </header>
+
+ {{ $allPosts := where site.RegularPages "Params.excludeFromLists" "!=" true }}
+ {{- if $allPosts }}
+ <div class="all-posts__content">
+ <ul class="all-posts__list" role="list">
+ {{- range $allPosts.ByDate.Reverse }}
+ <li class="all-posts__list-item">
+ {{ partial "list/post-card.html" . }}
+ </li>
+ {{- end }}
+ </ul>
+ </div>
+ {{ else }}
+ <p class="all-posts__empty-message">
+ {{ lang.Translate "posts.empty" | default "This site does not have any posts yet." }}
+ </p>
+ {{- end }}
+</section>
+{{ end }}