tracker
All repositories: gitoria
2.5 KB
// components/genre.hl — `/genres/:genre`, `/genres/:genre/page/:page` (mission 058, tracker.worldapi.org#25): the /movies and// /shows list narrowed to one genre — its movies AND series together, newest first (catalog.hl genre lists: a movie by its// release, a series by its newest released episode), 24 per page, poster + title (+ year), adult titles hidden like there.// The creator: "/genres/:genre pages look like the shows and movies list page just narrowed to their genre but show both// movies and shows with that genre". The genre pills on a show page link here (`/genre/<x>` answers 301 to it, project.hl).// The grid and the pagination: components/tilelist.hl.parent './main.hl'import TileList from './tilelist.hl'import { appTitle } from '../lib/app.hl'import { genreOf, listingOf, countOf } from '../lib/catalog.hl'import { warmReady, warmText } from '../lib/warm.hl'genre = nullpage = nullgenreRow = genreOf(&genre)found = genreRow != nullnotFound = genreRow == nullname = found ? genreRow.name : ''listing = listingOf(&genreRow, &page)tiles = listing.tilespageNo = listing.pagepageCount = listing.pagestotal = countOf(&genreRow)countText = total + (total == 1 ? ' title' : ' titles') + ', newest first · page ' + pageNo + ' of ' + pageCounthasTiles = total > 0noTiles = found && total == 0basePath = found ? '/genres/' + genreRow.urlSegment : '/genres'__title = found ? (pageNo > 1 ? name + ', page ' + pageNo + ' — ' + appTitle : name + ' — ' + appTitle) : appTitle// mission T17 (boot time): the server listens while bootscan.hl still builds the lists / slug maps / search index (lib/warm.hl); until the 'catalog'// stage is there this page says so instead of showing half a mapwarming = !warmReady('catalog')warmNote = warming ? warmText() : ''View {listPage { id = "genre-page"if (warming) { p { id = "warming" class = "message banner" warmNote } }if (notFound) {h1 { "Not found" }p { "This genre doesn't exist." }}// tracker.worldapi.org#20: "Genre | Action", the type word in the genre colour, the name whiteif (found) { h1 { class = "typed" typeWord { class = "type-word type-genre" "Genre" } typeSep { "|" } typeName { name } } }if (noTiles) { p { class = "muted" "Nothing in this genre yet." } }if (hasTiles) { p { class = "muted list-count" countText } }// always there (no `if` around a composed component, like /movies): empty for an unknown genre, no pager on one pageTileList { tiles = tiles page = pageNo pages = pageCount basePath = basePath }}}
Branches
Latest commits
- 613ae0ecMerge branch 'bs3' into mainTracker
- 1383264b|||PR BS3: keep shared synchronous sorting fastTracker
- 63e5ba1a|||PR BS3: guard boot imports and share resumable sort buffersTracker
- 310613f1Merge branch 'records-dp72' into mainTracker
- 6f7b61ba|||PR records: deploy-swap fix live, Kunibert findingsTracker
- c41587d2Merge branch 'bs2' into mainTracker
- 0dd538a6|||PR BS2: finish the boot index in slices so a booting instance keeps answeringTracker
- 019d5cedMerge branch 'records-1110' into mainTracker
- f88ae8b9|||PR records: day56 toggle live, reviewTracker
- b6b3bb4dMerge branch 'ap56e' into mainTracker
- 29a26da9|||PR AP56e: guard hidden show helpers during session syncTracker
- 7c9ec236|||PR AP56e: re-vendor Hybriel set day56 (source 36ae83a8, bin c1f595a2)Tracker
- 4b54f6f9Merge branch 'records-audit' into mainTracker
- cab4a3bc|||PR records: branch audit, PR-onlyTracker
- 641e1c4cMerge branch 'records-dp71' into mainTracker
- 85a6e9f5|||PR records: DP71 checked in ChromeTracker
- f5be5f18records: gitoria PR-only planTracker
- 46a37036records: DP71 liveTracker
- 3bcb7039Status/log: DP71 in progressTracker
- 5b3a5693Log: SR1b merged via PR 2, DP71 startedTracker