mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-06-23 21:57:30 -05:00
archetypes
assets
data
exampleSite
i18n
layouts
_default
partials
author-metadata.html
authors-meta-item.html
breadcrumb.html
comments.html
credit.html
figure.html
head.html
icon.html
link_tags.html
opengraph.html
post-metadata-short.html
post-metadata.html
readingtime-meta-item.html
remote_figure.html
schema.html
series-meta-item.html
tags-meta-item.html
top.html
translations-meta-item.html
twitter_cards.html
viewsource-meta-item.html
shortcodes
taxonomy
index.html
robots.txt
.editorconfig
.gitattributes
.gitignore
.gitmodules
LICENSE
README.md
config.yaml
theme.toml
54 lines
1.7 KiB
HTML
54 lines
1.7 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 | markdownify }}</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 .AllTranslations }}
|
|
<li>
|
|
<a class="langpicker-item{{ if eq .Language $.Site.Language }} active{{ end }}" href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
|
|
</li>
|
|
{{ end }}
|
|
|
|
{{ $site_translations := slice }}
|
|
{{ range .Site.Languages }}
|
|
{{ $site_translations = $site_translations | append .LanguageName }}
|
|
{{ end }}
|
|
|
|
{{ $translation_codes := slice }}
|
|
{{ range .AllTranslations }}
|
|
{{ $translation_codes = $translation_codes | append .Language }}
|
|
{{ end }}
|
|
|
|
{{ range (.Site.Languages | complement $translation_codes) }}
|
|
<li>
|
|
<a class="langpicker-item unavailable">{{ .LanguageName }}</a>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
</details>
|
|
{{ end }}
|
|
</div>
|