hugo-graceful-simplicity/layouts/index.html

44 lines
1.2 KiB
HTML

{{ partial "header.html" . }}
{{ if .Site.Params.contact }}
<h2>Contact</h2>
{{ range $label, $value := .Site.Params.contact }}
{{ $label }}: <span class="monospace">{{ $value }}</span>
<br>
{{ end }}
{{ end }}
<h2>Writings</h2>
<ul>
{{ range first .Site.Params.frontPagePosts .Data.Pages }}
{{ if eq .Type "post" }}
<li><a href="{{ .Permalink }}">{{ .Title }}
{{ if .Site.Params.frontShowDatesOnPosts }} ({{ .Date.Format "Jan 2, 2006" }}){{ end }}
</a></li>
{{ end }}
{{ end }}
</ul>
{{ if gt (len (where (where .Site.Pages "Type" "post") "Kind" "page")) .Site.Params.frontPagePosts }}
<a href="{{ .Site.BaseURL }}/post/">List of all writings</a>
{{ end }}
<h2>Pages</h2>
<ul>
{{ range .Data.Pages }}
{{ if eq .Type "page" }}
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
{{ end }}
{{ end }}
</ul>
{{ if .Site.Params.sites }}
<h2>Where to find me on the internet</h2>
<ul>
{{ range .Site.Params.sites }}
<li><a href="{{ .link }}">{{ .label }}</a></li>
{{ end }}
</ul>
{{ end }}
{{ partial "footer.html" . }}