From 16aef308699892f79b3866c5ceefe3c856d1b152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E6=BD=87?= Date: Mon, 24 Nov 2025 12:53:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20src/pages/docs/index.astro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/docs/index.astro | 80 +++++++++++++++++++++++++++++++++----- 1 file changed, 70 insertions(+), 10 deletions(-) diff --git a/src/pages/docs/index.astro b/src/pages/docs/index.astro index 2d4e4ab..12f17df 100644 --- a/src/pages/docs/index.astro +++ b/src/pages/docs/index.astro @@ -7,17 +7,77 @@ import Blank from '@/layouts/blank.astro'; --- -
-

My posts

-
    +
    +
    + {/* 页面标题区域 */} +
    +

    + 📚 文档列表 +

    +

    浏览所有可用的文档资源

    +
    +
    + + {/* 文档列表 */} +
    + { + posts.map((post) => { + const tags = post.data.tags || []; + return ( +
    +
    + {/* 文档标题 */} + +

    + {post.data.title} +

    +
    + + {/* 文档描述(如果有) */} + {post.data.description &&

    {post.data.description}

    } + + {/* 标签列表 */} + {tags.length > 0 && ( +
    + {tags.map((tag) => ( +
    + # + {tag} +
    + ))} +
    + )} + + {/* 阅读更多指示器 */} + + 阅读更多 + + + + +
    +
    + ); + }) + } +
    + + {/* 空状态 */} { - posts.map((post) => ( -
  • - {/* {post.data.title} */} - {post.data.title} -
  • - )) + posts.length === 0 && ( +
    +
    📭
    +

    暂无文档

    +
    + ) } -
+