tracker
All repositories: gitoria
1.6 KB
// components/tilelist.hl — the poster grid + pagination of /movies and /shows (tracker.worldapi.org#13), composed by// components/movies.hl and components/allshows.hl: `TileList { tiles = … page = … pages = … basePath = '/movies' }`.// A tile: poster, title, year, a link to the show page. Page 1 is `basePath`, page n `basePath/page/n`.// The pagination is components.hybriel's, copied verbatim (components/pagination.hl). It has no data out yet (its// README, hybriel#87), so a click on one of its buttons bubbles up to `pagerBox` here, which reads the button's text// ("Previous", "Next", a number; "…" goes nowhere) and navigates (client-side: the shell stays).import { navigate } from 'hl:web'import Pagination from './pagination.hl'tiles = []page = 1pages = 1basePath = '/'// one page only: no pagination at all (a lone "1" says nothing)hasPages = pages > 1View {tileList {tileGrid {for (t of tiles) {a { class = "tile" href = t.hrefimg { class = "tile-poster" src = t.posterUrl alt = t.title loading = "lazy" }tileTitle { t.title }tileYear { t.year }}}}if (hasPages) {pagerBox { on click(e) { emit pagerClick(e) }Pagination { pages = pages page = page }}}}}on pagerClick(e) {if (e.target == null || e.target.tagName != 'BUTTON') { return null }let text = e.target.textContentlet to = 0if (text == 'Previous') { to = page - 1 }else if (text == 'Next') { to = page + 1 }else if (text != '…') { to = toNumber(text) }if (to < 1 || to > pages || to == page) { return null }navigate(to == 1 ? basePath : basePath + '/page/' + to)}
Branches
- mainmain branch
Latest commits
- 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
- 2fa9d997tracker#9: TMDB sync (followed shows: seasons, episodes, posters), tools/sync-tmdb.hl + daily run 04:00 UTC, fake TMDB in gatemre
- 49e1f61edeploy.sh: back up live storage/.sessions/.env before every deploy (newest 5 kept)mre
- 54070a4etracker#8: /my/unwatched + /my/schedule (301 from old), S01E01, title (year), 1 episode, watched-set lookup (unwatched 15s -> 1s)mre
- 3251488atracker#7: /my/shows (followed shows, newest follow first, poster, title, last watched SxxEyy); gate can take screenshots (TRACKER_GATE_SHOTS)mre
- 44b7d9f9tracker#6: /schedule — upcoming episodes of followed shows, soonest firstmre
- 91c9fc8ctracker#5: /unwatched — unwatched released episodes of followed shows, newest firstmre
- a97c0295tracker#4: show page /shows/:slug (header, seasons, episodes, watch checks) + tools/relink-episode-seasons.hlmre