fix: fix header menu style if no extra entries were added (#305)

This commit is contained in:
Robert Kaussow 2022-01-30 22:05:14 +01:00 committed by GitHub
parent 3e8d569540
commit 8b117788c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 31 deletions

View File

@ -25,9 +25,7 @@
</a>
</div>
<div class="gdoc-menu-header">
<span
{{ if .Root.Site.Data.menu.extra.header }}class="gdoc-menu-header__items"{{ end }}
>
<span class="gdoc-menu-header__items">
{{ if .Root.Site.Data.menu.extra.header }}
{{ partial "menu-extra" (dict "current" .Root "source" .Root.Site.Data.menu.extra.header "target" "header") }}
{{ end }}
@ -48,38 +46,33 @@
</svg>
</span>
{{ if .Root.Site.Data.menu.extra.header }}
<span class="gdoc-menu-header__home">
<a href="{{ .Root.Site.BaseURL }}" class="gdoc-header__link">
<svg class="icon gdoc_home">
<title>{{ i18n "button_homepage" }}</title>
<use xlink:href="#gdoc_home"></use>
</svg>
</a>
</span>
{{ end }}
<span class="gdoc-menu-header__home">
<a href="{{ .Root.Site.BaseURL }}" class="gdoc-header__link">
<svg class="icon gdoc_home">
<title>{{ i18n "button_homepage" }}</title>
<use xlink:href="#gdoc_home"></use>
</svg>
</a>
</span>
{{ partial "language" .Root }}
{{ if .Root.Site.Data.menu.extra.header }}
<span class="gdoc-menu-header__control">
<label for="menu-header-control">
<svg class="icon gdoc_keyboard_arrow_right">
<use xlink:href="#gdoc_keyboard_arrow_right"></use>
<title>{{ i18n "button_menu_close" }}</title>
</svg>
</label>
</span>
{{ end }}
<span class="gdoc-menu-header__control">
<label for="menu-header-control">
<svg class="icon gdoc_keyboard_arrow_right">
<use xlink:href="#gdoc_keyboard_arrow_right"></use>
<title>{{ i18n "button_menu_close" }}</title>
</svg>
</label>
</span>
</span>
{{ if .Root.Site.Data.menu.extra.header }}
<label for="menu-header-control" class="gdoc-menu-header__control">
<svg class="icon gdoc_keyboard_arrow_left">
<use xlink:href="#gdoc_keyboard_arrow_left"></use>
<title>{{ i18n "button_menu_open" }}</title>
</svg>
</label>
{{ end }}
<label for="menu-header-control" class="gdoc-menu-header__control">
<svg class="icon gdoc_keyboard_arrow_left">
<use xlink:href="#gdoc_keyboard_arrow_left"></use>
<title>{{ i18n "button_menu_open" }}</title>
</svg>
</label>
</div>
</div>
</header>

View File

@ -194,6 +194,7 @@ img {
.gdoc-brand {
font-size: $font-size-32;
line-height: $font-size-32;
&__img {
margin-right: $padding-16;