mirror of https://github.com/jkjoy/hugoblog.git
39 lines
1.2 KiB
HTML
39 lines
1.2 KiB
HTML
<header class="site--header">
|
|
<a href="{{ site.Home.Permalink }}" class="site--url">{{ $logo := resources.Get "images/logo.jpeg" }}
|
|
<img src="{{ $logo.RelPermalink }}" class="avatar" />
|
|
<span class="u-xs-show">
|
|
{{ $.Site.Title }}
|
|
</span>
|
|
</a>
|
|
{{ if len $.Site.Menus }}
|
|
<div class="site--header__center">
|
|
<div class="inner">
|
|
<nav>
|
|
<ul>
|
|
{{ range $.Site.Menus.main }}
|
|
{{ if not .HasChildren }}
|
|
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
|
{{ end }}
|
|
{{ end }}
|
|
</ul>
|
|
</nav>
|
|
<div class="search--area">
|
|
<form role="search" method="get" class="search-form" action="/search">
|
|
<label>
|
|
<input type="search" class="search-field" placeholder="Search …" value="" name="s"
|
|
autocomplete="off">
|
|
</label>
|
|
<input type="submit" class="search-submit" value="Search">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{ end }}
|
|
{{ if .Site.Params.search }}
|
|
<svg class="svgIcon" width="25" height="25" data-action="show-search">
|
|
<path
|
|
d="M20.067 18.933l-4.157-4.157a6 6 0 1 0-.884.884l4.157 4.157a.624.624 0 1 0 .884-.884zM6.5 11c0-2.62 2.13-4.75 4.75-4.75S16 8.38 16 11s-2.13 4.75-4.75 4.75S6.5 13.62 6.5 11z">
|
|
</path>
|
|
</svg>
|
|
{{ end }}
|
|
</header> |