Expand description
首页「书桌」与分页首页。
第 1 页:状态行、站点标语、搜索与常读标签、最新一篇(右侧目录预览)、按「年 · 月」
分组的文章索引、尾部三格。第 2 页起只有页标题与索引。数据都来自已缓存的公开接口,
在 LazyRoute::data 里一次建好,SSR 一次取齐。
HomeRoute 同时服务 /(第 1 页)与 /page/:page。
Structs§
- Home
Archive 🔒Props - Props for the
HomeArchivecomponent. - Home
Corner 🔒Link Props - Props for the
HomeCornerLinkcomponent. - Home
Corners 🔒Props - Props for the
HomeCornerscomponent. - Home
Desk 🔒Props - Props for the
HomeDeskcomponent. - Home
Index 🔒Heading Props - Props for the
HomeIndexHeadingcomponent. - Home
Index 🔒Props - Props for the
HomeIndexcomponent. - Home
Posts 🔒Error Props - Props for the
HomePostsErrorcomponent. - Home
Route - 首页路由,对应
/(SsrMode::InOrder)与/page/:page(SsrMode::Async,无page参数视为 第 1 页)。非法页码渲染 NotFound,状态码为 404;此时文章 source 为 None,不取数据。 - Home
RowProps 🔒 - Props for the
HomeRowcomponent. - Home
Search 🔒Props - Props for the
HomeSearchcomponent. - Home
Status 🔒Props - Props for the
HomeStatuscomponent. - Latest
Panel 🔒Props - Props for the
LatestPanelcomponent. - Month
Group 🔒
Constants§
- POSTS_
PER_ 🔒PAGE - RECENT_
NOTES 🔒 - 尾部「最近笔记」数。
- TAG_
CLOUD 🔒 - 尾部「常去标签」数。
- TOP_
TAGS 🔒 - 搜索框下「常读」标签数。
Functions§
- Home
Archive 🔒 - 第 2 页起:页标题与索引。
- Home
Corner 🔒Link - Required Props
- Home
Corners 🔒 - 尾部三格:最近笔记、常去标签、去别处走走。
- Home
Desk 🔒 - 第 1 页。文章列表失败时只把文章区换成错误卡片,开场照常显示。
- Home
Index 🔒 - 按「年 · 月」分组的文章索引与分页。第 1 页传入的列表已去掉最新一篇。
- Home
Index 🔒Heading - Required Props
- Home
Posts 🔒Error - 文章区加载失败。重试在卡片内完成,成功后回填,不触发整页骨架。
- HomeRow 🔒
- Required Props
- Home
Search 🔒 - 开场搜索框:提交进入全文搜索页。没有脚本时表单按 GET 提交到同一地址。
- Home
Status 🔒 - 状态行:Clay 呼吸点、最近更新、篇数与标签数。篇数链到下方索引。
- Latest
Panel 🔒 - 最新一篇面板。整卡可点;有小节时右栏列出前几节,否则改为单栏并放大标题。
- __
Home 🔒Route_ View - fetch_
home_ 🔒tags - fetch_
notes 🔒 - fetch_
outline 🔒 - fetch_
posts 🔒 - fetch_
settings 🔒 - group_
by_ 🔒month - 列表已按发布时间降序;相邻同月的文章归为一组。
- page_
param 🔒 - 页码参数 → 页码:缺省为第 1 页;非数字为
None(渲染 404);小于 1 钳到 1。data()与悬停预取共用,保证两边算出同一个 source。 - post_
date 🔒 - post_
time 🔒