hugo-theme-flat/layouts/index.html

49 lines
1.7 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 . }}
2022-09-04 11:11:04 +00:00
<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 . }}
2022-09-04 11:11:04 +00:00
<a href="{{ "tags/" | relURL }}{{ . | urlize }}">{{ . }}</a>
2022-04-27 13:54:00 +00:00
{{ end }}
</div>
{{ end }}
</div>
<div class="summary">
{{ with .Description }}
{{ . }}
{{ else }}
{{ .Summary }}
{{ end }}
</div>
2022-04-27 13:54:00 +00:00
</section>
{{ end }}
</div>
{{ partial "pagination.html" . }}
</div>
{{ end }}