Updated the Obsidian docs-vault
This commit is contained in:
1 parent
72fd77ee01
commit
260282a0e2
36 files changed
+3497
-144
No files matched your search
+69
-14
@@ -1,25 +1,80 @@
|
||||
---
|
||||
title: Navigation
|
||||
tags:
|
||||
- frontend
|
||||
- navigation
|
||||
- breadcrumbs
|
||||
- ux
|
||||
---
|
||||
|
||||
# Navigation
|
||||
|
||||
## Overview
|
||||
## Sidebar
|
||||
|
||||
Breadcrumb-style navigation for detail pages. Pages use linked text segments separated by `/`.
|
||||
The `Sidebar` component provides the main navigation:
|
||||
|
||||
## Patterns
|
||||
| Link | Page |
|
||||
|---|---|
|
||||
| Home | `/` |
|
||||
| Search | `/search` |
|
||||
| Library | `/library` |
|
||||
| Watchlist | `/watchlist` |
|
||||
| Collections | `/collections` |
|
||||
| Calendar | `/calendar` |
|
||||
| People | `/people` |
|
||||
| Media | `/media` |
|
||||
| Dashboard | `/dashboard` |
|
||||
| Settings | `/settings` |
|
||||
|
||||
## Breadcrumb Patterns
|
||||
|
||||
Detail pages use breadcrumb-style navigation with linked text segments separated by `/`.
|
||||
|
||||
### SeasonPage
|
||||
`Title / Season x`
|
||||
- "Title" links to `/entry/:entryId`
|
||||
- "Season x" is the current page (non-linked, bold)
|
||||
- Entry title fetched from `useLibraryStore`
|
||||
|
||||
```
|
||||
Title / Season x
|
||||
```
|
||||
|
||||
- **Title** → links to `/entry/:entryId`
|
||||
- **Season x** → current page (non-linked, bold, `text-foreground font-medium`)
|
||||
- Entry title from `useLibraryStore((s) => s.entries.get(entryId)?.title)`
|
||||
- Season number from `season.season_number`
|
||||
|
||||
### EpisodePage
|
||||
`Title / Season x / Episode x`
|
||||
- "Title" links to `/entry/:entryId`
|
||||
- "Season x" links to `/entry/:entryId/season/:seasonId`
|
||||
- "Episode x" is the current page (non-linked, bold)
|
||||
- Uses `useSeason()` hook to get `season_number` (not the DB `seasonId`)
|
||||
- Entry title fetched from `useLibraryStore`
|
||||
|
||||
```
|
||||
Title / Season x / Episode x
|
||||
```
|
||||
|
||||
- **Title** → links to `/entry/:entryId`
|
||||
- **Season x** → links to `/entry/:entryId/season/:seasonId`
|
||||
- **Episode x** → current page (non-linked, bold)
|
||||
- Entry title from [[Stores|useLibraryStore]]
|
||||
- Season number from `useSeason()` hook → `season.season_number`
|
||||
|
||||
> [!warning] Season Number vs Season ID
|
||||
> Always use `season.season_number` for display (0 = Specials, 1 = Season 1, etc.). The `seasonId` URL parameter is the **database ID**, not the display number. The `S##E##` badge on EpisodePage uses `season.season_number` padded to 2 digits.
|
||||
|
||||
## Width Constraints
|
||||
|
||||
Detail pages (EntryDetailsPage, [[SeasonPage]], [[EpisodePage]]) use `mx-auto max-w-4xl` for consistent max width.
|
||||
Detail pages use `mx-auto max-w-4xl` for consistent max width:
|
||||
|
||||
- `EntryDetailsPage`
|
||||
- `SeasonPage`
|
||||
- `EpisodePage`
|
||||
|
||||
## Entry Details Hierarchy
|
||||
|
||||
```
|
||||
/entry/:id → EntryDetailsPage (entry detail)
|
||||
↓ Season card click
|
||||
/entry/:id/season/:seasonId → SeasonPage (episode list)
|
||||
↓ Episode click
|
||||
/entry/:id/season/:seasonId/episode/:episodeId → EpisodePage (episode detail)
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
- [[Routing]] — All routes
|
||||
- [[Pages]] — Page components
|
||||
Reference in new issue
Block a user