feat: icon shift on header menu (#219)

uci-hugo-doc
Robert Kaussow 2021-10-15 11:50:11 +02:00 committed by GitHub
parent 98110f1a09
commit d03c035d48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 4 deletions

View File

@ -19,12 +19,14 @@
{{ end }} {{ end }}
{{ if eq $target "header" }} {{ if eq $target "header" }}
<span>
<a href="{{ if .external }}{{ .ref }}{{ else }}{{ relref $current .ref }}{{ end }}" class="gdoc-header__link"> <a href="{{ if .external }}{{ .ref }}{{ else }}{{ relref $current .ref }}{{ end }}" class="gdoc-header__link">
<svg class="icon {{ .icon }}"> <svg class="icon {{ .icon }}">
<title>{{ .name }}</title> <title>{{ .name }}</title>
<use xlink:href="#{{ .icon }}"></use> <use xlink:href="#{{ .icon }}"></use>
</svg> </svg>
</a> </a>
</span>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}

View File

@ -38,19 +38,23 @@
</svg> </svg>
</span> </span>
{{ if .Root.Site.Data.menu.extra.header }} {{ if .Root.Site.Data.menu.extra.header }}
<a href="{{ .Root.Site.BaseURL }}" class="gdoc-header__link gdoc-menu-header__home"> <span class="gdoc-menu-header__home">
<a href="{{ .Root.Site.BaseURL }}" class="gdoc-header__link">
<svg class="icon gdoc_home"> <svg class="icon gdoc_home">
<title>Back to homepage</title> <title>Back to homepage</title>
<use xlink:href="#gdoc_home"></use> <use xlink:href="#gdoc_home"></use>
</svg> </svg>
</a> </a>
<label for="menu-header-control" class="gdoc-menu-header__control"> </span>
<span class="gdoc-menu-header__control">
<label for="menu-header-control">
<svg class="icon gdoc_keyborad_arrow_right"> <svg class="icon gdoc_keyborad_arrow_right">
<use xlink:href="#gdoc_keyborad_arrow_right"></use> <use xlink:href="#gdoc_keyborad_arrow_right"></use>
<title>Close Menu Bar</title> <title>Close Menu Bar</title>
</svg> </svg>
</label> </label>
</span> </span>
</span>
<label for="menu-header-control" class="gdoc-menu-header__control"> <label for="menu-header-control" class="gdoc-menu-header__control">
<svg class="icon gdoc_keyborad_arrow_left"> <svg class="icon gdoc_keyborad_arrow_left">
<use xlink:href="#gdoc_keyborad_arrow_left"></use> <use xlink:href="#gdoc_keyborad_arrow_left"></use>

View File

@ -201,8 +201,8 @@ img {
&__items { &__items {
display: inline-block; display: inline-block;
:not(:last-child) { > span {
margin-right: $padding-8; margin-left: $padding-8;
} }
} }