LeaveItFork/layouts/partials/header.html
2018-09-13 00:14:09 +08:00

13 lines
646 B
HTML

<nav class="navbar">
<div class="container">
<div class="navbar-header header-logo">
<a href="javascript:void(0);" class="theme-switch"><i class="iconfont icon-xihuan"></i></a>&nbsp;<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
</div>
<div class="menu navbar-right">
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<a class="menu-item{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}" href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a>
{{ end }}
</div>
</div>
</nav>