gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitc1c4178cc1c4178cMerge branch 'rv39'mrec1c4178c/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

  • c1c4178cMerge branch 'rv39'mre
  • a016e9abReapply "Merge branch 'rv39'"mre
  • f29e2502log: RV39 gate fixmre
  • d9fce111browser gate #26: exact frame count incl. SL1 people step (hybriel#308)mre
  • ad529ac1log: m572 verdictmre
  • 1b37d404RV39 on hold: hybriel#308mre
  • f9127c68Revert "Merge branch 'rv39'"mre
  • cd39f3d3log: hybriel#308mre
  • 51341d6elog: RV39 deploy startedmre
  • c9e29e06Merge branch 'rv39'mre
  • 0f8d1fdclog: RV39 report, browser 387/2mre
  • 50249b0bRV39: reportmre
  • 10ed9581compose: HL_GC_STATS=1mre
  • 955da19bRV39: re-vendor Hybriel set day39 (source 51e921d7, bin 6b481aa7)mre
  • 64b8d1dclog: RV39 startedmre
  • 1f2df72amission RV39mre
  • 6c1936f9log+status: GC planmre
  • 2846a840log: m569 result, GC hypothesismre
  • b24cd2d5log: Anton on hl:fetch, mission 569mre
  • 7d42cac1log+status: SL1 measured, fetch stalls remainmre