hugo-theme-flat/layouts/index.html

43 lines
1.5 KiB
HTML
Raw Normal View History

2022-04-27 13:54:00 +00:00
{{ define "main" }}
<div class="max-wrapper">
<div id="list-page">
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
{{ $paginator := .Paginate $pages }}
{{ range $paginator.Pages }}
<section class="list-item">
<h1 class="title"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h1>
<div class="tips">
<div class="date">
<time datetime="{{ .PublishDate }}">{{ .PublishDate.Format "2006/01/02" }}</time>
</div>
{{ with .Params.Categories }}
<div class="categories">
<span>Categories:</span>
{{ range first 2 . }}
<a href="{{ "/categories/" | relURL }}{{ . | urlize }}">{{ . }}</a>
2022-04-27 13:54:00 +00:00
{{ end }}
</div>
{{ end }}
{{ with .Params.Tags }}
<div class="tags">
<span>Tags:</span>
{{ range first 5 . }}
<a href="{{ "/tags/" | relURL }}{{ . | urlize }}">{{ . }}</a>
2022-04-27 13:54:00 +00:00
{{ end }}
</div>
{{ end }}
</div>
<div class="summary">{{ .Summary }}</div>
</section>
{{ end }}
</div>
{{ partial "pagination.html" . }}
</div>
{{ end }}