diff --git a/src/components/posts-loop.astro b/src/components/posts-loop.astro
deleted file mode 100644
index 762f2ac..0000000
--- a/src/components/posts-loop.astro
+++ /dev/null
@@ -1,94 +0,0 @@
----
-import { getCollection } from "astro:content";
-const allPosts = await getCollection("post");
-
-const { count } = Astro.props;
-
-function parseDate(dateStr) {
- const [month, day, year] = dateStr.split(" ");
- return new Date(`${month} ${parseInt(day)}, ${year}`);
-}
-
-const sortedPosts = allPosts
- .map((post) => ({
- ...post,
- date: parseDate(post.data.dateFormatted),
- }))
- .sort((a, b) => b.date.getTime() - a.date.getTime());
-
-const postsLoop = sortedPosts.slice(0, count).map((post) => {
- return {
- ...(post.data || {}),
- link: `/post/${post.slug}`,
- };
-});
----
-
-{
- postsLoop.map((post) => {
- return (
-
-
-
-
-
-
- {post.title}
-
-
-
-
- {post.description}
-
-
- Posted on {post.dateFormatted}
-
-
-
- )
- })
-}
diff --git a/src/pages/index.astro b/src/pages/index.astro
index 22902eb..a33b0a3 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -8,13 +8,11 @@ import Layout from "../layouts/main.astro";
Hello, I'm Bi.
@@ -44,7 +42,6 @@ import Layout from "../layouts/main.astro";
src="/assets/images/photo.png"
loading="eager"
decoding="auto"
- /* 3. 关键修改:将 md:max-w-md 改为 md:max-w-lg 或直接取消限制,让图片随容器变大 */
class="relative z-30 w-full aspect-[790/1189] md:max-w-lg ml-auto dark:-translate-y-0.5"
/>
diff --git a/src/pages/posts.astro b/src/pages/posts.astro
index 1da3790..3907e47 100644
--- a/src/pages/posts.astro
+++ b/src/pages/posts.astro
@@ -1,6 +1,5 @@
---
import PageHeading from "../components/page-heading.astro";
-import PostsLoop from "../components/posts-loop.astro";
import Layout from "../layouts/main.astro";
---
@@ -12,7 +11,6 @@ import Layout from "../layouts/main.astro";
/>