From 74d03343b9c12ddaec76da165bc84d89ef43b482 Mon Sep 17 00:00:00 2001 From: "Nuno C." Date: Sun, 16 Aug 2026 22:09:35 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BF=EF=B8=8F=20Add=20header=20and=20main?= =?UTF-8?q?=20menu=20nav=20landmarks=20(#3048)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wrap the page header in a header element and the subnavigation menu in a labelled nav landmark. Addresses #3023. Co-authored-by: Chris Herborth --- i18n/en.yaml | 1 + layouts/_default/baseof.html | 14 +++++---- layouts/partials/header/basic.html | 46 ++++++++++++++++-------------- 3 files changed, 33 insertions(+), 28 deletions(-) diff --git a/i18n/en.yaml b/i18n/en.yaml index 544c95be..777fd947 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -60,6 +60,7 @@ list: no_articles: "There are no articles to list here yet." nav: + main_menu: "Main menu" scroll_to_top_title: "Scroll to top" skip_to_main: "Skip to main content" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 8939fb31..4bbe6121 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -19,12 +19,14 @@ {{ i18n "nav.skip_to_main" }} - {{ $header := print "header/" site.Params.header.layout ".html" }} - {{ if templates.Exists ( printf "partials/%s" $header ) }} - {{ partial $header . }} - {{ else }} - {{ partial "header/basic.html" . }} - {{ end }} +
+ {{ $header := print "header/" site.Params.header.layout ".html" }} + {{ if templates.Exists ( printf "partials/%s" $header ) }} + {{ partial $header . }} + {{ else }} + {{ partial "header/basic.html" . }} + {{ end }} +
{{ block "main" . }}{{ end }} diff --git a/layouts/partials/header/basic.html b/layouts/partials/header/basic.html index 9c9c9f13..95e5de7a 100644 --- a/layouts/partials/header/basic.html +++ b/layouts/partials/header/basic.html @@ -37,30 +37,32 @@
{{ if .Site.Menus.subnavigation }} -