From ba1be9573ef20d6424ae987257a1c727c47d4b53 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Tue, 6 Oct 2026 20:46:31 +0300 Subject: Initial setup for website rewrite --- old_stuff/src/components/BlogItem.astro | 40 +++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 old_stuff/src/components/BlogItem.astro (limited to 'old_stuff/src/components/BlogItem.astro') diff --git a/old_stuff/src/components/BlogItem.astro b/old_stuff/src/components/BlogItem.astro new file mode 100644 index 0000000..8440d85 --- /dev/null +++ b/old_stuff/src/components/BlogItem.astro @@ -0,0 +1,40 @@ +--- +import TerminalBorder from "@components/TerminalBorder.astro"; + +function formatDate(date: Date) { + const day = date.getDate(); + const month = date.toLocaleString("default", { month: "long" }); + const year = date.getFullYear(); + return `${month} ${day}, ${year}`; +} + +interface Props { + title: string; + description: string; + date: Date; + href?: string; + header?: string; +} + +const { title, description, date, href, header } = Astro.props; +--- + + + + { + href ? ( + +

+ {title} +

+

{description}

+
+ ) : ( + <> +

{title}

+

{description}

+ + ) + } +
+
-- cgit v1.3.1