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
- c6d464e5Log: Apollo GO backlog, AP56 and BS1 startedmre
- 1eb6f1a1Missions AP56, BS1mre
- 4871f8adLog: AP52 live on day52, browser gate greenmre
- d9bf2988Merge ap52: day52, tracker#58 server argument, #51 modal close rule, #56 keyed season rowsmre
- c4a60ef2Log: RT52 retest passed, AP52 startedmre
- 83760a55Browser gate: search results belong to the address form of the typed text (tracker#52 navigate replace)mre
- 6e951d91AP52: show-page rows are keyed records; closing a season is one upsert and removes (tracker#56, hybriel#331)mre
- 3bb4ccddAP52: modal close button refers to its nested rule with Style.buttonModalX (tracker#51, hybriel#333)mre
- ba16933fAP52: login callback and title route are static handlers taking the server as third argument (tracker#58, hybriel#332)mre
- 85153900AP52: re-vendor Hybriel set day52 (source 77cfca31, bin 0a8ed496)mre
- 7c051eddLog: hybriel#338 answermre
- d049b8b8Log: HM50 live, #52 donemre
- 6d05fa37Log: HM50 Part A mergedmre
- 1c7dab74HM50: the shell reads the framework's online state, netProbe removed (tracker#55)mre
- e8b91697HM50: search address follows the text via navigate(path, replace = true) (tracker#52)mre
- 6fe1896cHM50: re-vendor Hybriel set day50 (source 0ae38232, bin d3ef9d16)mre
- 2f391aa9Log: HM50 startedmre
- 4b59c03dHM50 mission: doc pathmre
- ed526d67HM50 missionmre
- 2f986ca3Log: RT50 passmre