congo/layouts/partials/header.html

46 lines
1.4 KiB
HTML

<header
class="flex justify-between py-6 font-semibold sm:items-center sm:py-10 text-neutral-900 dark:text-neutral"
>
{{/* Site logo/title */}}
<div>
{{ if .Site.Params.Logo -}}
{{ $logo := resources.Get .Site.Params.Logo }}
{{ if $logo }}
<a href="{{ "/" | relURL }}">
<img
src="{{ $logo.RelPermalink }}"
width="{{ div $logo.Width 2 }}"
height="{{ div $logo.Height 2 }}"
class="max-w-[10rem] max-h-[10rem] object-scale-down object-left"
alt="{{ .Site.Title }}"
/>
</a>
{{ end }}
{{ else }}
<a
class="hover:underline hover:underline-primary-500 hover:underline-thickness-bold hover:underline-offset-small"
rel="me"
href="{{ "/" | relURL }}"
>{{ .Site.Title | markdownify | emojify }}</a
>
{{- end }}
</div>
{{/* Main menu */}}
{{ if .Site.Menus.main }}
<nav>
<ul class="flex flex-col list-none sm:flex-row">
{{ range .Site.Menus.main }}
<li class="mb-1 text-right sm:mb-0 sm:mr-7 sm:last:mr-0">
<a
class="hover:underline hover:underline-primary-500 hover:underline-thickness-bold hover:underline-offset-small"
href="{{ .URL }}"
title="{{ .Title }}"
>{{ .Name | markdownify | emojify }}</a
>
</li>
{{ end }}
</ul>
</nav>
{{ end }}
</header>