2022-06-01 11:44:06 +08:00
|
|
|
{{- $ms := .Site.Params.menuSets }}
|
2022-05-25 15:44:10 +08:00
|
|
|
{{- $curP := .Page }}
|
|
|
|
<nav class="site-nav">
|
|
|
|
<ul class="main-menu menu">
|
2022-06-24 19:12:08 +08:00
|
|
|
{{- range .Site.Menus.main }}
|
|
|
|
{{- $active := $curP.IsMenuCurrent "main" . }}
|
2022-05-25 15:44:10 +08:00
|
|
|
<li class="menu-item menu-item-{{ .Identifier }}">
|
2022-06-13 21:22:17 +08:00
|
|
|
<a href="{{ .URL | relLangURL }}" class="hvr-icon-pulse {{if $active }} menu-item-active{{ end }}" rel="section">
|
2022-06-01 11:44:06 +08:00
|
|
|
{{- if $ms.icons }}<i class="fa fa-{{ .Pre }} hvr-icon"></i>{{ end }}{{- .Name }}
|
2022-06-24 19:12:08 +08:00
|
|
|
{{- if and $ms.badges (eq .Identifier "archives") }}
|
2022-06-09 09:12:22 +08:00
|
|
|
<span class="badge">{{ $.Scratch.Get "postsCount" }}</span>
|
2022-05-25 15:44:10 +08:00
|
|
|
{{- end }}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{{- end }}
|
|
|
|
|
2022-06-01 11:44:06 +08:00
|
|
|
{{- if or .Site.Params.algoliaSearch.enable .Site.Params.localSearch.enable }}
|
2022-05-25 15:44:10 +08:00
|
|
|
<li class="menu-item menu-item-search">
|
2022-06-01 11:44:06 +08:00
|
|
|
<a role="button" class="popup-trigger hvr-icon-pulse">
|
|
|
|
{{- if $ms.icons }}<i class="fa fa-search fa-fw hvr-icon"></i>{{ end }}{{ T "MSearchLabel" }}
|
2022-05-25 15:44:10 +08:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{{- end }}
|
|
|
|
</ul>
|
|
|
|
</nav>
|