Expand description
归档页面模块。
对应路由 /archives。
顶部标签索引复用可折叠卡片与 TagChip,独立加载,避免标签接口失败影响时间归档。
数据获取:通过 use_server_future 调用 list_published_posts(1, 10000) server function,
一次性拉取全部已发布文章,然后在内存中按发布日期的年、月进行分组展示。
在 wasm32 目标下,server function 的函数体被替换为向服务端端点发起 HTTP POST 请求的客户端存根;
实际的数据库访问逻辑仅在 feature = "server" 启用时运行。
Re-exports§
pub use Archives_completions::Component::Archives;
Structs§
- Archive
Entry 🔒Props - Properties for the
ArchiveEntrycomponent. - Month
Group 🔒 - 按月份分组的文章归档结构。
- Month
Section 🔒Props - Properties for the
MonthSectioncomponent. - Year
Group 🔒 - 按年份分组的文章归档结构。
- Year
Section 🔒Props - Properties for the
YearSectioncomponent.
Functions§
- Archive
Entry 🔒 - 整行使用原生链接,日期保留完整 datetime,标题在窄屏自然换行。
- Archive
Tags 🔒 - 标签云保持挂载,让收起也能完成高度与标签淡出动画。
- Archives
- 归档页面组件,对应路由
/archives。 - Archives
Content 🔒 - 归档页面内容组件。
- Month
Section 🔒 - 单一月份归档区块组件,展示该月份下的文章条目。
- Year
Section 🔒 - 单一年份归档区块组件,展示该年份下的所有月份分组。
- group_
posts 🔒 - 将文章列表按
formatted_date()返回的YYYY-MM-DD格式进行年、月分组。