2020-09-17 15:28:03 +05:30
|
|
|
{{ if eq .Site.Params.defaultTheme "auto" }}
|
|
|
|
<script>
|
|
|
|
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
|
|
document.body.classList.add('dark');
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
{{ end }}
|
2020-07-21 15:36:30 +05:30
|
|
|
<header class="header">
|
|
|
|
<nav class="nav">
|
|
|
|
{{- if .IsHome }}
|
2020-08-25 01:40:02 +05:30
|
|
|
<h1 class="logo"><a href="{{ "" | absLangURL }}">{{ .Site.Title }}</a></h1>
|
2020-07-21 15:36:30 +05:30
|
|
|
{{- else }}
|
2020-08-25 01:40:02 +05:30
|
|
|
<p class="logo"><a href="{{ "" | absLangURL }}">{{ .Site.Title }}</a></p>
|
2020-07-20 20:32:07 +05:30
|
|
|
{{- end }}
|
2020-07-21 15:36:30 +05:30
|
|
|
{{- if .Site.Menus.main }}
|
2020-08-21 21:03:05 +05:30
|
|
|
<ul class="menu" id="menu" onscroll="menu_on_scroll()">
|
2020-07-21 15:36:30 +05:30
|
|
|
{{- range .Site.Menus.main }}
|
|
|
|
<li>
|
2020-08-25 01:40:02 +05:30
|
|
|
<a href="{{ .URL | absLangURL}}">{{ .Name }}</a>
|
2020-07-21 15:36:30 +05:30
|
|
|
</li>
|
|
|
|
{{- end }}
|
|
|
|
</ul>
|
|
|
|
{{- end }}
|
|
|
|
</nav>
|
|
|
|
</header>
|