From ed5a69290f6e5a79a02651cf87b4137fad3130aa Mon Sep 17 00:00:00 2001 From: Marcel Veselka Date: Thu, 4 Jun 2026 07:23:53 +0200 Subject: [PATCH] fix(home): remove homepage reveal-on-scroll navbar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After reverting the hero redesign (#230 via #232), #229's reveal-on-scroll navbar was left orphaned: the homepage navbar stayed hidden at the top (position: fixed; translateY(-100%)) and only slid in past 8px of scroll — behaviour that only made sense paired with #230's full-screen hero. On the restored normal-height hero it reads as a missing menu. Remove just the hiding behaviour: the scroll listener in index.tsx and the body.is-home .navbar fixed/translate rules in custom.css. The homepage navbar is now always visible like every subpage. Keeps the rest of #229 (nav links shown on the homepage, About us in the footer only). --- src/css/custom.css | 14 -------------- src/pages/index.tsx | 16 +--------------- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/src/css/custom.css b/src/css/custom.css index d190ed1..340a1df 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -264,20 +264,6 @@ a.navbar__item:hover { filter: invert(1); } -/* Homepage: navbar hidden at top, slides in on scroll (toggled in index.tsx). */ -body.is-home .navbar { - position: fixed; - top: 0; - left: 0; - right: 0; - transform: translateY(-100%); - transition: transform 0.3s ease; - will-change: transform; -} -body.is-home .navbar.navbar--revealed { - transform: translateY(0); -} - /* Hero primary CTA — slow pulsing glow when enabled, invites the click without ever animating loud enough to feel pushy. Disabled state stays still. Pulse colour matches the button fill in each theme. */ diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 626c0e4..b6f0df2 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,4 +1,4 @@ -import React, { useEffect } from "react"; +import React from "react"; import Layout from "@theme/Layout"; import Head from "@docusaurus/Head"; @@ -60,20 +60,6 @@ const JSONLD_APP = { }; export default function Home(): JSX.Element { - // Homepage navbar reveals on scroll; styles in custom.css. - useEffect(() => { - const navbar = document.querySelector(".navbar"); - if (!navbar) return; - const sync = () => - navbar.classList.toggle("navbar--revealed", window.scrollY > 8); - sync(); - window.addEventListener("scroll", sync, { passive: true }); - return () => { - window.removeEventListener("scroll", sync); - navbar.classList.remove("navbar--revealed"); - }; - }, []); - return (