2022-11-09 23:52:11 +00:00
|
|
|
<header class="py-6 font-semibold text-neutral-900 dark:text-neutral print:hidden sm:py-10">
|
2022-11-10 00:32:43 +00:00
|
|
|
<nav class="flex items-start justify-between sm:items-center">
|
2022-11-09 23:52:11 +00:00
|
|
|
{{/* Site logo/title */}}
|
2022-11-10 00:32:43 +00:00
|
|
|
<div class="z-40 flex flex-row items-center">
|
2022-11-09 23:52:11 +00:00
|
|
|
{{ partial "logo.html" . }}
|
|
|
|
</div>
|
|
|
|
{{ if or .Site.Menus.main (.Site.Params.enableSearch | default false) }}
|
|
|
|
{{/* Hamburger menu */}}
|
|
|
|
<label id="menu-button" for="menu-controller" class="block sm:hidden">
|
|
|
|
<input type="checkbox" id="menu-controller" class="hidden" />
|
|
|
|
<div class="cursor-pointer hover:text-primary-600 dark:hover:text-primary-400">
|
|
|
|
{{ partial "icon.html" "bars" }}
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
id="menu-wrapper"
|
2023-10-26 02:30:47 +00:00
|
|
|
class="fixed inset-0 z-30 invisible w-full h-full m-auto overflow-auto transition-opacity opacity-0 cursor-default bg-neutral-100/50 backdrop-blur-sm dark:bg-neutral-900/50"
|
2022-11-09 23:52:11 +00:00
|
|
|
>
|
|
|
|
<ul
|
2023-10-26 02:30:47 +00:00
|
|
|
class="flex flex-col w-full px-6 py-6 mx-auto overflow-visible list-none max-w-7xl text-end sm:px-14 sm:py-10 sm:pt-10 md:px-24 lg:px-32"
|
2022-11-09 23:52:11 +00:00
|
|
|
>
|
|
|
|
<li class="mb-1">
|
|
|
|
<span class="cursor-pointer hover:text-primary-600 dark:hover:text-primary-400"
|
|
|
|
>{{ partial "icon.html" "xmark" }}</span
|
|
|
|
>
|
|
|
|
</li>
|
|
|
|
{{ if .Site.Menus.main }}
|
|
|
|
{{ range .Site.Menus.main }}
|
2023-10-26 02:30:47 +00:00
|
|
|
{{ if and (eq .Params.action "locale") (and (not page.IsTranslated) (not site.IsMultiLingual)) }}
|
|
|
|
{{ continue }}
|
|
|
|
{{ end }}
|
|
|
|
<li class="mb-1 group">
|
2023-01-16 03:21:03 +00:00
|
|
|
{{ if eq .Params.action "search" }}
|
2023-01-17 01:58:04 +00:00
|
|
|
{{ $.Scratch.Add "searchCount" 1 }}
|
2023-01-16 03:21:03 +00:00
|
|
|
{{ if $.Site.Params.enableSearch | default false }}
|
|
|
|
<button
|
2023-01-17 01:58:04 +00:00
|
|
|
id="search-button-{{ $.Scratch.Get "searchCount" }}"
|
2023-01-16 03:21:03 +00:00
|
|
|
title="{{ .Title | default (i18n "search.open_button_title") }}"
|
|
|
|
>
|
2023-01-17 01:58:04 +00:00
|
|
|
{{ with .Params.icon | default "search" }}
|
2023-01-16 03:21:03 +00:00
|
|
|
<span
|
2023-10-26 02:30:47 +00:00
|
|
|
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
2023-01-16 03:21:03 +00:00
|
|
|
>
|
2023-06-01 11:09:31 +00:00
|
|
|
{{- partial "icon.html" . -}}
|
2023-01-16 03:21:03 +00:00
|
|
|
</span>
|
2023-06-01 11:09:31 +00:00
|
|
|
{{- end -}}{{- if .Params.showName | default true -}}
|
2023-01-16 03:21:03 +00:00
|
|
|
<span
|
|
|
|
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
|
|
|
>{{ .Name | markdownify | emojify }}</span
|
|
|
|
>
|
|
|
|
{{ end }}
|
|
|
|
</button>
|
|
|
|
{{ end }}
|
2023-01-17 01:58:04 +00:00
|
|
|
{{ else if eq .Params.action "appearance" }}
|
|
|
|
{{ $.Scratch.Add "switchCount" 1 }}
|
|
|
|
<button
|
|
|
|
id="appearance-switcher-{{ $.Scratch.Get "switchCount" }}"
|
|
|
|
type="button"
|
|
|
|
aria-label="appearance switcher"
|
|
|
|
>
|
|
|
|
<span
|
2023-10-26 02:30:47 +00:00
|
|
|
class="inline transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:hidden"
|
2023-01-17 01:58:04 +00:00
|
|
|
title="{{ i18n "footer.dark_appearance" }}"
|
|
|
|
>
|
|
|
|
{{ with .Params.icon | default "moon" }}
|
2023-06-01 11:09:31 +00:00
|
|
|
{{- partial "icon.html" . -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- if .Params.showName | default true -}}
|
2023-01-17 01:58:04 +00:00
|
|
|
<span
|
|
|
|
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
|
|
|
>{{ .Name | markdownify | emojify }}</span
|
|
|
|
>
|
|
|
|
{{ end }}
|
|
|
|
</span>
|
|
|
|
<span
|
2023-10-26 02:30:47 +00:00
|
|
|
class="hidden transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:inline"
|
2023-01-17 01:58:04 +00:00
|
|
|
title="{{ i18n "footer.light_appearance" }}"
|
|
|
|
>
|
|
|
|
{{ with .Params.icon | default "sun" }}
|
2023-06-01 11:09:31 +00:00
|
|
|
{{- partial "icon.html" . -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- if .Params.showName | default true -}}
|
2023-01-17 01:58:04 +00:00
|
|
|
<span
|
|
|
|
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
|
|
|
>{{ .Name | markdownify | emojify }}</span
|
|
|
|
>
|
|
|
|
{{ end }}
|
|
|
|
</span>
|
|
|
|
</button>
|
2023-09-11 23:22:49 +00:00
|
|
|
{{ else if eq .Params.action "locale" }}
|
|
|
|
{{ $.Scratch.Add "localeCount" 1 }}
|
|
|
|
{{ partial "translations.html" . }}
|
2023-01-16 03:21:03 +00:00
|
|
|
{{ else }}
|
|
|
|
<a
|
|
|
|
href="{{ .URL }}"
|
|
|
|
title="{{ .Title }}"
|
|
|
|
{{ with .Params.target }}target="{{ . }}"{{ end }}
|
|
|
|
>{{ with .Params.icon }}
|
|
|
|
<span
|
2023-10-26 02:30:47 +00:00
|
|
|
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
2023-01-16 03:21:03 +00:00
|
|
|
>
|
2023-06-01 11:09:31 +00:00
|
|
|
{{- partial "icon.html" . -}}
|
2023-01-16 03:21:03 +00:00
|
|
|
</span>
|
2023-06-01 11:09:31 +00:00
|
|
|
{{- end -}}{{- if .Params.showName | default true -}}
|
2023-01-16 03:21:03 +00:00
|
|
|
<span
|
|
|
|
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
|
|
|
>{{ .Name | markdownify | emojify }}</span
|
|
|
|
>
|
|
|
|
{{ end }}</a
|
|
|
|
>
|
|
|
|
{{ end }}
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
2023-01-17 01:58:04 +00:00
|
|
|
{{ if and ($.Site.Params.enableSearch | default false) (eq ($.Scratch.Get "searchCount") 0) }}
|
2023-10-26 02:30:47 +00:00
|
|
|
<li class="mb-1 group">
|
2023-01-16 03:21:03 +00:00
|
|
|
<button id="search-button-m0" title="{{ i18n "search.open_button_title" }}">
|
|
|
|
<span
|
2023-10-26 02:30:47 +00:00
|
|
|
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
2023-01-16 03:21:03 +00:00
|
|
|
>
|
|
|
|
{{ partial "icon.html" "search" }}
|
|
|
|
</span>
|
|
|
|
</button>
|
2022-11-09 23:52:11 +00:00
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
{{/* Basic menu */}}
|
2023-10-26 02:30:47 +00:00
|
|
|
<ul class="flex-row hidden list-none text-end sm:flex">
|
2022-11-09 23:52:11 +00:00
|
|
|
{{ if .Site.Menus.main }}
|
|
|
|
{{ range .Site.Menus.main }}
|
2023-10-26 02:30:47 +00:00
|
|
|
{{ if and (eq .Params.action "locale") (and (not page.IsTranslated) (not site.IsMultiLingual)) }}
|
|
|
|
{{ continue }}
|
|
|
|
{{ end }}
|
|
|
|
<li class="mb-1 group sm:mb-0 sm:me-7 sm:last:me-0">
|
2023-01-16 03:21:03 +00:00
|
|
|
{{ if eq .Params.action "search" }}
|
2023-01-17 01:58:04 +00:00
|
|
|
{{ $.Scratch.Add "searchCount" 1 }}
|
2023-01-16 03:21:03 +00:00
|
|
|
{{ if $.Site.Params.enableSearch | default false }}
|
|
|
|
<button
|
2023-01-17 01:58:04 +00:00
|
|
|
id="search-button-{{ $.Scratch.Get "searchCount" }}"
|
2023-01-16 03:21:03 +00:00
|
|
|
title="{{ .Title | default (i18n "search.open_button_title") }}"
|
|
|
|
>
|
2023-01-17 01:58:04 +00:00
|
|
|
{{ with .Params.icon | default "search" }}
|
2023-01-16 03:21:03 +00:00
|
|
|
<span
|
2023-10-26 02:30:47 +00:00
|
|
|
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
2023-01-16 03:21:03 +00:00
|
|
|
>
|
2023-06-01 11:09:31 +00:00
|
|
|
{{- partial "icon.html" . -}}
|
2023-01-16 03:21:03 +00:00
|
|
|
</span>
|
2023-06-01 11:09:31 +00:00
|
|
|
{{- end -}}{{- if .Params.showName | default true -}}
|
2023-01-16 03:21:03 +00:00
|
|
|
<span
|
|
|
|
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
|
|
|
>{{ .Name | markdownify | emojify }}</span
|
|
|
|
>
|
|
|
|
{{ end }}
|
|
|
|
</button>
|
|
|
|
{{ end }}
|
2023-01-17 01:58:04 +00:00
|
|
|
{{ else if eq .Params.action "appearance" }}
|
|
|
|
{{ $.Scratch.Add "switchCount" 1 }}
|
|
|
|
<button
|
|
|
|
id="appearance-switcher-{{ $.Scratch.Get "switchCount" }}"
|
|
|
|
type="button"
|
|
|
|
aria-label="appearance switcher"
|
|
|
|
>
|
|
|
|
<span
|
2023-10-26 02:30:47 +00:00
|
|
|
class="inline transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:hidden"
|
2023-01-17 01:58:04 +00:00
|
|
|
title="{{ i18n "footer.dark_appearance" }}"
|
|
|
|
>
|
|
|
|
{{ with .Params.icon | default "moon" }}
|
2023-06-01 11:09:31 +00:00
|
|
|
{{- partial "icon.html" . -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- if .Params.showName | default true -}}
|
2023-01-17 01:58:04 +00:00
|
|
|
<span
|
|
|
|
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
|
|
|
>{{ .Name | markdownify | emojify }}</span
|
|
|
|
>
|
|
|
|
{{ end }}
|
|
|
|
</span>
|
|
|
|
<span
|
2023-10-26 02:30:47 +00:00
|
|
|
class="hidden transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600 dark:inline"
|
2023-01-17 01:58:04 +00:00
|
|
|
title="{{ i18n "footer.light_appearance" }}"
|
|
|
|
>
|
|
|
|
{{ with .Params.icon | default "sun" }}
|
2023-06-01 11:09:31 +00:00
|
|
|
{{- partial "icon.html" . -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- if .Params.showName | default true -}}
|
2023-01-17 01:58:04 +00:00
|
|
|
<span
|
|
|
|
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
|
|
|
>{{ .Name | markdownify | emojify }}</span
|
|
|
|
>
|
|
|
|
{{ end }}
|
|
|
|
</span>
|
|
|
|
</button>
|
2023-09-11 23:22:49 +00:00
|
|
|
{{ else if eq .Params.action "locale" }}
|
|
|
|
{{ $.Scratch.Add "localeCount" 1 }}
|
|
|
|
{{ partial "translations.html" . }}
|
2023-01-16 03:21:03 +00:00
|
|
|
{{ else }}
|
|
|
|
<a
|
|
|
|
href="{{ .URL }}"
|
|
|
|
title="{{ .Title }}"
|
|
|
|
{{ with .Params.target }}target="{{ . }}"{{ end }}
|
|
|
|
>{{ with .Params.icon }}
|
|
|
|
<span
|
2023-10-26 02:30:47 +00:00
|
|
|
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
2023-01-16 03:21:03 +00:00
|
|
|
>
|
2023-06-01 11:09:31 +00:00
|
|
|
{{- partial "icon.html" . -}}
|
2023-01-16 03:21:03 +00:00
|
|
|
</span>
|
2023-06-01 11:09:31 +00:00
|
|
|
{{- end -}}{{- if .Params.showName | default true -}}
|
2023-01-16 03:21:03 +00:00
|
|
|
<span
|
|
|
|
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
|
|
|
>{{ .Name | markdownify | emojify }}</span
|
|
|
|
>
|
|
|
|
{{ end }}</a
|
|
|
|
>
|
|
|
|
{{ end }}
|
2022-11-09 23:52:11 +00:00
|
|
|
</li>
|
|
|
|
{{ end }}
|
2023-01-17 01:58:04 +00:00
|
|
|
{{ if and ($.Site.Params.enableSearch | default false) (eq ($.Scratch.Get "searchCount") 0) }}
|
2023-10-26 02:30:47 +00:00
|
|
|
<li class="mb-1 group sm:mb-0 sm:me-7 sm:last:me-0">
|
2023-01-17 01:58:04 +00:00
|
|
|
<button id="search-button-m1" title="{{ i18n "search.open_button_title" }}">
|
|
|
|
<span
|
2023-10-26 02:30:47 +00:00
|
|
|
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
|
2023-01-17 01:58:04 +00:00
|
|
|
>
|
|
|
|
{{ partial "icon.html" "search" }}
|
|
|
|
</span>
|
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
|
2022-11-09 23:52:11 +00:00
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
{{ end }}
|
|
|
|
</nav>
|
|
|
|
</header>
|