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    <div class="posts">
23        <ul class="posts-list">
24            {{- range .Pages }}
25            {{- if .Params.rss_only }}
26            {{- else }}
27            <li style="view-transition-name: post-container-{{ .Title | urlize }}" class="posts-item">
28                <p class="posts-title" style="view-transition-name: post-title-{{ .Title | urlize }}"><a href="{{.Permalink}}">{{.Title}}</a></p>
29                <p class="posts-summary" style="view-transition-name: post-summary-{{ .Title | urlize }}">{{ .Summary | truncate 140 }}</p>
30                <p style="view-transition-name: post-meta-{{ .Title | urlize }}" class="posts-meta"><strong>Reading Time:</strong> {{ .ReadingTime }} minutes | <strong>Published:</strong> {{ dateFormat "2006-01-02" .Date }}</p>
31                {{- if .Params.tags }}
32                <p class="tags">
33                    {{ $title := .Title }}
34                    {{- range (.GetTerms "tags") }}
35                    <a class="button" href="{{.Permalink}}" style="view-transition-name: post-tags-{{ $title | urlize }}{{ .Title | urlize }}">{{.Title}}</a>
36                    {{- end }}
37                </p>
38                {{- end }}
39            </li>
40            {{- end }}
41            {{- end }}
42        </ul>
43    </div>
44</div>
45{{ end }}