mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2026-08-02 11:57:16 -05:00
Things to figure out: - Why is isso breaking when I add the modal (TODO: try individual components and see if that still breaks Isso; just to investigate) - Can we use the modal trigger but have that just go to a custom page, or should it just build the search menu at the top of the current page (not an overlay like the all-in-one searchbox you can add; I mean actually it just goes to the top of the body and puts the search menu and filtering stuff there) - Dark mode
28 lines
1.1 KiB
HTML
28 lines
1.1 KiB
HTML
<header class="top">
|
|
<div class="top-brand">
|
|
<a href="{{ .Site.Home.Permalink | absLangURL }}">
|
|
{{ .Site.Title | markdownify }}
|
|
</a>
|
|
</div>
|
|
|
|
<pagefind-modal-trigger></pagefind-modal-trigger>
|
|
<pagefind-modal></pagefind-modal>
|
|
|
|
<nav class="top-navbar" aria-label="{{ i18n "aria_navbar" }}">
|
|
{{ with .Site.Home }}
|
|
<a class="top-navbar-item{{ if $.IsHome }} top-navbar-item--active{{ end }}" href="{{ .Permalink | absLangURL }}">{{ .Title | markdownify }}</a>
|
|
{{ end }}
|
|
|
|
{{ range .Site.Menus.main }}
|
|
{{ $isActive := false }}
|
|
{{/* https://discourse.gohugo.io/t/ismenucurrent-not-working-with-using-sectionpagesmenu/46687/2?u=bbaovanc */}}
|
|
{{ if or ($.HasMenuCurrent .Menu .) (eq .Page $) }}
|
|
{{ $isActive = true }}
|
|
{{ end }}
|
|
<a class="top-navbar-item{{ if $isActive }} top-navbar-item--active{{ end }}"
|
|
{{ if strings.HasPrefix .URL "http" }}target="_blank" rel="noopener"{{ end }}
|
|
href="{{ .URL }}">{{ .Name }}</a>
|
|
{{ end }}
|
|
</nav>
|
|
</header>
|