gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitb0abfdeab0abfdeaLOG: Anton hybriel#277 fix ready for day37mreb0abfdea/components/tilelist.hl

1.3 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`. `tileClass` (tracker#37):
  4. // /people's tiles are "tile person-tile" (photo, the name in the person colour, no year).
  5. // The pagination is the shared copy (components/pagination.hl, layouts 76f99f6): it hands the clicked target page to `onPage`
  6. // (tracker#38 is solved there — no listener around it reading a button's text). `goPage` 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. tileClass = 'tile'
  14. // one page only: no pagination at all (a lone "1" says nothing)
  15. hasPages = pages > 1
  16. goPage = (to) => { navigate(to == 1 ? basePath : basePath + '/page/' + to) }
  17. View {
  18. tileList {
  19. tileGrid {
  20. for (t of tiles) {
  21. a { class = tileClass href = t.href
  22. img { class = "tile-poster" src = t.posterUrl alt = t.title loading = "lazy" }
  23. tileTitle { t.title }
  24. tileYear { t.year }
  25. }
  26. }
  27. }
  28. if (hasPages) {
  29. pagerBox { Pagination { pages = pages page = page onPage = goPage } }
  30. }
  31. }
  32. }

Branches

Latest commits

  • b0abfdeaLOG: Anton hybriel#277 fix ready for day37mre
  • 7b5b2918Tracker: hybriel#277 fix comes in day37mre
  • 7ddbeec8Tracker: RV28c blocked on day35 regressionmre
  • bf401884Tracker: RV28c startedmre
  • 0ff4ecd4Tracker: RV28c briefmre
  • 06565b1fRecords: day35 relay note, tickets subscription idmre
  • c6dc3e86RV28b: switch to set day35mre
  • 24e401b8Tracker: TR7 watch cleanmre
  • b0412957Tracker: RV28b handed overmre
  • 456940c8Tracker: RULINGS pathmre
  • b87a8fdcTracker: worldapi-conductor paths backmre
  • 641f3b54Tracker: Apollo answermre
  • 8b3cbddaTracker: status, TR7 fix livemre
  • ec30162aTracker: TR7 fix livemre
  • 54cbec80compose: ignore SIGPIPE (TR7 crash loop, exit 141)mre
  • 3e164b63Tracker: status after CL1mre
  • 9d686bb3Tracker: CL1 reviewedmre
  • b8bba562CL1: crash loop report (SIGPIPE confirmed, trap wrapper option)mre
  • 298785f2Tracker: CL1 startedmre
  • 36b22710Tracker: port slot, CL1 briefmre