tracker
All repositories: gitoria
2.2 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 '../project.hl'import { genreBySlug } from '../shows.hl'import { genrePage, genreCount } from '../catalog.hl'// static: an mpackdb-backed helper must be `static` (hybriel#115/#116)static genreOf = (slug) => { return genreBySlug(slug) }static listingOf = (g, raw) => { return g != null ? genrePage(g.id, raw) : { page = 1 pages = 1 tiles = [] } }static countOf = (g) => { return g != null ? genreCount(g.id) : 0 }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) : appTitleView {listPage { id = "genre-page"if (notFound) {h1 { "Not found" }p { "This genre doesn't exist." }}if (found) { h1 { 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
- mainmain branch
Latest commits
- f14db671tracker#22-#25 (mission 058): episode air dates, season check = all episodes watched, movie watched check (+ /my/movies count), /genres/<genre> pages (movies + series, newest first, paginated); gate 238, tests/realdata-058.mjs, README + STATUSmre
- 1704ec45tracker#17 (mission 057): season caret down/up, skeleton rows while a season loads, sessionless showSeasonEpisodes face (no page re-mount), client-only close; gate 214, tests/realdata-057.mjs, README + STATUSmre
- f2fe3e36mission 056: README + STATUS (merge, fixes, Hybriel 8590df63, real-data check), tests/realdata-056.mjs, tools/check-public-slugs.hlmre
- f40c250emission 056: re-vendor hybriel master 8590df63 (#121, #122); an adult title's page is Not found for non-followers; gate: leave the page before stopping the servermre
- 2b7fdd6cmission 056: signed-out header one row on phones ("Log in", nowrap), backfill skips adult titles' posters, gate checksmre
- 2c53d5efMerge branch 't16-person' (tracker#16 person pages) into main; filmography shows only public titles (054 adult flag), gate race fix (backfill start line)mre
- c171227emission 054: hide adult/unknown titles from the public lists and the search; in-app adult-flag backfill (TMDB details + poster per title, resumes), gate + real-data proofmre
- 139fafd8tracker#16: short bio (4 lines, click = all), real-data check script, README + STATUSmre
- 93be9476tracker#16: person pages /person/<slug> with the filmography fetched from TMDB on the first visit (step by step), gatemre
- 47a3cae6STATUS: mission 053 merge commit idsmre
- dcc5eecaMerge branch 't14-search'mre
- 03edc783Merge branch 't15-tvmaze'mre
- 71b46345tracker#15: numbering check by date or title, placeholder titles in other languages, docs + real-data proofmre
- 6bb2daf1tracker#13: homepage (tiles, intro, latest movies/shows), /shows, /movies/page/N, /my/movies; lists cached in memorymre
- b8bd1157tracker#14: README + STATUS (search, real-data numbers, gate, merge notes)mre
- 65c694a8tracker#14: search — header magnifier, /search/<text> (in-memory word-prefix index over titles + people), Fetch from web (TMDB search/multi, ours left out), Add = import via syncShow; gate +25 checks, real-data scriptmre
- 34f2c15btracker#15: TVmaze merge in the sync (gaps only: new episodes/seasons, empty titles/air dates; numbering check), fake TVmaze episodes + gatemre
- cbdc4ea7tracker#12: link icons TMDB/IMDb/TVDB/TVmaze; sync fills missing ids (TVmaze lookup); movies fetched via /movie/mre
- b105bcd8tracker#11: Hybriel master ff51cf46 (checks no longer vanish), mobile-first styles, carets, follow button, sign-in modal, inverted check, orange castmre
- 31b758aatracker#10: installable app (manifest, service worker, offline shell), own icon + faviconmre