Skip to main content

Module archives

Module archives 

Source
Expand description

归档与标签详情共用的索引页。

/archives:衬线页标题、标签筛选(Chip)、按年份分组的文章行;年份大字吸附。 /tags/:tag(见 tags.rs)沿用同一套标签区与年份分组,当前标签以浮起样式标示。

首屏请求轻量归档分页,按需加载更早的文章。标签接口失败时只隐藏标签区。

Structs§

ArchiveRowProps 🔒
Props for the ArchiveRow component.
ArchivesBodyProps 🔒
Props for the ArchivesBody component.
ArchivesRoute
归档路由,对应 /archives(SsrMode::InOrder)。
IndexRow
年份分组里的一行。归档与标签详情的数据源不同,在这里统一形状。
TagFilterProps 🔒
Props for the TagFilter component.
YearBlockProps 🔒
Props for the YearBlock component.
YearBlocksProps 🔒
Props for the YearBlocks component.
YearGroup 🔒

Constants§

ROW_TAGS 🔒
每行右侧最多列出的标签数。
TAG_PREVIEW 🔒
标签区默认显示的标签数,其余收进「全部 N 个」。

Functions§

ArchiveRow 🔒
Required Props
ArchivesBody 🔒
归档主体。first 为 None 表示首屏加载失败;重试与「加载更早」的结果都写进 本地信号,不重取外层 Resource(否则整段 DOM 会退回 Suspense 的骨架屏)。
TagFilter 🔒
标签筛选区。点当前标签回到全部归档;展开状态随历史记录恢复。
YearBlock 🔒
Required Props
YearBlocks 🔒
按年份分组的文章行。hide_tag 为标签详情的当前标签,不在行尾重复列出(缺省则都列出)。
__ArchivesRoute_View 🔒
archive_row 🔒
archive_summary 🔒
「41 篇文章,写于 2020 — 2026。」;还有未加载的更早文章时不写起始年份。
fetch_archive 🔒
fetch_tags 🔒
全部标签;归档、标签详情与关于页共用(取数函数随分包加载,见 hooks::ssr_resource)。
group_by_year 🔒
列表已按时间降序;相邻同年的行归为一组。
ranked_tags 🔒
只保留有已发布文章的标签,按篇数降序、同数按名称排列。
tag_list 🔒
标签接口的结果:失败时为空,标签区随之隐藏。
visible_tags 🔒
收起时显示的标签:前若干个;当前标签排在后面也要露出来。