From e4dccd4f4858ffdc038f5d43cf416c99a6a10dec Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Mon, 20 May 2024 00:27:25 -0700 Subject: [PATCH] Add support for series navigation links Signed-off-by: Danila Fedorin --- assets/scss/style.scss | 39 ++++++++++++++++++++++++++++++++ layouts/blog/single.html | 13 +++++++++++ layouts/partials/serieslink.html | 16 +++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 layouts/partials/serieslink.html diff --git a/assets/scss/style.scss b/assets/scss/style.scss index 4047803..f339566 100755 --- a/assets/scss/style.scss +++ b/assets/scss/style.scss @@ -330,6 +330,45 @@ figure { } } +#SeriesNavigation { + margin-top: 1em; + display: flex; + + .wrapper { + flex-grow: 1; + display: flex; + + &.previous { + justify-content: left; + } + + &.next { + justify-content: right; + } + } + + + a { + @include bordered-block; + padding: 0.5em 1em 0.5em 1em; + font-size: 1.1em; + display: flex; + align-items: center; + + .feather { + height: 1.25em; + width: 1.25em; + fill: none; + &:first-child { margin-right: 0.5em; } + &:last-child { margin-left: 0.5em; } + } + } + + div.title { + font-weight: bold; + } +} + .series-status { &.suspended { --status-color: #f9b005; } &.complete { --status-color: #3dc60b; } diff --git a/layouts/blog/single.html b/layouts/blog/single.html index 0ec4e06..e558111 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -27,6 +27,19 @@ {{ end }} {{ define "after" }} +{{ $term := index (.GetTerms "series") 0 }} +{{ with $term }} +{{- /* No idea why the 'Reverse' is needed? */ -}} +{{ $pages := (site.Taxonomies.series.Get .Data.Term).Pages.ByDate.Reverse }} + +{{ end }}