diff --git a/DEV_LOG.md b/DEV_LOG.md index a5d1923..2c4a2fd 100644 --- a/DEV_LOG.md +++ b/DEV_LOG.md @@ -41,6 +41,8 @@ - **Task 25**: 引入 Pagefind 依赖,并重构 build 工作流实现自动建立本地离线搜索索引。 +- **Task 26**: 构建 `Search.astro` 搜索框并挂载至全局侧边栏,完成暗黑主题样式覆盖。 + --- **🔄 当前状态**: 系统架构稳定,UI 交互流畅。所有功能模块已固化至 Git 版本控制。 **📝 下一步计划**: 等待分配新需求(如:全文搜索、SEO 优化等)。 \ No newline at end of file diff --git a/src/components/Search.astro b/src/components/Search.astro new file mode 100644 index 0000000..978ea34 --- /dev/null +++ b/src/components/Search.astro @@ -0,0 +1,58 @@ +--- +// 动态加载 Pagefind UI 的包装组件 +--- +
+ + + + diff --git a/src/components/Sidebar.astro b/src/components/Sidebar.astro index 8d20393..6daba48 100644 --- a/src/components/Sidebar.astro +++ b/src/components/Sidebar.astro @@ -1,10 +1,12 @@ --- import { getCollection } from 'astro:content'; +import Search from './Search.astro'; // Astro v6 中获取所有文档 const docs = await getCollection('docs'); ---