Skip to main content

Module home

Module home 

Source
Expand description

首页「书桌」与分页首页。

第 1 页:状态行、站点标语、搜索与常读标签、最新一篇(右侧目录预览)、按「年 · 月」 分组的文章索引、尾部三格。第 2 页起只有页标题与索引。数据都来自已缓存的公开接口, 在 LazyRoute::data 里一次建好,SSR 一次取齐。

HomeRoute 同时服务 /(第 1 页)与 /page/:page。

Structs§

HomeArchiveProps 🔒
Props for the HomeArchive component.
HomeCornerLinkProps 🔒
Props for the HomeCornerLink component.
HomeCornersProps 🔒
Props for the HomeCorners component.
HomeDeskProps 🔒
Props for the HomeDesk component.
HomeIndexHeadingProps 🔒
Props for the HomeIndexHeading component.
HomeIndexProps 🔒
Props for the HomeIndex component.
HomePostsErrorProps 🔒
Props for the HomePostsError component.
HomeRoute
首页路由,对应 /(SsrMode::InOrder)与 /page/:page(SsrMode::Async,无 page 参数视为 第 1 页)。非法页码渲染 NotFound,状态码为 404;此时文章 source 为 None,不取数据。
HomeRowProps 🔒
Props for the HomeRow component.
HomeSearchProps 🔒
Props for the HomeSearch component.
HomeStatusProps 🔒
Props for the HomeStatus component.
LatestPanelProps 🔒
Props for the LatestPanel component.
MonthGroup 🔒

Constants§

POSTS_PER_PAGE 🔒
RECENT_NOTES 🔒
尾部「最近笔记」数。
TAG_CLOUD 🔒
尾部「常去标签」数。
TOP_TAGS 🔒
搜索框下「常读」标签数。

Functions§

HomeArchive 🔒
第 2 页起:页标题与索引。
HomeCornerLink 🔒
Required Props
HomeCorners 🔒
尾部三格:最近笔记、常去标签、去别处走走。
HomeDesk 🔒
第 1 页。文章列表失败时只把文章区换成错误卡片,开场照常显示。
HomeIndex 🔒
按「年 · 月」分组的文章索引与分页。第 1 页传入的列表已去掉最新一篇。
HomeIndexHeading 🔒
Required Props
HomePostsError 🔒
文章区加载失败。重试在卡片内完成,成功后回填,不触发整页骨架。
HomeRow 🔒
Required Props
HomeSearch 🔒
开场搜索框:提交进入全文搜索页。没有脚本时表单按 GET 提交到同一地址。
HomeStatus 🔒
状态行:Clay 呼吸点、最近更新、篇数与标签数。篇数链到下方索引。
LatestPanel 🔒
最新一篇面板。整卡可点;有小节时右栏列出前几节,否则改为单栏并放大标题。
__HomeRoute_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 🔒