2021-09-22 02:24:46 +00:00
|
|
|
<header
|
2022-04-03 03:51:52 +00:00
|
|
|
class="flex justify-between py-6 font-semibold sm:items-center sm:py-10 text-neutral-900 dark:text-neutral print:hidden"
|
2021-09-22 02:24:46 +00:00
|
|
|
>
|
2021-10-19 04:44:23 +00:00
|
|
|
{{/* Site logo/title */}}
|
2021-08-11 05:28:33 +00:00
|
|
|
<div>
|
2021-09-22 02:24:46 +00:00
|
|
|
{{ if .Site.Params.Logo -}}
|
|
|
|
{{ $logo := resources.Get .Site.Params.Logo }}
|
|
|
|
{{ if $logo }}
|
2022-01-11 01:00:27 +00:00
|
|
|
<a href="{{ "/" | relLangURL }}">
|
2021-10-19 06:33:18 +00:00
|
|
|
<img
|
|
|
|
src="{{ $logo.RelPermalink }}"
|
|
|
|
width="{{ div $logo.Width 2 }}"
|
|
|
|
height="{{ div $logo.Height 2 }}"
|
2021-10-28 06:19:53 +00:00
|
|
|
class="max-w-[10rem] max-h-[10rem] object-scale-down object-left"
|
2021-10-19 06:33:18 +00:00
|
|
|
alt="{{ .Site.Title }}"
|
|
|
|
/>
|
|
|
|
</a>
|
2021-09-22 02:24:46 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ else }}
|
|
|
|
<a
|
2022-02-20 03:36:36 +00:00
|
|
|
class="decoration-primary-500 hover:underline hover:decoration-2 hover:underline-offset-2"
|
2021-09-22 02:24:46 +00:00
|
|
|
rel="me"
|
2022-01-11 01:00:27 +00:00
|
|
|
href="{{ "/" | relLangURL }}"
|
2021-10-26 23:34:50 +00:00
|
|
|
>{{ .Site.Title | markdownify | emojify }}</a
|
2021-09-22 02:24:46 +00:00
|
|
|
>
|
|
|
|
{{- end }}
|
2022-01-11 01:00:27 +00:00
|
|
|
{{ partial "translations.html" . }}
|
2021-08-11 05:28:33 +00:00
|
|
|
</div>
|
2021-10-19 04:44:23 +00:00
|
|
|
{{/* Main menu */}}
|
2022-06-25 00:40:24 +00:00
|
|
|
{{ if or .Site.Menus.main (.Site.Params.enableSearch | default false) }}
|
2021-10-19 04:44:23 +00:00
|
|
|
<nav>
|
|
|
|
<ul class="flex flex-col list-none sm:flex-row">
|
2022-06-25 00:40:24 +00:00
|
|
|
{{ if .Site.Menus.main }}
|
|
|
|
{{ range .Site.Menus.main }}
|
|
|
|
<li
|
|
|
|
class="mb-1 ltr:text-right rtl:text-left sm:mb-0 ltr:sm:mr-7 ltr:sm:last:mr-0 rtl:sm:ml-7 rtl:sm:last:ml-0"
|
2021-10-19 04:44:23 +00:00
|
|
|
>
|
2022-06-25 00:40:24 +00:00
|
|
|
<a
|
|
|
|
class="decoration-primary-500 hover:underline hover:decoration-2 hover:underline-offset-2"
|
|
|
|
href="{{ .URL }}"
|
|
|
|
title="{{ .Title }}"
|
|
|
|
>{{ .Name | markdownify | emojify }}</a
|
|
|
|
>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
2021-10-19 04:44:23 +00:00
|
|
|
{{ end }}
|
2022-01-13 04:56:30 +00:00
|
|
|
{{ if .Site.Params.enableSearch | default false }}
|
|
|
|
<li
|
|
|
|
class="ltr:text-right rtl:text-left ltr:sm:mr-7 ltr:sm:last:mr-0 rtl:sm:ml-7 rtl:sm:last:ml-0"
|
|
|
|
>
|
|
|
|
<button
|
|
|
|
id="search-button"
|
2022-01-18 23:25:48 +00:00
|
|
|
class="text-base hover:text-primary-600 dark:hover:text-primary-400"
|
2022-01-13 04:56:30 +00:00
|
|
|
title="{{ i18n "search.open_button_title" }}"
|
|
|
|
>
|
|
|
|
{{ partial "icon.html" "search" }}
|
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
2021-10-19 04:44:23 +00:00
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
{{ end }}
|
2021-08-11 05:28:33 +00:00
|
|
|
</header>
|