From b9d85a552002ffbe447c3452be5147f2f1117fe8 Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Mon, 11 Aug 2025 19:10:46 -0500 Subject: [PATCH] fix layout --- src/components/blog/BlogCategoryCard.astro | 36 ++++++++-------------- src/content/categories/cloud.md | 2 +- src/env.d.ts | 5 --- src/pages/categories/index.astro | 1 - src/pages/index.astro | 3 +- 5 files changed, 15 insertions(+), 32 deletions(-) diff --git a/src/components/blog/BlogCategoryCard.astro b/src/components/blog/BlogCategoryCard.astro index d5691e9..a824319 100644 --- a/src/components/blog/BlogCategoryCard.astro +++ b/src/components/blog/BlogCategoryCard.astro @@ -5,21 +5,9 @@ interface Props { description: string; count: number; publishDate: string; - layoutPattern?: { - smCol: number; - mdCol: number; - row: number; - index: number; - }; } -const { slug, layoutPattern, title, description, count, publishDate } = Astro.props; -const isSingleItem = - layoutPattern && - layoutPattern.row === 1 && - (layoutPattern.smCol === 1 || layoutPattern.mdCol === 1); - -const formatedDescription = isSingleItem ? `No description available` : description; +const { slug, title, description, count, publishDate } = Astro.props; const baseClasses = 'group group-hover rounded-xl flex h-full min-h-[220px] cursor-pointer flex-col overflow-hidden'; @@ -32,17 +20,17 @@ const bgColorClasses =
-
-

- {title} -

-

- {formatedDescription} -

+
+
+

+ {title} +

+

+ {description} +

+
diff --git a/src/content/categories/cloud.md b/src/content/categories/cloud.md index ba26ee8..b8b1f54 100644 --- a/src/content/categories/cloud.md +++ b/src/content/categories/cloud.md @@ -1,4 +1,4 @@ --- title: 'Cloud ☁️' -description: "Its just someone else's server" +description: 'Its just someone else's server' --- diff --git a/src/env.d.ts b/src/env.d.ts index 06090d8..6c67e04 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -1,8 +1,3 @@ -<<<<<<< HEAD /// /// /// -======= -/// -/// ->>>>>>> 184f0c7 (fix path) diff --git a/src/pages/categories/index.astro b/src/pages/categories/index.astro index e29ff20..0346f2f 100644 --- a/src/pages/categories/index.astro +++ b/src/pages/categories/index.astro @@ -118,7 +118,6 @@ const description = description={category.data.description} count={postMap.get(category.slug)?.length ?? 0} publishDate={timeago(postMap.get(category.slug)?.[0]?.published_date)} - layoutPattern={category.layoutPattern} />
); diff --git a/src/pages/index.astro b/src/pages/index.astro index afb463b..aeb4a00 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -11,7 +11,8 @@ import homeImg from '@images/autumn_mountain.png'; const global = await directus.request(readSingleton('site_global')); -const description = 'Engineering the cloud by day, homelab by night, and exploring Minnesota in between.'; +const description = + 'Engineering the cloud by day, homelab by night, and exploring Minnesota in between.'; ---