From 37c6b56a41505aa3afbebf0477725e186ea10143 Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Sat, 5 Nov 2022 23:12:24 +0100 Subject: [PATCH] Fix burger, RSS, pagination and lot of cosmetic stuff --- README.md | 7 +----- config.yaml | 5 ++-- content/about.md | 1 + .../_default/_markup/render-heading.html | 3 +++ themes/chosto/layouts/_default/list.html | 11 +++++++-- themes/chosto/layouts/_default/single.html | 4 ++-- themes/chosto/layouts/partials/head.html | 7 +++++- themes/chosto/layouts/partials/header.html | 9 ++++++-- themes/chosto/layouts/partials/navbar.html | 23 +++++++++++++++++++ themes/chosto/static/css/custom.css | 2 +- 10 files changed, 56 insertions(+), 16 deletions(-) create mode 100644 themes/chosto/layouts/_default/_markup/render-heading.html diff --git a/README.md b/README.md index 4091035..84e9881 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,4 @@ For development, run `hugo server --watch` to watch for config/content changes, ## Using the theme -TODO 😄 - -## TODO - -* RSS feeds -* Make burger menu work on mobiles +TODO 😄 \ No newline at end of file diff --git a/config.yaml b/config.yaml index 571fbe2..ae4a769 100644 --- a/config.yaml +++ b/config.yaml @@ -7,7 +7,8 @@ footnoteReturnLinkContents: ↩ languageCode: fr-fr languageName: Français watch: true -paginate: 6 +paginate: 9 +title: Billets à la mer permalinks: # All pages under posts section will have this link structure @@ -53,5 +54,5 @@ params: gitea: https://git.chosto.me mail: mailto:quentinduchemin@tuta.io funkwhale: https://music.chosto.me/@Chosto/ - rss: https://blog.chosto.me/posts/index.xml + rss: https://blog.chosto.me/index.xml peertube: https://tube.chosto.me \ No newline at end of file diff --git a/content/about.md b/content/about.md index 44d578b..617c859 100644 --- a/content/about.md +++ b/content/about.md @@ -1,6 +1,7 @@ --- title: À propos notoc: true +noheader: true menu: end --- diff --git a/themes/chosto/layouts/_default/_markup/render-heading.html b/themes/chosto/layouts/_default/_markup/render-heading.html new file mode 100644 index 0000000..4eb7169 --- /dev/null +++ b/themes/chosto/layouts/_default/_markup/render-heading.html @@ -0,0 +1,3 @@ + + +{{ .Text | safeHTML }} ¶ \ No newline at end of file diff --git a/themes/chosto/layouts/_default/list.html b/themes/chosto/layouts/_default/list.html index f0b5ea8..ad47f72 100644 --- a/themes/chosto/layouts/_default/list.html +++ b/themes/chosto/layouts/_default/list.html @@ -1,5 +1,5 @@ {{ define "main" }} -
+
{{ with .Content }} @@ -11,7 +11,14 @@ {{ end }}
- {{ $paginator := .Paginate (where .Site.RegularPages "FirstSection.Section" "posts") }} + + {{ $articlesInSection := slice }} + {{ range .Site.RegularPages }} + {{ if $.IsAncestor . }} + {{ $articlesInSection = $articlesInSection | append . }} + {{ end }} + {{ end }} + {{ $paginator := .Paginate $articlesInSection }} {{ range $paginator.Pages }} {{ if (eq .FirstSection.Section "posts")}}
diff --git a/themes/chosto/layouts/_default/single.html b/themes/chosto/layouts/_default/single.html index 53f38bc..1a7656b 100644 --- a/themes/chosto/layouts/_default/single.html +++ b/themes/chosto/layouts/_default/single.html @@ -8,7 +8,7 @@ {{ if (and .IsPage (eq .FirstSection.Section "posts"))}} {{ with .CurrentSection }} {{ if .Params.Title }} -
+