gitoriaLog in with ident

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit6bb2daf16bb2daf1tracker#13: homepage (tiles, intro, latest movies/shows), /shows, /movies/page/N, /my/movies; lists cached in memorymre6bb2daf1/components/tilelist.hl

1.6 KB

  1. // components/tilelist.hl — the poster grid + pagination of /movies and /shows (tracker.worldapi.org#13), composed by
  2. // components/movies.hl and components/allshows.hl: `TileList { tiles = … page = … pages = … basePath = '/movies' }`.
  3. // A tile: poster, title, year, a link to the show page. Page 1 is `basePath`, page n `basePath/page/n`.
  4. // The pagination is components.hybriel's, copied verbatim (components/pagination.hl). It has no data out yet (its
  5. // README, hybriel#87), so a click on one of its buttons bubbles up to `pagerBox` here, which reads the button's text
  6. // ("Previous", "Next", a number; "…" goes nowhere) and navigates (client-side: the shell stays).
  7. import { navigate } from 'hl:web'
  8. import Pagination from './pagination.hl'
  9. tiles = []
  10. page = 1
  11. pages = 1
  12. basePath = '/'
  13. // one page only: no pagination at all (a lone "1" says nothing)
  14. hasPages = pages > 1
  15. View {
  16. tileList {
  17. tileGrid {
  18. for (t of tiles) {
  19. a { class = "tile" href = t.href
  20. img { class = "tile-poster" src = t.posterUrl alt = t.title loading = "lazy" }
  21. tileTitle { t.title }
  22. tileYear { t.year }
  23. }
  24. }
  25. }
  26. if (hasPages) {
  27. pagerBox { on click(e) { emit pagerClick(e) }
  28. Pagination { pages = pages page = page }
  29. }
  30. }
  31. }
  32. }
  33. on pagerClick(e) {
  34. if (e.target == null || e.target.tagName != 'BUTTON') { return null }
  35. let text = e.target.textContent
  36. let to = 0
  37. if (text == 'Previous') { to = page - 1 }
  38. else if (text == 'Next') { to = page + 1 }
  39. else if (text != '…') { to = toNumber(text) }
  40. if (to < 1 || to > pages || to == page) { return null }
  41. navigate(to == 1 ? basePath : basePath + '/page/' + to)
  42. }

Branches

Latest commits

  • 6bb2daf1tracker#13: homepage (tiles, intro, latest movies/shows), /shows, /movies/page/N, /my/movies; lists cached in memorymre
  • 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
  • 05f407c5tracker: no border on any button except inverted ones (Log out, ident status and identities too); header brand weight 100mre
  • 17375427tracker#2: tools/migrate.hl + tools/verify.hl — old MongoDB data into mpackdb with new idsmre
  • 31aac936tracker#3: no border on the header and on filled buttons; inverted buttons keep theirsmre
  • 2ad9d29ctracker#1: login exactly like calendar (identity selector in the header, empty homepage)mre
  • 3691e176tracker#1: empty tracker with the ident login (state of 2026-09-27)mre