Route-based breadcrumb navigation and navbar refinements
Route-based breadcrumb navigation and navbar refinements
#23 in Riparion/riparion-cms — merged 2026-05-31
Summary
- Adds a
Breadcrumbcomponent (src/components/breadcrumb/) that readsuse_route::<Route>()and renders a contextual trail automatically — no prop drilling required - Admin pages re-base at Admin (linking to Dashboard); reader pages start from Home; post detail pages show the actual fetched post title instead of a slug-formatted label
- Breadcrumb wired into all 11 chrome-bearing layouts in
layouts.rsand intoAdminShellfor complete coverage - Replaces the
← Backbutton on post detail pages
Navbar cleanup:
- Search link replaced with a compact inline search input (Enter to submit); navigates to
/search?q=…and updates the URL so the breadcrumb reflects search state - Home and Archive links removed from navbar — Home is reachable via breadcrumb; Archive moved to a new
ArchiveLinksidebar widget that appears after Categories and Tags - Admin link moved into the user dropdown, remaining permission-gated via
admin_landing()
Test plan
- Navigate to
/admin/posts,/admin/posts/new,/admin/posts/1/edit— confirm correct admin trail at each level - Navigate to
/category/some-slug,/tag/some-slug— confirm "Home › Categories/Tags › Name" - Open a post — confirm "Home › [actual post title]" replaces the old ← Back button
- Visit
/searchwith no query — confirm "Home › Search"; type and submit — confirm "Home › Search Results" - Confirm home page (
/) renders no breadcrumb - Confirm Archive link appears in sidebar below Tags on home and feed pages
- Confirm Admin link appears in user dropdown only for users with admin tokens; absent for regular users
-
cargo clippyandcargo fmt --checkpass on both targets
🤖 Generated with Claude Code
Last updated 2026-06-01
Links to this note
Credits
Merged pull requests, newest first.