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

38 lines
1.3 KiB
HTML
Raw Normal View History

2021-06-24 07:30:38 +00:00
{{ define "main" }}
<div class="list">
<h1>{{ .Title }}</h1>
<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>
{{ $title := .Title }}
{{ if eq $title "Posts" }}
<div class="categories">
<h2>Categories</h2>
{{range ($.Site.GetPage "taxonomyTerm" "categories").Pages }}
<a class="button" href="{{.Permalink}}">
<p>{{.Title}}</p>
</a>
{{end}}
</div>
{{ end }}
<hr/>
<div class="posts">
<ul class="posts-list">
{{- range .Pages }}
<li class="posts-item">
<a href="{{.Permalink}}">
<span class="posts-title">{{.Title}}</span>
<span class="posts-day">{{ if .Site.Params.dateformShort }}{{ .Date.Format .Site.Params.dateformShort }}{{ else }}{{ .Date.Format "Jan 02"}}{{ end }}</span>
</a>
<p>{{ .Summary | truncate 140 }}</p>
{{ range (.GetTerms "tags") }}
<a class="button" href="{{.Permalink}}">
<p>{{.Title}}</p>
</a>
{{ end }}
</li>
{{- end }}
</ul>
</div>
{{ end }}