From 181547a25213bee8a20002e07344b957386c4d0f Mon Sep 17 00:00:00 2001 From: Pauline Date: Sun, 26 Nov 2023 22:55:04 -0500 Subject: feat(build): transfer everything to esm/ts --- apps/website/src/layouts/BlogPost.astro | 36 +++++++++++++++++++++++++++++++++ apps/website/src/layouts/Layout.astro | 4 +++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 apps/website/src/layouts/BlogPost.astro (limited to 'apps/website/src/layouts') diff --git a/apps/website/src/layouts/BlogPost.astro b/apps/website/src/layouts/BlogPost.astro new file mode 100644 index 0000000..ed2a3c3 --- /dev/null +++ b/apps/website/src/layouts/BlogPost.astro @@ -0,0 +1,36 @@ +--- +import type { CollectionEntry } from 'astro:content'; +import Layout from './Layout.astro'; + +import '@styles/blog.css'; +import FormattedDate from '@components/base/FormattedDate.astro'; + +type Props = CollectionEntry<'blog'>['data']; + +const { title, description, pubDate, updatedDate, heroImage } = Astro.props; +--- + + +
+
+ {heroImage && Hero Image} +
+
+
+
+ + { + updatedDate && ( +
+ Last updated on +
+ ) + } +
+

{title}

+
+
+ +
+
+
diff --git a/apps/website/src/layouts/Layout.astro b/apps/website/src/layouts/Layout.astro index c4a2ff4..4acc407 100644 --- a/apps/website/src/layouts/Layout.astro +++ b/apps/website/src/layouts/Layout.astro @@ -6,11 +6,13 @@ import Favicon from '/media/polyfrost/minimal_bg.svg?url'; interface Props { title?: string + description?: string favicon?: string } const { title = 'Polyfrost', + description = 'Official website for Polyfrost.', favicon = Favicon, } = Astro.props; --- @@ -19,7 +21,7 @@ const { - + -- cgit