From 608936b748b568c4c71eab15afadd0dd66e0760f Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Sun, 25 Feb 2024 15:37:26 +0100 Subject: [PATCH] Implement LinkTitle in menus, making it easy to set in frontmatter. --- assets/sass/_zen.scss | 2 +- layouts/partials/menu.html | 4 ++-- layouts/partials/mobilemenu.html | 4 ++-- layouts/partials/sidebar.html | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/assets/sass/_zen.scss b/assets/sass/_zen.scss index 3d086a4..182a2c4 100644 --- a/assets/sass/_zen.scss +++ b/assets/sass/_zen.scss @@ -31,9 +31,9 @@ figcaption { // Apply heading font stack and colour to labels etc. th, -nav, label, legend, +.main-menu, .header, .footer { color: var(--color-headings); diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html index eb6296e..7a5963b 100644 --- a/layouts/partials/menu.html +++ b/layouts/partials/menu.html @@ -14,10 +14,10 @@ {{ with .File }}{{ $currentID = .UniqueID }}{{ end -}} {{ with site.Home }}
  • {{ i18n "menu_home" }}
  • {{ end }} {{ range where site.RegularPages "Section" "" -}} -
  • {{ .Title }}
  • +
  • {{ .LinkTitle }}
  • {{ end -}} {{ range site.Sections -}} -
  • {{ .Title }}
  • +
  • {{ .LinkTitle }}
  • {{ end -}} {{ end -}} diff --git a/layouts/partials/mobilemenu.html b/layouts/partials/mobilemenu.html index d531437..b2059ab 100644 --- a/layouts/partials/mobilemenu.html +++ b/layouts/partials/mobilemenu.html @@ -26,10 +26,10 @@ {{ with .File }}{{ $currentID = .UniqueID }}{{ end -}} {{ with site.Home }}
  • {{ i18n "menu_home" }}
  • {{ end }} {{ range where site.RegularPages "Section" "" -}} -
  • {{ .Title }}
  • +
  • {{ .LinkTitle }}
  • {{ end -}} {{ range site.Sections -}} -
  • {{ .Title }}
  • +
  • {{ .LinkTitle }}
  • {{ end -}} {{ end -}} diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index cf081ca..8bfb53e 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -3,13 +3,13 @@ {{ with .File }}{{ $currentID = .UniqueID }}{{ end -}}