From c3837ef6c852e6a484619adf35ad9aec111269f8 Mon Sep 17 00:00:00 2001 From: fiatcode Date: Thu, 22 Jan 2026 14:40:50 +0700 Subject: [PATCH] change layout props to use contentLayout instead of contentClass --- src/layouts/Layout.astro | 7 ++++--- src/pages/index.astro | 2 +- src/pages/posts/[slug].astro | 1 - src/pages/posts/index.astro | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 0f00213..90f92f5 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -6,10 +6,11 @@ import Header from "../components/Header.astro"; interface Props { title: string; description: string; - contentClass?: string; + contentLayout?: "default" | "fill-height"; } -const { title, description, contentClass = "" } = Astro.props; +const { title, description, contentLayout = "default" } = Astro.props; +const contentClass = contentLayout === "fill-height" ? "flex-1" : "py-12"; --- @@ -24,7 +25,7 @@ const { title, description, contentClass = "" } = Astro.props;
-
+