mirror of
https://github.com/thegeeklab/hugo-geekblog.git
synced 2024-11-04 20:30:44 +00:00
69 lines
2.7 KiB
HTML
69 lines
2.7 KiB
HTML
<header class="gblog-header">
|
|
<div class="container flex flex-wrap">
|
|
<div class="gblog-header__col-1 flex justify-start hidden-mobile"></div>
|
|
<div class="gblog-header__col-2 flex align-center justify-center ">
|
|
<a class="gblog-header__link" rel="me" href="{{ .Site.BaseURL }}">
|
|
<span class="gblog-brand flex align-center justify-center">
|
|
<img
|
|
class="gblog-brand__img"
|
|
src="{{ (default "brand.svg" .Site.Params.logo) | relURL }}"
|
|
alt=""
|
|
/>
|
|
<span class="gblog-brand__title">{{ .Site.Title }}</span>
|
|
</span>
|
|
{{ with .Site.Params.subtitle }}
|
|
<span class="gblog-brand__subtitle flex align-center justify-center">{{ . }}</span>
|
|
{{ end }}
|
|
</a>
|
|
</div>
|
|
<div class="gblog-header__col-3 flex justify-end">
|
|
<span id="gblog-color-theme">
|
|
<svg class="gblog-icon gblog_brightness_dark">
|
|
<title>{{ i18n "button_toggle_dark" }}</title>
|
|
<use xlink:href="#gblog_brightness_dark"></use>
|
|
</svg>
|
|
<svg class="gblog-icon gblog_brightness_light">
|
|
<title>{{ i18n "button_toggle_dark" }}</title>
|
|
<use xlink:href="#gblog_brightness_light"></use>
|
|
</svg>
|
|
<svg class="gblog-icon gblog_brightness_auto">
|
|
<title>{{ i18n "button_toggle_dark" }}</title>
|
|
<use xlink:href="#gblog_brightness_auto"></use>
|
|
</svg>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<nav class="gblog-nav">
|
|
<input type="checkbox" id="menu-control" class="hidden" />
|
|
<div class="gblog-nav__control">
|
|
<label for="menu-control" class="flex align-center justify-center">
|
|
<svg class="gblog-icon gblog_menu"><use xlink:href="#gblog_menu"></use></svg>
|
|
<svg class="gblog-icon gblog_clear"><use xlink:href="#gblog_clear"></use></svg>
|
|
<span>Navigation</span>
|
|
</label>
|
|
</div>
|
|
<ul class="gblog-nav__list container flex flex-wrap justify-center menu-content">
|
|
{{ $currentPage := .RelPermalink }}
|
|
{{ if default true .Site.Params.GeekblogTagsToMenu }}
|
|
{{ range $name, $taxonomy := .Site.Taxonomies.tags }}
|
|
{{ with $.Site.GetPage (printf "/tags/%s" $name) }}
|
|
<li>
|
|
<a
|
|
class="gblog-nav__entry{{ if eq $currentPage .RelPermalink }}
|
|
{{ printf " %s" "is-active" }}
|
|
{{ end }}"
|
|
href="{{ .RelPermalink }}"
|
|
>
|
|
{{ partial "utils/title" . }}
|
|
</a>
|
|
</li>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ if .Site.Data.menu.extra.header }}
|
|
{{ partial "menu-extra" (dict "current" . "source" .Site.Data.menu.extra.header "target" "header") }}
|
|
{{ end }}
|
|
</ul>
|
|
</nav>
|