From f8e2acf43b14beb84380c66ee6cc377c9386f40b Mon Sep 17 00:00:00 2001 From: Korbs Date: Tue, 10 Dec 2024 15:23:53 -0500 Subject: [PATCH] New Post component --- index.ts | 3 +- src/BlogPost.astro | 84 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 src/BlogPost.astro diff --git a/index.ts b/index.ts index 6dc73af..f002f21 100644 --- a/index.ts +++ b/index.ts @@ -4,7 +4,8 @@ import Hero from "./src/blocks/Hero.astro" // Components import Banner from "./src/Banner.astro" +import BlogPost from "./src/BlogPost.astro"; import Image from "./src/Image.astro"; // Export -export {Banner, CallToAction, Image, Hero} \ No newline at end of file +export {Banner, BlogPost, CallToAction, Image, Hero} \ No newline at end of file diff --git a/src/BlogPost.astro b/src/BlogPost.astro new file mode 100644 index 0000000..77a089d --- /dev/null +++ b/src/BlogPost.astro @@ -0,0 +1,84 @@ +--- +// Properties +const { + Title, + ImageSource, + Category, + Author, + Date, + Link +} = Astro.props + +// Components +import Image from './Image.astro' +--- + + +
+ {Category ?

{Category}

: null} + +
+
+

{Title}

+ +
+
+ +