secluded/themes/secluded/layouts/_default/list.html

48 lines
2.1 KiB
HTML

{{ define "main" }}
<div class="list">
<h1 style="view-transition-name: title">{{ .Title }}</h1>
<div class="content">
{{ .Content | safeHTML }}
</div>
<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>
<form action="https://duckduckgo.com/" method="get">
<input name="sites" type="hidden" value="secluded.site">
<input aria-label="Search this blog." name="q" type="text" placeholder="&#128270; Search this site with DuckDuckGo" >
</form>
<div class="categories">
<h2>Categories</h2>
<p>
<a class="button" href="/posts">All</a>
{{ range ($.Site.GetPage "taxonomyTerm" "categories").Pages }}
<a class="button" href="{{.Permalink}}">{{.Title}}</a>
{{- end }}
</p>
</div>
<hr/>
<div class="posts">
<ul class="posts-list">
{{- range .Pages }}
{{- if .Params.rss_only }}
{{- else }}
<li class="posts-item">
<a href="{{.Permalink}}">
<span class="posts-title" style="view-transition-name: post-title-{{ .Title | urlize }}">{{.Title}}</span>
<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>
</a>
<p style="view-transition-name: post-summary-{{ .Title | urlize }}">{{ .Summary | truncate 140 }}</p>
<p>
{{ $title := .Title }}
{{- range (.GetTerms "tags") }}
<a class="button" href="{{.Permalink}}" style="view-transition-name: post-tags-{{ $title | urlize }}{{ .Title | urlize }}">{{.Title}}</a>
{{- end }}
</p>
</li>
{{- end }}
{{- end }}
</ul>
</div>
</div>
{{ end }}