diff --git a/src/components/cards/LargeBlogLeftCard.astro b/src/components/cards/LargeBlogLeftCard.astro index 74b6919..831077f 100644 --- a/src/components/cards/LargeBlogLeftCard.astro +++ b/src/components/cards/LargeBlogLeftCard.astro @@ -2,17 +2,19 @@ import { Icon } from 'astro-icon/components'; import { Image } from 'astro:assets'; +import { formatDate } from '@support/time'; import { getDirectusImageURL } from '@/support/url'; interface Props { title: string; subTitle: string; url: string; + pubDate: Date, img: string; imgAlt: string; } -const { title, subTitle, url, img, imgAlt } = Astro.props; +const { title, subTitle, url, pubDate, img, imgAlt } = Astro.props; ---
@@ -40,17 +42,21 @@ const { title, subTitle, url, img, imgAlt } = Astro.props;

{subTitle}

-
-
- - Read More - - +
+
+
+ + Read More + + +
+ + {formatDate(pubDate)} +
-
diff --git a/src/components/cards/LargeBlogRightCard.astro b/src/components/cards/LargeBlogRightCard.astro index a093f6f..fd2d07a 100644 --- a/src/components/cards/LargeBlogRightCard.astro +++ b/src/components/cards/LargeBlogRightCard.astro @@ -2,19 +2,21 @@ import { Icon } from 'astro-icon/components'; import { Image } from 'astro:assets'; +import { formatDate } from '@support/time'; import { getDirectusImageURL } from '@/support/url'; interface Props { title: string; subTitle: string; url: string; + pubDate: Date; imgOne: string; imgOneAlt: string; imgTwo?: string; imgTwoAlt?: string; } -const { title, subTitle, url, imgOne, imgOneAlt, imgTwo, imgTwoAlt } = Astro.props; +const { title, subTitle, url, pubDate, imgOne, imgOneAlt, imgTwo, imgTwoAlt } = Astro.props; ---
@@ -30,16 +32,21 @@ const { title, subTitle, url, imgOne, imgOneAlt, imgTwo, imgTwoAlt } = Astro.pro

{subTitle}

-
-
- - Read More - - +
+
+
+ + Read More + + +
+ + {formatDate(pubDate)} +
{!imgTwo ? ( diff --git a/src/components/sections/SelectedPostsSection.astro b/src/components/sections/SelectedPostsSection.astro index 75de08b..03efe7b 100644 --- a/src/components/sections/SelectedPostsSection.astro +++ b/src/components/sections/SelectedPostsSection.astro @@ -17,6 +17,7 @@ const { posts } = Astro.props; title={post.title} subTitle={post.description} url={`/blog/${post.slug}`} + pubDate={post.published_date} img={post.image} imgAlt={post.image_alt} /> @@ -25,6 +26,7 @@ const { posts } = Astro.props; title={post.title} subTitle={post.description} url={`/blog/${post.slug}`} + pubDate={post.published_date} imgOne={post.image} imgOneAlt={post.image_alt} imgTwo={post?.image_second}