@@ -4,6 +4,8 @@ import crocoderLogo from "../assets/crocoder-logo.png";
44import Menu from " ./Menu.astro" ;
55import MenuItem from " ./MenuItem.astro" ;
66
7+ const { position } = Astro .props ;
8+
79const optimizedLogo = await getImage ({
810 src: crocoderLogo ,
911 width: 63 ,
@@ -26,16 +28,18 @@ const caseStudies = [
2628 },
2729];
2830
31+ const isBlogPage = Astro .url .pathname .startsWith (" /blog" );
32+
2933const href = " #book-a-call-section" ;
3034---
3135
3236<header
33- class =" fixed m-auto
34- top-0
35- md:mx-2
36- md:top-1
37- z-50
38- w-full flex flex-col"
37+ class ={ ` ${ position ?? " fixed" } m-auto
38+ top-0
39+ md:mx-2
40+ ${ isBlogPage ? " md:mt-1 " : " md: top-1" }
41+ z-50
42+ w-full flex flex-col ` }
3943>
4044 <nav
4145 id =" nav-bar"
@@ -173,7 +177,10 @@ const href = "#book-a-call-section";
173177
174178 {
175179 caseStudies .map ((item ) => (
176- <a class = " text-xl hover:text-white text-wrap min-h-8" href = { item .href } >
180+ <a
181+ class = " text-xl hover:text-white text-wrap min-h-8"
182+ href = { item .href }
183+ >
177184 { item .title }
178185 </a >
179186 ))
@@ -230,6 +237,8 @@ const href = "#book-a-call-section";
230237 const mobileList = document.getElementById("mobile-list");
231238 const navMenuToggle = document.getElementById("nav-menu-toggle");
232239
240+ const isBlogPage = window.location.pathname.startsWith("/blog");
241+
233242 mm.add("(width >= 768px)", () => {
234243 if (!navBar || !bookACallAction) return;
235244
@@ -246,6 +255,8 @@ const href = "#book-a-call-section";
246255 display: "none",
247256 });
248257
258+ if (isBlogPage) return;
259+
249260 const tl = gsap.timeline({
250261 paused: true,
251262 defaults: { duration: FRAME_DURATION, ease: "none" },
0 commit comments