diff --git a/app/blog/page.tsx b/app/blog/page.tsx
index 45f01e3..20e6279 100644
--- a/app/blog/page.tsx
+++ b/app/blog/page.tsx
@@ -4,7 +4,7 @@ import Image from "next/image";
import { Reveal, RevealGroup, RevealItem } from "../components/Reveal";
import { Newsletter } from "../components/Newsletter";
import { Footer } from "../components/Footer";
-import { getBlogPosts } from "../lib/payload";
+import { getBlogPosts, getBlogFilterEnabled } from "../lib/payload";
import { formatDate } from "../lib/format";
export const metadata: Metadata = {
@@ -41,10 +41,10 @@ export default async function BlogOverviewPage({
}: {
searchParams: Promise<{ categories?: string }>;
}) {
- const allPosts = await getBlogPosts(100);
+ const [allPosts, blogFilterEnabled] = await Promise.all([getBlogPosts(100), getBlogFilterEnabled()]);
const { categories: categoriesParam } = await searchParams;
- const activeCategories = categoriesParam ? categoriesParam.split(",").filter(Boolean) : [];
- const allCategories = distinctCategories(allPosts);
+ const activeCategories = blogFilterEnabled && categoriesParam ? categoriesParam.split(",").filter(Boolean) : [];
+ const allCategories = blogFilterEnabled ? distinctCategories(allPosts) : [];
const posts =
activeCategories.length === 0 ? allPosts : allPosts.filter((post) => post.categories.some((c) => activeCategories.includes(c)));
const [featured, ...rest] = posts;
@@ -84,18 +84,31 @@ export default async function BlogOverviewPage({
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. */}
+ {/* relative z-20 — the featured-post card right below pulls itself
+ up by -mt-8 with its own z-10 to overlap the *hero's* bottom
+ edge (its original, intended design). Inserting this filter
+ bar between the hero and that card meant the same -mt-8 pull
+ now overlapped THIS bar instead, and the card's higher/equal
+ stacking rendered on top of it, visually hiding the chips
+ behind the card. z-20 keeps this bar above that overlap
+ regardless. */}
{allCategories.length > 1 && (
-