From 53ea0bd15fa2281b040d191a5efc16266b54e0de Mon Sep 17 00:00:00 2001
From: Julien Dessaux
Date: Mon, 13 Sep 2021 14:32:52 +0200
Subject: Fixed google's lighthouse seo warnings
missing description meta tag
tap targets too small (menu items did not have margins)
---
layouts/partials/nav.html | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
(limited to 'layouts/partials')
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
index 109f687..eeec5f2 100644
--- a/layouts/partials/nav.html
+++ b/layouts/partials/nav.html
@@ -3,14 +3,27 @@
{{- $p := . -}}
- {{- range .Site.Menus.main.ByWeight -}}
+
+ {{- range first 1 .Site.Menus.main.ByWeight -}}
{{- $active := or ($p.IsMenuCurrent "main" .) ($p.HasMenuCurrent "main" .) -}}
{{- with .Page -}}
{{- $active = or $active ( $.IsDescendant .) -}}
{{- end -}}
{{- $url := urls.Parse .URL -}}
{{- $baseurl := urls.Parse $.Site.Params.Baseurl -}}
-
+ {{ end }}
+
+ {{- range after 1 .Site.Menus.main.ByWeight -}}
+ {{- $active := or ($p.IsMenuCurrent "main" .) ($p.HasMenuCurrent "main" .) -}}
+ {{- with .Page -}}
+ {{- $active = or $active ( $.IsDescendant .) -}}
+ {{- end -}}
+ {{- $url := urls.Parse .URL -}}
+ {{- $baseurl := urls.Parse $.Site.Params.Baseurl -}}
+ -
{{ .Name }}
{{ end }}
--
cgit v1.2.3