Merge pull request #386 from rseabra/fix-menus

Fix menu's by properly enclosing the inner ul's into li's as it shoul…
This commit is contained in:
Radek Kozieł 2022-11-06 09:13:48 +01:00 committed by GitHub
commit 1023b03b77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,9 +7,10 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if gt (len $.Site.Menus.main) $.Site.Params.showMenuItems }} {{ if gt (len $.Site.Menus.main) $.Site.Params.showMenuItems }}
<li>
<ul class="menu__sub-inner"> <ul class="menu__sub-inner">
<li class="menu__sub-inner-more-trigger">{{ $.Site.Params.MenuMore }} ▾</li> <li class="menu__sub-inner-more-trigger">{{ $.Site.Params.MenuMore }} ▾</li>
<li>
<ul class="menu__sub-inner-more hidden"> <ul class="menu__sub-inner-more hidden">
{{ range last (sub (len $.Site.Menus.main) $.Site.Params.showMenuItems) $.Site.Menus.main }} {{ range last (sub (len $.Site.Menus.main) $.Site.Params.showMenuItems) $.Site.Menus.main }}
{{ if not .HasChildren }} {{ if not .HasChildren }}
@ -17,7 +18,9 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
</ul> </ul>
</li>
</ul> </ul>
</li>
{{ end }} {{ end }}
{{ else }} {{ else }}
{{ range $.Site.Menus.main }} {{ range $.Site.Menus.main }}
@ -28,8 +31,10 @@
{{ end }} {{ end }}
{{ if and $.Site.Params.showLanguageSelector (len $.Site.Home.AllTranslations) }} {{ if and $.Site.Params.showLanguageSelector (len $.Site.Home.AllTranslations) }}
<div class="spacer"></div> <!-- <div class="spacer"></div> -->
<li>
<ul class="language-selector"> <ul class="language-selector">
<li>
<ul class="language-selector-current"> <ul class="language-selector-current">
<li>{{ .Language.LanguageName }} ▾</li> <li>{{ .Language.LanguageName }} ▾</li>
</ul> </ul>
@ -39,6 +44,7 @@
{{ end }} {{ end }}
</ul> </ul>
</ul> </ul>
</li>
{{ end }} {{ end }}
</ul> </ul>