@@ -11,8 +11,6 @@ import links from "@data/links.json";
1111<section
1212 id =" navbar"
1313 class =" fixed top-0 z-50 transition-transform duration-300 transform-gpu w-full"
14- transition:name =" navbar"
15- transition:animate =" fade"
1614>
1715 <div
1816 class =" container max-w-[1150px] mx-auto px-6 py-2 mt-1 lg:p-2 lg:mt-6 flex items-center justify-between relative z-40 bg-white/80 rounded-full backdrop-blur-md shadow-lg"
@@ -48,12 +46,6 @@ import links from "@data/links.json";
4846 </div >
4947</section >
5048<Search />
51-
52- <style >
53- :root::view-transition-group(navbar) {
54- z-index: 100;
55- }
56- </style >
5749<script >
5850document.addEventListener("astro:page-load", () => {
5951 let prevScrollPos = window.pageYOffset;
@@ -63,7 +55,7 @@ document.addEventListener("astro:page-load", () => {
6355 let isFocused = false;
6456
6557 window.addEventListener("scroll", () => {
66- if (isFocused) return; // Don't hide navbar if focused
58+ if (isFocused) return;
6759 let currentScrollPos = window.pageYOffset;
6860 if (prevScrollPos > currentScrollPos) {
6961 navbar.style.transform = "translateY(0)";
@@ -85,12 +77,4 @@ document.addEventListener("astro:page-load", () => {
8577 }
8678 });
8779});
88-
89- document.addEventListener("astro:before-preparation", ()=>{
90- window.scrollTo({ left: 0, top: 0, behavior: "instant" });
91- });
92-
93- document.addEventListener("astro:after-preparation", ()=>{
94- window.scrollTo({ left: 0, top: 0, behavior: "instant" });
95- });
9680</script >
0 commit comments