diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2020-06-05 16:57:53 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2020-06-05 16:57:53 +0200 |
commit | 983b64ca51f5e769f790a5ebc55e3808157b8d94 (patch) | |
tree | 4fb52d8e2f449e44a51ed0549cec9debbcd3d157 /themes/new_theme/layouts/partials/menu.html | |
parent | ff7e6bde0be9ac60e694097ce3598f9b552c4807 (diff) | |
download | www-andreasbaumann-cc-983b64ca51f5e769f790a5ebc55e3808157b8d94.tar.gz www-andreasbaumann-cc-983b64ca51f5e769f790a5ebc55e3808157b8d94.tar.bz2 |
updated to newest theme supporting newer hugo versions
Diffstat (limited to 'themes/new_theme/layouts/partials/menu.html')
-rw-r--r-- | themes/new_theme/layouts/partials/menu.html | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/themes/new_theme/layouts/partials/menu.html b/themes/new_theme/layouts/partials/menu.html index df9c403..34843c4 100644 --- a/themes/new_theme/layouts/partials/menu.html +++ b/themes/new_theme/layouts/partials/menu.html @@ -1,12 +1,23 @@ -<nav class="menu" itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement"> +{{- if .Site.Menus.main }} +<nav class="menu"> + <button class="menu__btn" aria-haspopup="true" aria-expanded="false" tabindex="0"> + <span class="menu__btn-title" tabindex="-1">{{ T "menu_label" }}</span> + </button> <ul class="menu__list"> - {{- if .Site.Menus.main }} {{- $currentNode := . }} - {{- range sort .Site.Menus.main }} - {{- if ( not ( eq .Name "Data Protection And Privacy" ) ) }} - <li class="menu__item {{if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }}menu__item--active{{end}}"><a class="menu__link" href="{{ .URL }}">{{ .Name | upper }}</a></li> - {{- end }} + {{- range .Site.Menus.main }} + {{- if .Name }} + <li class="menu__item{{ if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }} menu__item--active{{ end }}"> + <a class="menu__link" href="{{ .URL }}"> + {{ .Pre }} + <span class="menu__text">{{ .Name }}</span> + {{ .Post }} + </a> + </li> {{- end }} {{- end }} </ul> </nav> +{{ else -}} +<div class="divider"></div> +{{- end }} |