1{{ define "main" }}
2{{ partial "cloud-hero.html" (upper .Section) }}
3<div class="section shell--narrow">
4 <header class="section-header">
5 <div class="section-header__top">
6 <h1 class="label">Posts</h1>
7 <a href="{{ .Permalink }}index.xml" class="section-header__rss tag-list__link" title="RSS Feed">{{- partial "icon" "rss" -}}rss</a>
8 {{ if eq .Section "blog" }}
9 <a href="{{ "/tags/" | relLangURL }}" class="tag-list__link"><span class="tag-list__name">tags</span></a>
10 {{ end }}
11 </div>
12 {{ with .Content }}
13 <p class="section-header__desc">{{ . | plainify }}</p>
14 {{ end }}
15 </header>
16
17 {{- $showDrafts := or hugo.IsDevelopment hugo.IsDevelopment -}}
18 {{- $pinned := where .RegularPages "Params.pin" true -}}
19 {{- $rest := where .RegularPages "Params.pin" "!=" true -}}
20 {{- $pages := $pinned | append $rest -}}
21
22 {{- if gt (len $pages) 0 -}}
23 <ul class="post-list list-none">
24 {{- range $pages -}}
25 {{- if or $showDrafts (not .Draft) -}}
26 {{ partial "post/card.html" (dict "page" .) }}
27 {{- end -}}
28 {{- end -}}
29 </ul>
30 {{- else -}}
31 <p class="post-empty">No posts yet.</p>
32 {{- end -}}
33</div>
34{{ end }}