diff --git a/app/blog/page.tsx b/app/blog/page.tsx index c453f1a..45f01e3 100644 --- a/app/blog/page.tsx +++ b/app/blog/page.tsx @@ -74,8 +74,18 @@ export default async function BlogOverviewPage({ + {/* Plain div, not — this bar sits right at/just past the + hero's bottom edge, exactly the "already near the initial + viewport top" position Reveal.tsx's own comment documents as a + whileInView(margin:"-80px") trap: the shrunk viewport can + permanently miss triggering "entered view" for an element + that's already visible without any further scroll, since + `once: true` never gets a second chance. The Hero brand dot + hit the identical bug and switched to a plain animate — this + filter bar doesn't need a scroll-reveal animation at all, so + it's simplest to just not wrap it in Reveal in the first place. */} {allCategories.length > 1 && ( - +
{allCategories.map((category) => { const active = activeCategories.includes(category); return ( @@ -100,7 +110,7 @@ export default async function BlogOverviewPage({ Zurücksetzen )} - +
)} {posts.length === 0 && ( diff --git a/app/components/Navbar.tsx b/app/components/Navbar.tsx index 0640568..1f22298 100644 --- a/app/components/Navbar.tsx +++ b/app/components/Navbar.tsx @@ -246,7 +246,15 @@ function CartLink() { ); } -export function Navbar({ singleActiveProduct, wishlistEnabled }: { singleActiveProduct: boolean; wishlistEnabled: boolean }) { +export function Navbar({ + singleActiveProduct, + wishlistEnabled, + searchEnabled, +}: { + singleActiveProduct: boolean; + wishlistEnabled: boolean; + searchEnabled: boolean; +}) { const pathname = usePathname(); const [scrolled, setScrolled] = useState(false); const [activeSection, setActiveSection] = useState(""); @@ -545,7 +553,7 @@ export function Navbar({ singleActiveProduct, wishlistEnabled }: { singleActiveP built-in padding read as too much space on mobile, where these two icons are the only always-visible controls. */}
- + {searchEnabled && } {wishlistEnabled && } diff --git a/app/layout.tsx b/app/layout.tsx index 4337f59..e668c15 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -4,7 +4,7 @@ import "./globals.css"; import { Navbar } from "./components/Navbar"; import { CartFlyProvider } from "./components/CartFly"; import { CartSync } from "./components/CartSync"; -import { getProducts, getSeoSettings, getCompanySettings, getWishlistEnabled } from "./lib/payload"; +import { getProducts, getSeoSettings, getCompanySettings, getWishlistEnabled, getSearchEnabled } from "./lib/payload"; import { buildOrganizationSchema } from "./lib/structuredData"; const inter = Inter({ @@ -67,7 +67,12 @@ export default async function RootLayout({ // just to know whether Navbar's "Shop" link should behave as an anchor // to the homepage spotlight instead of a real /shop navigation (see // Navbar.tsx/ProductSpotlight.tsx). - const [products, seller, wishlistEnabled] = await Promise.all([getProducts(), getCompanySettings(), getWishlistEnabled()]); + const [products, seller, wishlistEnabled, searchEnabled] = await Promise.all([ + getProducts(), + getCompanySettings(), + getWishlistEnabled(), + getSearchEnabled(), + ]); const singleActiveProduct = products.filter((p) => p.active).length === 1; // Organization JSON-LD on every page — one canonical node (@id) that // Product/Article schemas elsewhere link back to via `{ "@id": ... }` @@ -87,7 +92,7 @@ export default async function RootLayout({