Expand description
归档与标签详情共用的索引页。
/archives:衬线页标题、标签筛选(Chip)、按年份分组的文章行;年份大字吸附。
/tags/:tag(见 tags.rs)沿用同一套标签区与年份分组,当前标签以浮起样式标示。
首屏请求轻量归档分页,按需加载更早的文章。标签接口失败时只隐藏标签区。
Structs§
- Archive
RowProps 🔒 - Props for the
ArchiveRowcomponent. - Archives
Body 🔒Props - Props for the
ArchivesBodycomponent. - Archives
Route - 归档路由,对应
/archives(SsrMode::InOrder)。 - Index
Row - 年份分组里的一行。归档与标签详情的数据源不同,在这里统一形状。
- TagFilter
Props 🔒 - Props for the
TagFiltercomponent. - Year
Block 🔒Props - Props for the
YearBlockcomponent. - Year
Blocks 🔒Props - Props for the
YearBlockscomponent. - Year
Group 🔒
Constants§
- ROW_
TAGS 🔒 - 每行右侧最多列出的标签数。
- TAG_
PREVIEW 🔒 - 标签区默认显示的标签数,其余收进「全部 N 个」。
Functions§
- Archive
Row 🔒 - Required Props
- Archives
Body 🔒 - 归档主体。
first为None表示首屏加载失败;重试与「加载更早」的结果都写进 本地信号,不重取外层Resource(否则整段 DOM 会退回Suspense的骨架屏)。 - TagFilter 🔒
- 标签筛选区。点当前标签回到全部归档;展开状态随历史记录恢复。
- Year
Block 🔒 - Required Props
- Year
Blocks 🔒 - 按年份分组的文章行。
hide_tag为标签详情的当前标签,不在行尾重复列出(缺省则都列出)。 - __
Archives 🔒Route_ View - archive_
row 🔒 - archive_
summary 🔒 - 「41 篇文章,写于 2020 — 2026。」;还有未加载的更早文章时不写起始年份。
- fetch_
archive 🔒 - fetch_
tags 🔒 - 全部标签;归档、标签详情与关于页共用(取数函数随分包加载,见
hooks::ssr_resource)。 - group_
by_ 🔒year - 列表已按时间降序;相邻同年的行归为一组。
- ranked_
tags 🔒 - 只保留有已发布文章的标签,按篇数降序、同数按名称排列。
- tag_
list 🔒 - 标签接口的结果:失败时为空,标签区随之隐藏。
- visible_
tags 🔒 - 收起时显示的标签:前若干个;当前标签排在后面也要露出来。