feat: 实现导航页基础功能

- 添加导航条目和分类数据模型
- 实现导航卡片网格展示
- 支持点击卡片打开链接
- 添加主题样式(渐变色、卡片阴影)
- 区分系统默认和自定义条目
- 添加分类统计信息"
This commit is contained in:
2026-09-19 21:53:15 +08:00
parent e2cc3ac30f
commit 1c98340fc5
42 changed files with 6054 additions and 140 deletions
+6
View File
@@ -9,3 +9,9 @@ String firstChar(String text, {String fallback = '·'}) {
}
return String.fromCharCode(text.runes.first);
}
/// 字符数(不是字节数)。
///
/// 和后端 `util::char_count` 的口径一致:先去掉首尾空白,再数字符。
/// 中文一个字算一个,所以「最多 60 个字符」用 `runes.length` 而不是 `length`。
int charCount(String text) => text.trim().runes.length;