mirror of
https://github.com/13hannes11/hugo-coder-timeline.git
synced 2024-09-04 00:50:58 +02:00
* Add theme toggle button feature * Add theme toggle button feature * Replaced svg icon with FA icon + fixed indentation + refactored css * Added back colorsheme configurations + script moved to be process by hugo pipe * Make release * Fix toggle button not working when loading new page + setTheme() refactor * Make release * Update exampleSite/config.toml Co-authored-by: Luiz F. A. de Prá <luizdepra@users.noreply.github.com>
46 lines
1.6 KiB
HTML
46 lines
1.6 KiB
HTML
<nav class="navigation">
|
|
<section class="container">
|
|
<a class="navigation-title" href="{{ .Site.BaseURL | relLangURL }}">
|
|
{{ .Site.Title }}
|
|
</a>
|
|
{{ if or .Site.Menus.main .Site.IsMultiLingual }}
|
|
<span id="dark-mode-toggle" class="float-right">
|
|
<i class="fas fa-adjust fa-fw"></i>
|
|
</span>
|
|
<input type="checkbox" id="menu-toggle" />
|
|
<label class="menu-button float-right" for="menu-toggle">
|
|
<i class="fas fa-bars fa-fw"></i>
|
|
</label>
|
|
<ul class="navigation-list">
|
|
{{ with .Site.Menus.main}}
|
|
{{ range sort . }}
|
|
<li class="navigation-item">
|
|
<a class="navigation-link" href="{{ .URL | absLangURL }}">{{ .Name }}</a>
|
|
</li>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ if .Site.IsMultiLingual }}
|
|
{{ $node := . }}
|
|
{{ .Scratch.Set "separator" true }}
|
|
{{ range (default .Site.Home.AllTranslations .Translations) }}
|
|
{{ if ne $.Site.Language .Language }}
|
|
{{ if $node.Scratch.Get "separator" }}
|
|
<li class="navigation-item menu-separator">
|
|
<span>|</span>
|
|
</li>
|
|
{{ $node.Scratch.Set "separator" false }}
|
|
{{ end }}
|
|
<li class="navigation-item">
|
|
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
|
|
</li>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
<li class="navigation-item separator">
|
|
<span>|</span>
|
|
</li>
|
|
</ul>
|
|
{{ end }}
|
|
</section>
|
|
</nav>
|