c3re-website/themes/hugo-theme-flat/layouts/index.html

49 lines
1.7 KiB
HTML

{{ 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>
{{ end }}
</div>
{{ end }}
{{ with .Params.Tags }}
<div class="tags">
<span>Tags:</span>
{{ range first 5 . }}
<a href="{{ "tags/" | relURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
</div>
{{ end }}
</div>
<div class="summary">
{{ with .Description }}
{{ . }}
{{ else }}
{{ .Summary }}
{{ end }}
</div>
</section>
{{ end }}
</div>
{{ partial "pagination.html" . }}
</div>
{{ end }}