list.html

 1{{ define "main" }}
 2<div class="list">
 3    <h1 style="view-transition-name: title">{{ .Title }}</h1>
 4    <div class="content">
 5        {{ .Content | safeHTML }}
 6    </div>
 7    <p>There are RSS feeds for <em>all</em> of the categories and tags on the site. If you want to subscribe to one of them, navigate to that list and <a href="index.xml">click here</a>; you'll be taken to the specific feed.</p>
 8    <form action="https://duckduckgo.com/" method="get">
 9        <input name="sites" type="hidden" value="secluded.site">
10        <input aria-label="Search this blog." name="q" type="text" placeholder="&#128270; Search this site with DuckDuckGo" >
11    </form>
12    <div class="categories">
13        <h2>Categories</h2>
14        <p>
15            <a class="button" href="/posts">All</a>
16            {{ range ($.Site.GetPage "taxonomyTerm" "categories").Pages }}
17            <a class="button" href="{{.Permalink}}">{{.Title}}</a>
18            {{- end }}
19        </p>
20    </div>
21
22    <hr/>
23
24    <div class="posts">
25        <ul class="posts-list">
26            {{- range .Pages }}
27            {{- if .Params.rss_only }}
28            {{- else }}
29            <li class="posts-item">
30                <a href="{{.Permalink}}">
31                    <span class="posts-title" style="view-transition-name: post-title-{{ .Title | urlize }}">{{.Title}}</span>
32                    <span class="posts-day" style="view-transition-name: post-day-{{ .Title | urlize }}">{{ if .Site.Params.dateformShort }}{{ .Date.Format .Site.Params.dateformShort }}{{ else }}{{ .Date.Format "2006-01-02" }}{{ end }}</span>
33                </a>
34                <p style="view-transition-name: post-summary-{{ .Title | urlize }}">{{ .Summary | truncate 140 }}</p>
35                <p>
36                    {{ $title := .Title }}
37                    {{- range (.GetTerms "tags") }}
38                    <a class="button" href="{{.Permalink}}" style="view-transition-name: post-tags-{{ $title | urlize }}{{ .Title | urlize }}">{{.Title}}</a>
39                    {{- end }}
40                </p>
41            </li>
42            {{- end }}
43            {{- end }}
44        </ul>
45    </div>
46</div>
47{{ end }}