1
0
Fork 0

sticky header
All checks were successful
Hugo / build (push) Successful in -12s

This commit is contained in:
brooke 2024-09-12 14:36:45 -04:00
parent 3bcdc0159e
commit 978a9bbe7c
3 changed files with 17 additions and 23 deletions

View file

@ -1,25 +1,13 @@
<div <div class="m-4 rounded-lg p-4 min-h-[40.27px] flex flex-row justify-between bg-[#f1f5fc] sticky-navbar">
class="m-4 rounded-lg p-4 min-h-[40.27px] flex flex-row justify-between bg-[#f1f5fc]"
>
{{ with site.GetPage "_index.md" }} {{ with site.GetPage "_index.md" }}
<a class="justify-center flex mb-2 sm:mb-0" aria-label="Back to home" href="/" <a class="justify-center flex mb-2 sm:mb-0" aria-label="Back to home" href="/"><img class="h-[40.2667px]"
><img alt="{{ .Params.logoAlt }}" src="{{ .Params.logo }}" loading="lazy" /></a>
class="h-[40.2667px]" <nav class="place-self-center h-8 flex justify-end gap-4 text-[#464f6d] pr-0 sm:pr-6">
alt="{{ .Params.logoAlt }}"
src="{{ .Params.logo }}"
loading="lazy"
/></a>
<nav
class="place-self-center h-8 flex justify-end gap-4 text-[#464f6d] pr-0 sm:pr-6"
>
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
<a <a style="white-space: nowrap"
style="white-space: nowrap"
class="underline underline-offset-0 decoration-2 decoration-transparent hover:decoration-white hover:underline-offset-2 ease-in-out duration-300 place-self-center" class="underline underline-offset-0 decoration-2 decoration-transparent hover:decoration-white hover:underline-offset-2 ease-in-out duration-300 place-self-center"
href="{{ .URL }}" href="{{ .URL }}" aria-label="{{ .Identifier }}">
aria-label="{{ .Identifier }}"
>
{{ $text := print .Name | safeHTML }} {{ $text }} {{ $text := print .Name | safeHTML }} {{ $text }}
</a> </a>
{{ end }} {{ end }}

View file

@ -59,6 +59,12 @@
font-style: normal; font-style: normal;
} }
.sticky-navbar {
position: -webkit-sticky;
position: sticky;
top: 1rem;
z-index: 1000;
}
body { body {
font-family: 'Inter', sans-serif; font-family: 'Inter', sans-serif;

File diff suppressed because one or more lines are too long