min: "min"
author: "Author"
category: "Category"
+categories: "Categories"
+tag: "Tag"
tags: "Tags"
relatedPosts: "Related articles"
noRelated: "No related articles."
min: "min"
author: "Autore"
category: "Categoria"
+categories: "Categorie"
+tag: "Tag"
tags: "Tag"
relatedPosts: "Articoli correlati"
noRelated: "Nessun articolo correlato."
</h1>
<!-- Articles list -->
- <div class="space-y-2 max-w-2xl">
+ <div class="space-y-6 max-w-3xl">
{{ $pinned := where .Pages "Params.pinned" true }}
{{ $unpinned := where .Pages "Params.pinned" false }}
+ <!-- If no unpinned posts found (because param is undefined), get all non-pinned pages -->
+ {{ if eq (len $unpinned) 0 }}
+ {{ $unpinned = where .Pages "Params.pinned" nil }}
+ {{ if eq (len $unpinned) 0 }}
+ {{ $unpinned = where .Pages "Params.pinned" "" }}
+ {{ end }}
+ {{ end }}
+
<!-- Pinned posts first -->
{{ range (sort $pinned "Date" "desc") }}
{{ partial "article-list-item.html" . }}
</p>
<!-- Articles list -->
- <div class="space-y-2 max-w-2xl">
+ <div class="space-y-6 max-w-3xl">
{{ $pinned := where .Pages "Params.pinned" true }}
{{ $unpinned := where .Pages "Params.pinned" false }}
+ <!-- If no unpinned posts found (because param is undefined), get all non-pinned pages -->
+ {{ if eq (len $unpinned) 0 }}
+ {{ $unpinned = where .Pages "Params.pinned" nil }}
+ {{ if eq (len $unpinned) 0 }}
+ {{ $unpinned = where .Pages "Params.pinned" "" }}
+ {{ end }}
+ {{ end }}
+
<!-- Pinned posts first -->
{{ range (sort $pinned "Date" "desc") }}
{{ partial "article-list-item.html" . }}