From 10bc92116f3b4497ae95125b1e5f595c08f39214 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Tue, 21 Mar 2023 08:55:54 -0400 Subject: [PATCH] refactor categories+tags section into a dedicated partial, add jump links for menu and metadata to the footer ; update 'back to tpo' jump links to jump to the toc instead of the very top of the page to save screen readers having to skip forward after jumping back --- .../layouts/partials/categories_tags.html | 10 +++++++ themes/hugo-xmin/layouts/partials/footer.html | 2 ++ themes/hugo-xmin/layouts/partials/header.html | 2 +- .../hugo-xmin/layouts/partials/page_meta.html | 26 ++++++++++--------- .../hugo-xmin/layouts/partials/related.html | 2 ++ 5 files changed, 29 insertions(+), 13 deletions(-) create mode 100644 themes/hugo-xmin/layouts/partials/categories_tags.html diff --git a/themes/hugo-xmin/layouts/partials/categories_tags.html b/themes/hugo-xmin/layouts/partials/categories_tags.html new file mode 100644 index 0000000..d55e602 --- /dev/null +++ b/themes/hugo-xmin/layouts/partials/categories_tags.html @@ -0,0 +1,10 @@ + + +

+ {{ range $i := (slice "categories" "tags") }} + {{ with ($.Param $i) }} + {{ $i | title }}: {{ range $k := . }}{{$k}} {{ end }} + {{ end }} +
+ {{ end }} +

\ No newline at end of file diff --git a/themes/hugo-xmin/layouts/partials/footer.html b/themes/hugo-xmin/layouts/partials/footer.html index 335c9c6..72716e0 100644 --- a/themes/hugo-xmin/layouts/partials/footer.html +++ b/themes/hugo-xmin/layouts/partials/footer.html @@ -3,6 +3,8 @@ {{ with .Site.Params.footer }}
Back to top +  | Back to categories and tags +  | Back to menu
{{ replace . "{Year}" now.Year | markdownify}} {{ end }} {{ if .GitInfo}} diff --git a/themes/hugo-xmin/layouts/partials/header.html b/themes/hugo-xmin/layouts/partials/header.html index fe324e0..ca7511e 100644 --- a/themes/hugo-xmin/layouts/partials/header.html +++ b/themes/hugo-xmin/layouts/partials/header.html @@ -22,7 +22,7 @@ -