mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-11-17 13:25:57 -06:00
31 lines
959 B
HTML
31 lines
959 B
HTML
<h2 class="header">
|
|
<a href="{{ .Site.Home.Permalink | absLangURL }}">{{ .Site.Title | markdownify }}</a>
|
|
</h2>
|
|
|
|
<div class="topbar">
|
|
<nav class="navbar">
|
|
{{ with .Site.Home }}
|
|
<a class="navbar-item{{ if $.IsHome }} active{{ end }}" href="{{ .Permalink | absLangURL }}">{{ .Title }}</a>
|
|
{{ end }}
|
|
|
|
{{ range .Site.Menus.main }}
|
|
|
|
{{ $isActive := false }}
|
|
{{ if or ($.HasMenuCurrent .Menu .) ($.IsMenuCurrent .Menu .) }}
|
|
{{ $isActive = true }}
|
|
{{ end }}
|
|
|
|
<a class="navbar-item{{ if $isActive }} active{{ end }}" href="{{ .URL }}">{{ .Name }}</a>
|
|
|
|
{{ end }}
|
|
</nav>
|
|
|
|
{{ if .Site.IsMultiLingual }}
|
|
<nav class="langpicker">
|
|
{{ range .Site.Home.AllTranslations }}
|
|
<a class="langpicker-item{{ if eq .Language $.Site.Language }} active{{ end }}" href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
|
|
{{ end }}
|
|
</nav>
|
|
{{ end }}
|
|
</div>
|