diff --git a/src/components/BlogItem.astro b/src/components/BlogItem.astro
new file mode 100644
index 0000000..5f6b0e5
--- /dev/null
+++ b/src/components/BlogItem.astro
@@ -0,0 +1,22 @@
+---
+import TerminalBorder from "../components/TerminalBorder.astro";
+
+interface Props {
+ title: string;
+ description: string;
+ date: string;
+}
+
+const { title, description, date } = Astro.props;
+---
+
+
+
+
+ {title}
+
+
+ {description}
+
+
+
diff --git a/src/components/TerminalBorder.astro b/src/components/TerminalBorder.astro
index bb6874c..0d9a75d 100644
--- a/src/components/TerminalBorder.astro
+++ b/src/components/TerminalBorder.astro
@@ -1,15 +1,22 @@
---
interface Props {
- header: string;
+ header?: string;
+ footer?: string;
margin?: string;
class?: string;
}
-const { header, margin = "-1px", class: htmlClass } = Astro.props;
+const {
+ header = "",
+ footer = "",
+ margin = "-1px",
+ class: htmlClass,
+} = Astro.props;
---
- {header}
+ {header}
+ {footer}
@@ -24,7 +31,7 @@ const { header, margin = "-1px", class: htmlClass } = Astro.props;
border-color: var(--alt);
}
- .tag {
+ .tag-top {
position: absolute;
top: -0.6rem;
left: 0.5rem;
@@ -34,4 +41,15 @@ const { header, margin = "-1px", class: htmlClass } = Astro.props;
font-size: 0.8rem;
color: var(--alt);
}
+
+ .tag-bottom {
+ position: absolute;
+ bottom: -0.6rem;
+ left: 0.5rem;
+ background-color: var(--background);
+ padding-right: 0.5rem;
+ padding-left: 0.5rem;
+ font-size: 0.8rem;
+ color: var(--alt);
+ }
diff --git a/src/content/config.ts b/src/content/config.ts
index 33140f3..17aeedb 100644
--- a/src/content/config.ts
+++ b/src/content/config.ts
@@ -3,5 +3,10 @@ import { defineCollection, z } from "astro:content";
export const collections = {
blogs: defineCollection({
type: "content",
+ schema: z.object({
+ title: z.string(),
+ description: z.string().optional(),
+ date: z.date(),
+ }),
}),
};
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro
index d8e68d1..26a8e13 100644
--- a/src/layouts/Layout.astro
+++ b/src/layouts/Layout.astro
@@ -1,11 +1,12 @@
---
import "../styles/terminal.css";
+import Nav from "../components/Nav.astro";
interface Props {
- title: string;
+ dir: string;
}
-const { title } = Astro.props;
+const { dir: title } = Astro.props;
---
@@ -16,9 +17,12 @@ const { title } = Astro.props;
- {title}
+ /home/kyren/{title}
-
+
+
+
+