a282d1dd29
feat: enable wasm-split for route-based code splitting
...
Enable Dioxus 0.7 automatic WASM bundle splitting by route:
- Add wasm-split feature to dioxus and dioxus-router in Cargo.toml
- Add --wasm-split flag to dx build in Makefile
- Router definitions stay as plain #[route] — splitting is automatic
Dioxus 0.7.9 handles splitting automatically when the feature and
CLI flag are enabled. Per-route #[wasm_split] attributes are not
required (and not supported by this version's derive macro).
2026-06-04 17:32:00 +08:00
c44f37e9ec
feat: enable wasm_split for non-core routes
...
Split low-frequency routes into separate WASM chunks:
- archives, tags, search, about
- admin/* (dashboard, write, posts)
- login, register
Core reading paths (home, post detail) remain in initial bundle.
2026-06-04 17:15:14 +08:00
675349a5b4
fix: add #[cfg(feature = server)] to server-only imports for WASM compatibility
2026-06-04 16:40:42 +08:00
e5ce1580e2
fix: restore dead_code allow on CreatePostRequest to suppress warning
2026-06-04 16:25:05 +08:00
1830fc9f2e
cleanup: remove dead code, debug prints, and unused dead_code allow attributes
2026-06-04 16:20:43 +08:00
c26c62558e
fix: add status_badge_class for badge styling, restore posts table backgrounds
2026-06-04 16:17:41 +08:00
58e9dbc5b7
refactor: add status_label/status_class/formatted_date helpers to Post model
2026-06-04 16:13:49 +08:00
c27b2d513e
perf: pre-compile regex patterns and extract markdown stripping to utils/text.rs
2026-06-04 16:08:01 +08:00
28707d3c3a
refactor: reuse session validation in get_current_admin_user via get_user_by_token
2026-06-04 16:02:47 +08:00
58f972aa17
fix: restore register success alert layout with login link
2026-06-04 15:59:17 +08:00
4e33bd3ee6
refactor: extract form atoms (FormInput, FormLabel, AlertBox) and replace repeated input/button styles
2026-06-04 15:55:40 +08:00
71abff1b3e
refactor: add style prop to SkeletonBox, migrate last tags_skeleton div
2026-06-04 15:49:30 +08:00
4fbc938422
refactor: migrate tags_skeleton and admin_skeleton to SkeletonBox
2026-06-04 15:47:21 +08:00
6ed12ff1cb
refactor: fix skeleton atoms - remove unused components, use &str, migrate all skeletons
2026-06-04 15:43:40 +08:00
ebf0f84733
refactor: extract skeleton atoms (SkeletonLine, SkeletonBox, SkeletonCard) and refactor skeleton components
2026-06-04 15:35:36 +08:00
d3be04bcec
refactor: extract session parsing to auth/session.rs and db error helpers to api/utils.rs
2026-06-04 15:16:40 +08:00
9da060ac32
refactor: extract sleep_ms to utils/time.rs, deduplicate in hooks and skeletons
2026-06-04 15:11:08 +08:00
ce14c476b5
refactor: replace string-based navigation with typed Route and Link components
2026-06-04 14:55:18 +08:00
88cd23f74f
fix: show route-specific skeleton screens in SuspenseBoundary fallback
2026-06-04 11:06:42 +08:00
c2f68b9c2d
fix: wrap Outlet in SuspenseBoundary to prevent full-page flash on route change
2026-06-04 11:03:56 +08:00
593666135c
feat: add DB connection retry logic with get_conn() helper
2026-06-04 10:03:56 +08:00
e09a0f4616
chore: remove unused PageLayout component
...
- Delete src/components/page_layout.rs — no longer used by any page
- Remove 'pub mod page_layout' from components/mod.rs
- All frontend pages now use FrontendLayout via the router instead
2026-06-03 18:38:57 +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
8845577958
feat: wrap frontend routes in FrontendLayout via router #[layout] attribute
...
- All public-facing pages (Home, Archives, Tags, PostDetail, Search,
About, HomePage) are now wrapped in #[layout(FrontendLayout)]
- Header and Footer stay mounted during page transitions, only the
<Outlet> content swaps — eliminates full-page flash/flicker
- Login and Register routes moved outside FrontendLayout since they
are standalone pages without navigation header
- Route order restructured: FrontendLayout block → admin nest → auth pages
- Note: #[end_layout]/#[end_nest] must have a variant after them in the
enum, otherwise the Routable derive macro fails with 'expected identifier'
2026-06-03 18:35:36 +08:00
e861b8a5be
feat: add FrontendLayout component with Header, Footer and Outlet
...
- New FrontendLayout component wraps all frontend pages with shared
Header (with nav items and theme toggle) and Footer
- Uses Outlet::<Route> to render child route components
- Similar pattern to existing AdminLayout but without auth checks
- Registered in components/mod.rs
This is the first step toward eliminating page transition flicker by
keeping Header/Footer mounted while only the main content area swaps.
2026-06-03 18:32:43 +08:00
778726251a
fix: remove SuspenseBoundary, render skeleton screens directly in loading branch
2026-06-03 17:59:38 +08:00
326108ab68
fix: delay skeleton pulse animation instead of hiding skeleton, prevent blank flash
2026-06-03 17:47:51 +08:00
754c1f5b86
feat: wrap all skeleton screens with DelayedSkeleton to prevent flicker
2026-06-03 17:43:34 +08:00
73e30d6f89
feat: add DelayedSkeleton wrapper to prevent skeleton flicker on fast loads
2026-06-03 17:41:49 +08:00
068d13c69f
refactor: remove obsolete SuspenseWrapper, all pages now use dedicated skeleton screens
2026-06-03 17:33:44 +08:00
62519d620d
feat: add SearchSkeleton component and replace inline skeleton on search page
2026-06-03 17:30:47 +08:00
c2e1fbe3ac
feat: add TagsSkeleton/TagDetailSkeleton and replace generic fallback on tags pages
2026-06-03 17:25:47 +08:00
5becd73ebc
feat: add ArchiveSkeleton and replace generic fallback on archives page
2026-06-03 17:19:29 +08:00
372c701b07
feat: add PostDetailSkeleton and replace generic fallback on post detail page
2026-06-03 17:13:39 +08:00
076448d6ed
feat: add HomeSkeleton and replace generic fallback on home page
2026-06-03 17:09:20 +08:00
db8e88e1fe
feat: add skeleton screens module and PostCardSkeleton component
2026-06-03 17:01:39 +08:00
3d19f62fb4
fix: prevent syntax-highlighted spans from being displayed as block due to Tailwind .block class conflict
2026-06-03 16:18:24 +08:00
e48ea4f97f
fix: add CSS stylesheets via document API for SSR
...
- Add document::Stylesheet for /style.css and /highlight.css in AppRouter
- This ensures CSS is included in SSR HTML for all pages (home, post detail, etc.)
- Also add public/index.html for production builds
- Remove stale ISRG cache files
2026-06-03 15:37:17 +08:00
ccffab851a
fix: admin pages use client-only fetching; fix theme cookie parsing; restore custom skeletons
2026-06-03 14:55:50 +08:00
6cfe664085
feat: SSR for home and tags pages
2026-06-03 14:40:15 +08:00
6b3e086628
feat: read theme from cookie during SSR
2026-06-03 14:38:00 +08:00
269095cc65
feat: configure incremental SSR caching
2026-06-03 14:36:22 +08:00
34e70f6c57
feat: SSR for admin pages
2026-06-03 14:33:49 +08:00
1afb477829
feat: SSR for archives page
2026-06-03 14:23:44 +08:00
fe30d0495f
feat: SSR for post detail page
2026-06-03 14:17:52 +08:00
60a2cd49ab
feat: add SuspenseWrapper component for SSR
2026-06-03 14:14:45 +08:00
5e449013d6
refactor(highlight): output CSS to public/, add syntax aliases and case-insensitive lookup, fix code block CSS
2026-06-03 14:08:16 +08:00
34e3bcdf95
fix: address code review feedback
...
- Remove unnecessary 'style' from ammonia whitelist (syntect uses classes)
- Log syntect parse errors instead of silently discarding them
- Simplify find_syntax fallback: return &'static directly, remove OnceLock
- Add generated/highlight.css to .gitignore (build artifact)
- Add #[cfg(feature = "server")] guard on mod highlight in main.rs
- Remove redundant code_buffer/code_lang clear on CodeBlock end
2026-06-03 13:13:29 +08:00
2e1d05cb03
refactor: clean up highlight module, remove unused theme getters and imports
2026-06-03 11:54:26 +08:00
11261836c7
feat: add syntect code highlighting with catppuccin themes
...
- Add syntect dependency (server feature, fancy-regex backend)
- Create highlight module with LazyLock globals for SyntaxSet + themes
- Intercept CodeBlock events in markdown rendering for syntax highlighting
- Update ammonia whitelist to allow span/pre/code class/style attributes
- Add generate_highlight_css binary for CSS generation
- Add highlight-css Makefile target (runs before tailwindcss)
- Import generated highlight.css in input.css
- Remove hardcoded code block colors, let catppuccin CSS take over
2026-06-03 11:52:58 +08:00