tracker
All repositories: gitoria
1.3 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`. `tileClass` (tracker#37):// /people's tiles are "tile person-tile" (photo, the name in the person colour, no year).// The pagination is the shared copy (components/pagination.hl, layouts 76f99f6): it hands the clicked target page to `onPage`// (tracker#38 is solved there — no listener around it reading a button's text). `goPage` navigates client-side: the shell stays.import { navigate } from 'hl:web'import Pagination from './pagination.hl'tiles = []page = 1pages = 1basePath = '/'tileClass = 'tile'// one page only: no pagination at all (a lone "1" says nothing)hasPages = pages > 1goPage = (to) => { navigate(to == 1 ? basePath : basePath + '/page/' + to) }View {tileList {tileGrid {for (t of tiles) {a { class = tileClass href = t.hrefimg { class = "tile-poster" src = t.posterUrl alt = t.title loading = "lazy" }tileTitle { t.title }tileYear { t.year }}}}if (hasPages) {pagerBox { Pagination { pages = pages page = page onPage = goPage } }}}}
Branches
Latest commits
- a722e526log: #62 blocked by hybriel#317mre
- 074a7418log: #62 assigned to Tracker; pending rulemre
- 06f6ae8fHM62 report: mpackdb index gapmre
- 86fe5430log: HM62 startedmre
- 755307bbmission HM62mre
- 4b2f2995HM61 report: tracker#61 packed people ordermre
- 48faa84flog: #60 deploy startedmre
- 90734c6cMerge branch 'hm60-shortids'mre
- e0db0d1bHM60 report: tracker#60 packed short-ID ownersmre
- 3c79b576Pack short-ID ownership into byte buffersmre
- e822524bstatus wordingmre
- 1c7f0480log: HM60/HM61 startedmre
- 2841d215missions HM60 HM61mre
- 289c6ce4HM1 report: heap object breakdownmre
- 2e7d6257log: HM1 startedmre
- 2f790465mission HM1: heap object breakdownmre
- a18957falog: evening re-measure after CBmre
- aac9a98dlog: evening re-measure startmre
- 45163bd4log: person/tmdb error hypothesismre
- cb38de2blog: swap 503 causemre