diff --git a/src/components/BlogItem.astro b/src/components/BlogItem.astro index d94b6f5..08b98c4 100644 --- a/src/components/BlogItem.astro +++ b/src/components/BlogItem.astro @@ -22,7 +22,7 @@ interface Props { title: string; description: string; date: Date; - href: string; + href?: string; header?: string; } @@ -31,13 +31,20 @@ const { title, description, date, href, header } = Astro.props; - -

- {title} -

-

- {description} -

-
+ { + href ? ( + +

+ {title} +

+

{description}

+
+ ) : ( + <> +

{title}

+

{description}

+ + ) + }
diff --git a/src/layouts/Blog.astro b/src/layouts/Blog.astro index 46985d0..62f66bc 100644 --- a/src/layouts/Blog.astro +++ b/src/layouts/Blog.astro @@ -19,7 +19,7 @@ const { title } = Astro.props; {title} -
+
diff --git a/src/pages/blogs.astro b/src/pages/blogs.astro index b4a0632..06bafdb 100644 --- a/src/pages/blogs.astro +++ b/src/pages/blogs.astro @@ -24,7 +24,7 @@ const blogs = (await getCollection("blogs")) <> diff --git a/src/pages/blogs/[...slug].astro b/src/pages/blogs/[...slug].astro index 33bfc84..3b15fc7 100644 --- a/src/pages/blogs/[...slug].astro +++ b/src/pages/blogs/[...slug].astro @@ -1,6 +1,9 @@ --- -import Blog from "@layouts/Blog.astro"; import { getCollection } from "astro:content"; +import Blog from "@layouts/Blog.astro"; +import Markdown from "@components/Markdown.astro"; +import Terminal from "@layouts/Terminal.astro"; +import BlogItem from "@components/BlogItem.astro"; export async function getStaticPaths() { const blogEntries = await getCollection("blogs"); @@ -14,6 +17,21 @@ const { entry } = Astro.props; const { Content } = await entry.render(); --- - - - + +
+
+ +
+ +
+
+
+
+ + + + diff --git a/src/pages/index.astro b/src/pages/index.astro index a150059..872b360 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -123,9 +123,7 @@ watching Anime or solving Rubik's cubes fast.`.trimStart();