2021-12-15 10:09:08 +00:00
|
|
|
{{ define "main" }}
|
2022-01-13 08:22:22 +00:00
|
|
|
<main>
|
|
|
|
<section class='entries'>
|
2022-12-19 08:24:21 +00:00
|
|
|
<div class="h-feed">
|
|
|
|
{{ $range := where .Pages "Params.hidden" "ne" "true" }}
|
|
|
|
{{ $paginator := .Paginate $range }}
|
|
|
|
{{ $pageSize := $paginator.PageSize }}
|
|
|
|
{{ $totalPostsToShow := mul $paginator.PageNumber $pageSize }}
|
|
|
|
{{ range $index, $el := (first $totalPostsToShow $range) }}
|
2022-01-13 08:22:22 +00:00
|
|
|
|
2022-12-19 08:24:21 +00:00
|
|
|
<div class='post {{if eq .Section "tv"}}tv{{ end }}' {{ if eq $index (sub $totalPostsToShow $pageSize) }}id="newpage"{{ end }}>
|
|
|
|
{{if eq .Section "tv"}}
|
|
|
|
{{- partial "video_box.html" . -}}
|
2022-04-20 09:54:37 +00:00
|
|
|
|
2022-12-19 08:24:21 +00:00
|
|
|
{{ else if eq .Section "events" }}
|
|
|
|
{{- partial "partials/calendar_card.html" . -}}
|
2022-04-20 09:54:37 +00:00
|
|
|
|
2022-12-19 08:24:21 +00:00
|
|
|
{{ else if eq .Section "shouts" }}
|
|
|
|
{{ if in .Params.sources "pen.lumbung.space" }}
|
|
|
|
{{- partial "partials/pen_card.html" . -}}
|
|
|
|
{{ else }}
|
|
|
|
{{- partial "partials/shout_card.html" . -}}
|
|
|
|
{{ end }}
|
2022-08-31 16:15:44 +00:00
|
|
|
|
2022-12-19 08:24:21 +00:00
|
|
|
{{ else if eq .Section "social" }}
|
|
|
|
{{- partial "partials/social_card.html" . -}}
|
2022-08-31 16:15:44 +00:00
|
|
|
|
2022-12-19 08:24:21 +00:00
|
|
|
{{ else if eq .Section "publications"}}
|
|
|
|
{{- partial "partials/book_card.html" . -}}
|
2022-01-07 07:53:27 +00:00
|
|
|
|
2022-12-19 08:24:21 +00:00
|
|
|
{{ else if eq .Section "sounds"}}
|
|
|
|
{{- partial "sounds_card.html" . -}}
|
2021-12-15 10:09:08 +00:00
|
|
|
|
2022-12-19 08:24:21 +00:00
|
|
|
{{ else }}
|
|
|
|
{{- partial "card.html" . -}}
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
2022-01-13 08:22:22 +00:00
|
|
|
{{ end }}
|
|
|
|
</div>
|
2022-12-19 08:24:21 +00:00
|
|
|
|
|
|
|
<div class="page-nav">
|
|
|
|
{{ if and (gt $paginator.TotalPages 1) ($paginator.HasNext) }}
|
|
|
|
<a id="load-more-paginator" class="nextpage" href="{{ $paginator.Next.URL }}#newpage">load more</a>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
</section>
|
2022-01-07 08:17:10 +00:00
|
|
|
</main>
|
2022-12-19 08:24:21 +00:00
|
|
|
{{ end }}
|