@@ -4,60 +4,91 @@ import maintainerrLogo from '../assets/logo.svg'
44import ' ../styles/global.css'
55---
66
7- <nav class =" relative max-w-6xl mx-auto flex items-center justify-between p-4" >
8- <Image
9- src ={ maintainerrLogo }
10- alt =" Maintainerr Logo"
11- width ={ 200 }
12- height ={ 50 }
13- class =" "
14- loading =" eager"
15- />
7+ <!-- Sentinel marking the top of the page; the nav goes opaque once it scrolls out. -->
8+ <div
9+ data-nav-sentinel
10+ aria-hidden =" true"
11+ class =" absolute left-0 top-0 h-10 w-px"
12+ >
13+ </div >
1614
17- <button
18- data-dropdown-toggle =" mobile-menu"
19- class =" text-white md:hidden"
20- aria-controls =" mobile-menu"
21- aria-expanded =" false"
22- >
23- <svg
24- xmlns =" http://www.w3.org/2000/svg"
25- class =" h-5 w-5"
26- viewBox =" 0 0 20 20"
27- fill =" currentColor"
28- >
29- <path
30- fill-rule =" evenodd"
31- d =" M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
32- clip-rule =" evenodd" ></path >
33- </svg >
34- </button >
15+ <nav class =" sticky top-0 z-50" >
16+ <div class =" mx-auto max-w-7xl px-4" >
17+ <div data-nav class =" flex items-center justify-between px-4 py-2" >
18+ <Image
19+ src ={ maintainerrLogo }
20+ alt =" Maintainerr Logo"
21+ width ={ 340 }
22+ height ={ 100 }
23+ class =" w-[150px]"
24+ loading =" eager"
25+ />
3526
36- <div class =" hidden md:flex" >
37- <a
38- href =" https://docs.maintainerr.info"
39- class =" text-white hover:text-amber-500 px-4 font-semibold"
40- >Documentation</a
41- >
42- <a
43- class =" text-white hover:text-amber-500 px-4 font-semibold"
44- href =" https://features.maintainerr.info/?view=most-wanted"
45- target =" _blank" >Feature Requests</a
46- >
47- <a
48- class =" text-white hover:text-amber-500 px-4 font-semibold"
49- href =" https://discord.maintainerr.info"
50- target =" _blank"
51- >Discord
52- </a >
53- <a
54- class =" text-white hover:text-amber-500 px-4 font-semibold"
55- href =" https://github.com/maintainerr/maintainerr"
56- target =" _blank" >Github</a
57- >
27+ <button
28+ data-dropdown-toggle =" mobile-menu"
29+ class =" text-white md:hidden"
30+ aria-controls =" mobile-menu"
31+ aria-expanded =" false"
32+ >
33+ <svg
34+ xmlns =" http://www.w3.org/2000/svg"
35+ class =" h-5 w-5"
36+ viewBox =" 0 0 20 20"
37+ fill =" currentColor"
38+ >
39+ <path
40+ fill-rule =" evenodd"
41+ d =" M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
42+ clip-rule =" evenodd" ></path >
43+ </svg >
44+ </button >
45+
46+ <div class =" hidden md:flex" >
47+ <a
48+ href =" https://docs.maintainerr.info"
49+ class =" text-white hover:text-amber-500 px-4 font-semibold"
50+ >Documentation</a
51+ >
52+ <a
53+ class =" text-white hover:text-amber-500 px-4 font-semibold"
54+ href =" https://features.maintainerr.info/?view=most-wanted"
55+ target =" _blank" >Feature Requests</a
56+ >
57+ <a
58+ class =" text-white hover:text-amber-500 px-4 font-semibold"
59+ href =" https://discord.maintainerr.info"
60+ target =" _blank"
61+ >Discord
62+ </a >
63+ <a
64+ class =" text-white hover:text-amber-500 px-4 font-semibold"
65+ href =" https://github.com/maintainerr/maintainerr"
66+ target =" _blank" >Github</a
67+ >
68+ </div >
69+ </div >
5870 </div >
5971</nav >
6072
73+ <script >
74+ // Transparent over the hero so the background image isn't covered; fade in
75+ // the zinc-800/40 bar only once scrolled into the content. Driven by an
76+ // IntersectionObserver (fires once per crossing) rather than the scroll
77+ // event, so a fast fling to the top doesn't flicker around the threshold.
78+ // No backdrop-blur: re-blurring every scroll frame caused noticeable jank.
79+ const nav = document.querySelector('[data-nav]')
80+ const sentinel = document.querySelector('[data-nav-sentinel]')
81+ if (nav && sentinel) {
82+ const io = new IntersectionObserver(
83+ ([entry]) => {
84+ nav.classList.toggle('bg-zinc-800/95', !entry.isIntersecting)
85+ },
86+ { threshold: 0 },
87+ )
88+ io.observe(sentinel)
89+ }
90+ </script >
91+
6192<!-- Mobile dropdown -->
6293<div id =" mobile-menu" class =" hidden z-50 w-64 mt-4 px-2" >
6394 <ul
0 commit comments