From 3327af7df05e728d4f76db1e2ba8850cd4b7d6ef Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Thu, 10 Aug 2023 15:22:13 +0200 Subject: [PATCH] Future posts of thematic series can be marked as 'incoming' So they are not listed, but are shown in the thematic case's navigation menu to get an idea of what's coming next --- themes/chosto/layouts/_default/list.html | 11 +++++++---- themes/chosto/layouts/_default/single.html | 12 +++++++++++- themes/chosto/static/css/custom.css | 6 ++++++ 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/themes/chosto/layouts/_default/list.html b/themes/chosto/layouts/_default/list.html index b804cfe..d1a1fe0 100644 --- a/themes/chosto/layouts/_default/list.html +++ b/themes/chosto/layouts/_default/list.html @@ -5,16 +5,19 @@
- - {{ $paginator := .Paginator }} + {{ $paginator := .Paginate + (where + (where site.RegularPages ".Type" "in" site.Params.mainSections) + ".Params.incoming" "!=" true) + }} {{ range $paginator.Pages }} - {{ if (eq .FirstSection.Section "posts")}}
{{ .Render "summary" }}
{{ end }} - {{ end }}
{{- partial "pagination.html" $paginator -}}
diff --git a/themes/chosto/layouts/_default/single.html b/themes/chosto/layouts/_default/single.html index 97f57fe..2e94e31 100644 --- a/themes/chosto/layouts/_default/single.html +++ b/themes/chosto/layouts/_default/single.html @@ -1,7 +1,7 @@ {{ define "main" }}
@@ -18,11 +18,21 @@ {{ .Params.Title }}

{{ end }} {{ end }} diff --git a/themes/chosto/static/css/custom.css b/themes/chosto/static/css/custom.css index 0a6003e..8305c0b 100644 --- a/themes/chosto/static/css/custom.css +++ b/themes/chosto/static/css/custom.css @@ -41,6 +41,12 @@ p:not(.title, .subtitle, figcaption p) { background: rgba(0, 0, 0, 0.3); } +/* Used to disable click on incoming posts in thematic series */ +a.disabled { + pointer-events: none; + cursor: default; +} + /* New font is "smaller" in feeling */ .navbar-dropdown { font-size: 1rem;