hugo-theme-hyde-hyde/layouts/index.html

45 lines
1.3 KiB
HTML
Raw Normal View History

{{ define "header" }}
2018-01-24 09:42:50 +00:00
{{ partial "header.html" . }}
{{ end }}
2018-01-24 09:42:50 +00:00
{{ define "content" }}
2018-07-20 20:32:00 +00:00
<div class="post-list">
2018-09-12 02:34:45 +00:00
{{ $paginator := .Paginate (where .Data.Pages "Type" "posts") }}
{{ range $paginator.Pages }}
{{ if .Draft }}
{{ .Scratch.Set "draftPage" true }}
{{ else }}
{{ .Scratch.Set "draftPage" false }}
{{ end }}
2018-07-20 20:32:00 +00:00
<div class="post-list__item">
<span class="item__title--big">
<a href="{{ .RelPermalink }}" {{if .Scratch.Get "draftPage" }}class="draft"{{end}}>{{ .Title }}</a>
2018-03-29 23:49:07 +00:00
</span>
2018-07-20 20:32:00 +00:00
<span class="item__date">
{{ .Date.Format (.Site.Params.dateformat | default "Jan 02, 2006") }}
2018-07-16 03:22:00 +00:00
</span>
<span {{if .Scratch.Get "draftPage" }}class="draft"{{end}}>
2018-08-30 01:51:30 +00:00
{{ if .Description }}
{{ .Description }}
{{ else }}
2018-07-16 03:22:00 +00:00
{{ .Summary }}
2018-08-30 01:51:30 +00:00
{{ end }}
</span>
{{ if .Truncated }}
2018-09-12 02:34:45 +00:00
... <a class="read-more-symbol" href="{{ .RelPermalink }}"></a>
{{ end }}
2018-01-25 09:57:13 +00:00
</div>
{{ .Scratch.Delete "draftPage" }}
{{ end }}
</div>
2018-09-12 02:34:45 +00:00
{{ partial "pagination.html" . }}
{{ end }}
2018-01-24 09:42:50 +00:00
{{ define "footer" }}
2018-09-12 02:34:45 +00:00
{{ if .Site.GoogleAnalytics }}
<!-- Google Analytics -->
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}
{{ partial "footer/font-awesome-js.html" . }}
{{ end }}