WIP merge of Cristoph, filter, mobile view, menu rework

This commit is contained in:
rra
2022-09-25 09:10:37 +02:00
parent 475a614959
commit ce945e77db
14 changed files with 496 additions and 252 deletions

View File

@ -1,12 +1,16 @@
{{ define "main" }}
<main>
<section class='entries'>
<div class="h-feed">
{{ range (.Paginate (.Site.RegularPages.GroupByDate "January 2006") 20 ).PageGroups }}
<span class="date-marker">{{ .Key }}</span>
{{ range .Pages }}
<div class="h-feed">
{{ $range := .Site.RegularPages }}
{{ $paginator := .Paginate $range }}
{{ $pageSize := $paginator.PageSize }}
{{ $totalPostsToShow := mul $paginator.PageNumber $pageSize }}
{{ range $index, $el := (first $totalPostsToShow .Site.RegularPages) }}
<div class="post" {{ if eq $index (sub $totalPostsToShow $pageSize) }}id="newpage"{{ end }}>
{{if eq .Section "tv"}}
{{- partial "video_box.html" . -}}
@ -32,13 +36,17 @@
{{ else }}
{{- partial "card.html" . -}}
{{ end }}
{{ end }}
</div>
{{ end }}
</div>
<nav class="pagination-container">
{{ template "_internal/pagination.html" . }}
</nav>
<div class="page-nav">
{{ if and (gt $paginator.TotalPages 1) ($paginator.HasNext) }}
<a class="nextpage" href="{{ $paginator.Next.URL }}#newpage">Next Page</a>
{{ end }}
<a class="nextpage load-all-trigger" href="{{ $paginator.Last.URL }}">Load all</a>
</div>
<div class="lumbung-radio-player" onclick="window.open('https://lumbungradio.stationofcommons.org', 'Lumbung Radio', 'height=800,width=450')">
<svg class="lumbung-radio-play-button" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7 4V20L20 12L7 4Z" fill="#CA14D4" stroke="#CA14D4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
@ -46,5 +54,7 @@
<span>lumbung radio</span>
<img src="/img/lumbung-radio-logo.png" alt="" height="30">
</div>
</section>
</main>
{{ end }}