hugo-tufte/layouts/index.html

61 lines
1.4 KiB
HTML
Raw Normal View History

2021-07-21 20:23:55 +02:00
{{ define "main" }}
<article id="main" class="home-page">
{{ partial "brand.html" . }}
{{ with .Content }}
<section>
{{ . }}
</section>
{{ end }}
<section class="page-list">
{{ $pgFilter1 := where .Site.RegularPages "Draft" false }}
{{ $pgFilter2 := where .Site.RegularPages "Params.date" "!=" nil }}
2024-09-27 20:45:08 +02:00
<!-- {{ $pgFilter3 := where .Site.RegularPages "Params.hidefromhome" "!=" true }} -->
{{ $pgFilter := $pgFilter1 | intersect $pgFilter2 | intersect $pgFilter3}}
{{ range (.Paginate $pgFilter).Pages }}
<h2 class="content-title">
{{ if .IsNode }}
<a href="{{ .Permalink }}">{{ .Title}}</a>
{{ else }}
<a href="{{ .RelPermalink }}">{{ .Title }}{{ if .Draft }}&nbsp;:: Draft{{end}}</a>
2023-04-15 01:36:29 +02:00
{{ end }}
</h2>
{{ if .Description }}
<p>{{ .Description }}</p>
{{ else }}
{{ if .Site.Params.showSummary }}
<p>{{ truncate 140 .Summary }}</p>
{{ end }}
{{ end }}
{{ end }}
</section>
{{ if and (.Paginator) (gt .Paginator.TotalPages 1) }}
<hr />
2024-12-08 03:17:31 +01:00
<div id="pagination" class="pagination">
<span class="previous-page">
{{ if .Paginator.HasPrev }}
<a class="link-reverse" href="{{.Paginator.Prev.URL}}">«</a>
{{ end }}
</span>
<span class="pagination-indicator">
{{.Paginator.PageNumber}} / {{.Paginator.TotalPages}}
</span>
<span class="next-page">
{{ if .Paginator.HasNext }}
<a class="link-reverse" href="{{.Paginator.Next.URL}}">»</a>
{{ end }}
</span>
2024-12-08 03:17:31 +01:00
</div>
{{ end }}
{{ partial "footer.html" . }}
2023-04-15 01:36:29 +02:00
</article>
{{ end }}