Fix no-js main menu (>920px)

This commit is contained in:
vimux 2020-01-07 10:50:28 -05:00
parent 81848653eb
commit 449f51ed66
No known key found for this signature in database
GPG key ID: 5A34FDC4EE832E34
2 changed files with 7 additions and 3 deletions

View file

@ -272,6 +272,10 @@ button:not(:-moz-focusring):focus > .main-nav__btn-box {
} }
@media (min-width: 920px) { @media (min-width: 920px) {
.header {
display: flex;
}
.logo { .logo {
display: inline-block; display: inline-block;
} }
@ -312,7 +316,7 @@ button:not(:-moz-focusring):focus > .main-nav__btn-box {
border-color: #666; border-color: #666;
} }
.main-nav__list--right { .main-nav--right {
margin-left: auto; margin-left: auto;
} }

View file

@ -1,5 +1,5 @@
{{- if .Site.Menus.main }} {{- if .Site.Menus.main }}
<nav class="main-nav" role="navigation"> <nav class="main-nav{{ if eq .Site.Params.mainMenuAlignment "right" }} main-nav--right{{ end }}" role="navigation">
<button id="toggle" class="main-nav__btn" aria-label="Menu toggle" aria-expanded="false" tabindex="0"> <button id="toggle" class="main-nav__btn" aria-label="Menu toggle" aria-expanded="false" tabindex="0">
<div class="main-nav__btn-box" tabindex="-1"> <div class="main-nav__btn-box" tabindex="-1">
<svg class="main-nav__icon icon-menu" width="18" height="18" viewBox="0 0 18 18"> <svg class="main-nav__icon icon-menu" width="18" height="18" viewBox="0 0 18 18">
@ -8,7 +8,7 @@
</svg> </svg>
</div> </div>
</button> </button>
<ul id="menu" class="main-nav__list{{ if eq .Site.Params.mainMenuAlignment "right" }} main-nav__list--right{{ end }}"> <ul id="menu" class="main-nav__list">
{{- $currentNode := . }} {{- $currentNode := . }}
{{- range sort .Site.Menus.main }} {{- range sort .Site.Menus.main }}
{{- $current := (or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .)) }} {{- $current := (or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .)) }}