tracker
All repositories: gitoria
6.3 KB
// components/person.hl — `/person/<slug>` (tracker.worldapi.org#16): a person's page — name, photo, born/died, bio, then// the filmography (poster, title, year, role; series and movies, newest first, each → its page: /series/, /shows/ or /movies/<slug>).// The show page's cast and the search's people link here. tracker.worldapi.org#20: the heading is "Person | <name>" (the type word// in the person colour, styles.hl `type-*`), each row's kind word in its type's colour.//// Server admission and audience pushes fill an incomplete person without reloading.//// mission 060 (tracker.worldapi.org#27): the person's short id (shortids.hl) under the photo (no photo: under the facts).//// HYBRIEL TRAPS: no session here at all (the fill needs no sign-in — one TMDB request per person, ever), so hybriel#121/#122// can't bite; every list is replaced whole. Helpers are LOCAL statics (an imported mpackdb helper straight in a member's// initializer came back wrong after a client-side navigation — components/show.hl `followingOf`).parent './main.hl'import { appTitle } from '../lib/app.hl'import { pageOf } from '../lib/people.hl'import { warmReady, warmText } from '../lib/warm.hl'import { requestFill } from '../lib/pagefills.hl'// everything the page shows for one slugstatic initialPage = (&slug) => {data = pageOf(&slug)if (data.loading) {error = requestFill('person', data.id, slug, pageOf)if (error != '') { data.error = error data.loading = false }}return data}// ---- reactive members -----------------------------------------------------------------------slug = nullstart = initialPage(&slug)found = start.foundnotFound = !start.foundname = start.namephotoUrl = start.photoUrlhasPhoto = photoUrl != ''// mission 060 (tracker.worldapi.org#27): the short id under the photo — no photo: under the name and factsshortId = start.shortIdhasShortId = shortId != ''shortIdInMeta = hasShortId && !hasPhotoborn = start.bornhasBorn = born != ''died = start.diedhasDied = died != ''bio = start.biohasBio = bio != ''bioClass = 'short'rows = start.rowshasRows = rows.length > 0loading = start.loadingloadText = 'Loading filmography…'fillError = start.errorhasFillError = fillError != ''noRows = found && !loading && rows.length == 0 && fillError == ''__title = found ? name + ' — ' + appTitle : appTitle// mission T17 (boot time): the server listens while bootscan.hl still builds the lists / slug maps / search index (lib/warm.hl); until the 'all'// stage is there this page says so instead of showing half a mapwarming = !warmReady('all')warmNote = warming ? warmText() : ''// Component styles use the shared theme variables.Style {personMeta {display = 'block'minWidth = '0'overflowWrap = 'anywhere'shortIdLabel {textAlign = 'left'}}personPage {display = 'block'}personHeader {display = 'flex'alignItems = 'flex-start'gap = '.8rem'marginBottom = '1rem'@media {minWidth = '40rem'gap = '1rem'}}personPhoto {flex = 'none'display = 'block'width = '6rem'img {display = 'block'width = '100%'height = 'auto'aspectRatio = '2 / 3'objectFit = 'cover'borderRadius = 'var(--radius-large)'background = 'var(--color-surface)'}@media {minWidth = '40rem'width = '10rem'}}personFact {display = 'block'fontSize = '.95rem'color = 'var(--color-text-muted)'}personBio {display = 'block'margin = '0 0 1rem'fontSize = '.95rem'whiteSpace = 'pre-line'cursor = 'pointer'}'person-bio.short' {display = '-webkit-box'overflow = 'hidden''-webkit-line-clamp' = '4''-webkit-box-orient' = 'vertical'}personLoading {display = 'block'padding = '.6rem 0'color = 'var(--color-text-muted)'}filmRows {display = 'block'}aFilmRow {display = 'flex'alignItems = 'center'gap = '.8rem'padding = '.45rem 0'color = 'var(--color-text)'hover {textDecoration = 'none'filmTitle {color = 'var(--color-accent)'}}}filmRole {fontSize = '.85rem'color = 'var(--color-type5)'overflowWrap = 'anywhere'empty {display = 'none'}}filmYear {empty {display = 'none'}}}View {personPage { "data-loading" = loadingif (warming) { p { id = "warming" class = "message banner" warmNote } }if (notFound) {article { class = "main"h1 { "Not found" }p { "This person doesn't exist." }}}if (found) {personHeader {if (hasPhoto) {personPhoto {img { src = photoUrl alt = name }if (hasShortId) { shortIdLabel { id = "shortid" title = "Short id" shortId } }}}personMeta {h1 { class = "typed" typeWord { class = "type-word type-person" "Person" } typeSep { "|" } typeName { name } }if (hasBorn) { personFact { class = "born" born } }if (hasDied) { personFact { class = "died" died } }if (shortIdInMeta) { shortIdLabel { id = "shortid" title = "Short id" shortId } }}}// a SHORT bio: four lines (styles.hl), a click shows all of itif (hasBio) { personBio { class = bioClass title = "Show all" bio on click(e) { emit toggleBio(e) } } }h2 { class = "film-heading" "Filmography" }if (loading) {personLoading { id = "personloading" loadText}}if (hasFillError) { p { id = "fillerror" class = "message" fillError } }if (noRows) { p { id = "nofilms" class = "muted" "No shows or movies known." } }if (hasRows) {filmRows {for (row of rows) {a { Style.aFilmRow href = row.hrefimg { class = "film-poster" src = row.posterUrl alt = "" loading = "lazy" }filmText {filmTitle { row.title }filmMeta {filmYear { row.year }filmType { class = row.typeClass row.typeLabel }}filmRole { row.role }}}}}}}}}on client personFillProgress(id, pos, total) {if (start.id != id || !loading) { return null }loadText = 'Loading filmography… ' + pos + ' of ' + total + ' titles'}on client personFilled(id, data) {if (start.id != id) { return null }if (data.error != null && data.error != '') {fillError = 'Could not load the filmography: ' + data.errorloading = falsereturn null}start = dataloading = false}on toggleBio(e) {bioClass = bioClass == 'short' ? 'full' : 'short'}
Branches
Latest commits
- 3fb87112|||PR HM55b record six additional focused toggle bisectsTracker
- 20131f51|||PR HM55b record incomplete episode-toggle bisectTracker
- 17feb7abHM55 WIP: hm54-fill re-applied on main; browser gate fails at ep3 toggleTracker
- 28eab08cMerge branch 'records-hm55' into mainTracker
- d3edaa05|||PR records: HM55 start, PROCEDURES.mdTracker
- 3059f86cMerge branch 'records-design-rule' into mainTracker
- 421a4809|||PR records: his-design rule (Apollo 2026-11-13)Tracker
- d1390692Merge branch 'records-dp75b' into mainTracker
- a4d1a7d2|||PR records: later steps checked, branch auditTracker
- e070e16fMerge branch 'records-dp75' into mainTracker
- 642b4fa8|||PR records: DP75 day62 live, AP62 briefTracker
- bfc4ea4dMerge branch 'ap62' into mainTracker
- 2c95ac46|||PR AP62: re-vendor Hybriel set day62 (source 70341ad2, bin a54f5f08)Tracker
- b9c7c3c8Merge branch 'records-dp74' into mainTracker
- 85cfb4ae|||PR records: AP61 day61, DP74 liveTracker
- b1496147Merge branch 'ap61' into mainTracker
- 2047955bMerge branch 'u12-gateports' into mainTracker
- c8da40f3|||PR AP61: re-vendor Hybriel set day61 (source a05af47c, bin a11042e5)Tracker
- 4e018678|||PR deploy.sh: gates use Tracker's ports 8716-8719 and LC_ALL=C; README: 2 backups keptTracker
- 0b86324aMerge branch 'records-dp73' into mainTracker