blog/themes/farallon/layouts/partials/navigation.html

39 lines
1.2 KiB
HTML
Raw Permalink Normal View History

2024-05-06 12:00:46 +08:00
<header class="site--header">
<a href="{{ site.Home.Permalink }}" class="site--url">{{ $logo := resources.Get "images/logo.jpeg" }}
2024-06-14 14:03:34 +08:00
<img src="{{ $.Site.Params.authorAvatar }}" class="avatar" />
2024-05-06 12:00:46 +08:00
<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>