46860f7c41
fix(ui): apply mount animation inside each page component to avoid skeleton interception
2026-07-03 17:24:38 +08:00
178870427c
feat(ui): refactor EmptyState to accept dynamic string props and add empty state to archives page
2026-06-29 10:11:00 +08:00
0398cc6c66
perf(render): 列表加显式 key + release 启用 panic=abort
...
依据 Dioxus 0.7 optimizing 指南做两项改进:
- 为数据驱动列表渲染补全显式 key(13 处,9 个文件):
home/archives/tags/search 文章与标签列表、post_card/post_footer
标签、header 桌面/移动导航、admin dashboard/posts/write 列表。
使用各类型稳定唯一字段(post.id / tag / tag.name / item.label /
err.id / year_group.year / month_group.month_en)作为 key,
让 Dioxus diff 正确识别元素身份。骨架屏 for _ in 0..N 静态占位
循环与已带 key 的评论树/admin 行不动。
- [profile.release] 加 panic = "abort":WASM 去掉 unwind 元数据减小
体积;server 端错误处理走 Result+?(见 error.rs),不依赖 panic
unwind,无副作用。
其余文件为本机格式化(单行折叠/多行展开),一并提交。
验证:dx check 通过、cargo test 405 passed。
2026-06-25 18:07:22 +08:00
170c021b37
feat(cache): add PostListItem DTO and use it in list/tag/search caches
2026-06-17 15:51:19 +08:00
abfab19839
docs(pages-frontend): 补充中文注释
2026-06-12 19:16:59 +08:00
294d60afab
style: format rust code
CI / build (push) Has been cancelled
CI / check (push) Has been cancelled
2026-06-12 17:14:31 +08:00
f9d23d1eed
refactor(ui): redesign with warm palette, sage accent, and consistent theme vars
...
- Warm editorial color palette (#faf9f6 light / #141416 dark)
- Sage green accent (#5c7a5e) for nav, links, buttons, tags
- Replace all hardcoded hex colors with CSS theme utilities
- Serif font (system Georgia) only on header logo
- Better hover states: scale, brightness, color transitions
- Accent-colored focus rings on inputs
- Fix language mixing: Back to Home → 返回首页
- No external font dependencies
2026-06-11 10:29:11 +08:00
2ade51bd0f
feat: display accurate total in archives page
2026-06-10 14:22:18 +08:00
ce14c476b5
refactor: replace string-based navigation with typed Route and Link components
2026-06-04 14:55:18 +08:00
5d018864c2
refactor: remove PageLayout from all frontend pages, delegate to FrontendLayout
...
- Remove PageLayout wrapper from Home, HomePage, Archives, Tags,
TagDetail, PostDetail, Search, and About components
- Remove unused imports: use_nav_items, use_route, PageLayout, Route
- Pages now render only their content; Header/Footer are provided by
FrontendLayout via the router's #[layout] attribute
- Skeleton screens (DelayedSkeleton) remain in data-loading branches
- This eliminates redundant Header/Footer re-mounting on every route
change, which was the primary source of page transition flicker
Files changed:
- src/pages/home.rs: remove PageLayout, keep HomeInfo + HomePosts
- src/pages/about.rs: remove PageLayout, render content directly
- src/pages/archives.rs: remove PageLayout, keep header + ArchivesContent
- src/pages/post_detail.rs: remove PageLayout, keep PostDetailContent
- src/pages/search.rs: remove PageLayout, keep search form + results
- src/pages/tags.rs: remove PageLayout from Tags and TagDetail
2026-06-03 18:38:11 +08:00
778726251a
fix: remove SuspenseBoundary, render skeleton screens directly in loading branch
2026-06-03 17:59:38 +08:00
754c1f5b86
feat: wrap all skeleton screens with DelayedSkeleton to prevent flicker
2026-06-03 17:43:34 +08:00
5becd73ebc
feat: add ArchiveSkeleton and replace generic fallback on archives page
2026-06-03 17:19:29 +08:00
1afb477829
feat: SSR for archives page
2026-06-03 14:23:44 +08:00
f3c1718cd0
feat: add use_delayed_loading hook to prevent skeleton flash
2026-06-02 17:53:04 +08:00
1950646bef
feat: add shared components, new pages, and pagination
2026-06-02 17:33:28 +08:00
b6cabe489f
feat: migrate frontend to database-driven posts
...
- Replace hardcoded POSTS with API-driven data in home, archives, tags
- Add post detail page /post/:slug with HTML rendering
- Add admin posts management page with list and soft delete
- Update dashboard with real stats from database
- Add admin navigation for posts management
- Fix PartialEq derives for Post, Tag, PostStats models
- Use use_resource and use_memo for data fetching with proper loading states
2026-06-02 17:33:28 +08:00
李林军
4093178fc3
添加tracing日志并重构服务器启动逻辑
2026-05-27 11:39:09 +08:00
61376f6ba9
修复 admin 路由切换闪烁,全局替换原生导航为客户端路由
...
- 新增全局 UserContext,将用户认证状态提升到 App 级别缓存
- 将 /admin 和 /admin/write 改为嵌套路由,AdminLayout 作为共享父布局
- AdminLayout 使用 Outlet 渲染子页面,避免路由切换时重复挂载
- 修复所有原生 <a> 标签导致的整页刷新问题:
- Header 导航栏 Logo 和 NavItem
- 首页文章卡片、分页按钮
- 归档页文章条目
- 标签页标签云、文章卡片、标签链接
- 登录/注册页面链接
- Dashboard 快捷操作按钮
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 00:18:15 +08:00
8b9c6aa83d
重构 admin 模块,新增共享组件和文章撰写页面
...
- 将 monolithic admin.rs 拆分为 admin/ 目录模块(dashboard、write)
- 新增 components 模块:Header、Footer、AdminLayout
- 新增 /admin/write 文章撰写页面,支持 Markdown 实时预览
- 添加 pulldown-cmark 依赖用于 Markdown 渲染
- .env 移出版本控制,新增 .env.example 模板
- Home、Archives、Tags、Login、Register 等页面适配新组件
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 16:13:18 +08:00
7599bfbb13
实现 PaperMod 风格归档页面,支持按年份月份分组
...
- 新增 ArchivesPage 组件,三级结构:年份 → 月份 → 文章
- Header/NavItem/Footer 改为 pub 共享,NavItem 通过路由动态判断高亮
- 编译 Tailwind CSS 包含归档页面所需 utility classes
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 13:31:35 +08:00