mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-11-05 08:25:59 -06:00
38 lines
1.1 KiB
HTML
38 lines
1.1 KiB
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 }}
|
|
<details class="langpicker">
|
|
<summary>
|
|
{{ partial "icon.html" "world" -}}
|
|
</summary>
|
|
<ul class="languages">
|
|
{{ range .Site.Home.AllTranslations }}
|
|
<li>
|
|
<a class="langpicker-item{{ if eq .Language $.Site.Language }} active{{ end }}" href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
</details>
|
|
{{ end }}
|
|
</div>
|