gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit05d89fd005d89fd0deploy: security gate (tests/security.mjs)mre05d89fd0/components/home.hl

5.1 KB

  1. // components/home.hl — `/` (tracker.worldapi.org#13; empty since step 1). Creator: "on the homepage when you are logged in
  2. // you see 4 icons leading to unwatched scheudle shows and movies. below that then same as logged out: first a text
  3. // describing what the site does then last released 10 movies and last aired 10 shows. movies and shows headings are links
  4. // to /movies and /shows". Architect's readings: the icons go to /my/unwatched, /my/schedule, /my/shows, /my/movies; "last
  5. // aired shows" = the series whose newest RELEASED episode is newest.
  6. //
  7. // The two rows come from catalog.hl (built once at start, no scan per request): poster + title + year, each a link to the
  8. // show page (a movie's too — it has the same page and Follow button). Phone: each row scrolls sideways inside itself;
  9. // from 40rem a grid (styles.hl). Sign in/out stays the header's job (components/main.hl).
  10. //
  11. // tracker.worldapi.org#21 (mission 068): series and shows are split — FIVE icon tiles (Unwatched, Schedule, Series → /my/series,
  12. // Shows → /my/shows, Movies) and THREE rows (Movies, Series → /series, Shows → /shows). #20: each row heading in its type's colour.
  13. parent './main.hl'
  14. import { appTitle } from '../project.hl'
  15. import { userIdOfSession } from '../lib/users.hl'
  16. import { latestMovies, latestSeries, latestShows } from '../lib/catalog.hl'
  17. import { warmReady, warmText } from '../lib/warm.hl'
  18. session = null
  19. signedIn = userIdOfSession(session) != null
  20. signedOut = !signedIn
  21. movieTiles = latestMovies(10)
  22. seriesTiles = latestSeries(10)
  23. showTiles = latestShows(10)
  24. __title = appTitle
  25. // mission T17 (boot time): the server listens while bootscan.hl still builds the lists / slug maps / search index (lib/warm.hl); until the 'catalog'
  26. // stage is there this page says so instead of showing half a map
  27. warming = !warmReady('catalog')
  28. warmNote = warming ? warmText() : ''
  29. View {
  30. home {
  31. if (warming) { p { id = "warming" class = "message banner" warmNote } }
  32. if (signedIn) {
  33. homeNav {
  34. a { class = "hometile" href = "/my/unwatched"
  35. svg { viewBox = "0 0 24 24" width = "40" height = "40" "aria-hidden" = "true"
  36. circle { cx = "12" cy = "12" r = "10" }
  37. path { d = "M7 12.5 L10.5 16 L17 8.5" }
  38. }
  39. span { "Unwatched" }
  40. }
  41. a { class = "hometile" href = "/my/schedule"
  42. svg { viewBox = "0 0 24 24" width = "40" height = "40" "aria-hidden" = "true"
  43. rect { x = "3" y = "5" width = "18" height = "16" rx = "2" }
  44. path { d = "M3 10 H21 M8 3 V7 M16 3 V7 M7 14 H9 M11 14 H13 M15 14 H17 M7 17.5 H9 M11 17.5 H13" }
  45. }
  46. span { "Schedule" }
  47. }
  48. a { class = "hometile" href = "/my/series"
  49. svg { viewBox = "0 0 24 24" width = "40" height = "40" "aria-hidden" = "true"
  50. rect { x = "2" y = "7" width = "20" height = "14" rx = "2" }
  51. path { d = "M8 3 L12 7 L16 3" }
  52. }
  53. span { "Series" }
  54. }
  55. // a show: a microphone (talk, news, reality)
  56. a { class = "hometile" href = "/my/shows"
  57. svg { viewBox = "0 0 24 24" width = "40" height = "40" "aria-hidden" = "true"
  58. rect { x = "9" y = "2" width = "6" height = "12" rx = "3" }
  59. path { d = "M5 11 A7 7 0 0 0 19 11 M12 18 V22 M8 22 H16" }
  60. }
  61. span { "Shows" }
  62. }
  63. a { class = "hometile" href = "/my/movies"
  64. svg { viewBox = "0 0 24 24" width = "40" height = "40" "aria-hidden" = "true"
  65. rect { x = "3" y = "3" width = "18" height = "18" rx = "2" }
  66. path { d = "M7.5 3 V21 M16.5 3 V21 M3 7.5 H7.5 M3 12 H7.5 M3 16.5 H7.5 M16.5 7.5 H21 M16.5 12 H21 M16.5 16.5 H21" }
  67. }
  68. span { "Movies" }
  69. }
  70. }
  71. }
  72. homeIntro {
  73. p { "tracker keeps track of the series and movies you follow and of every episode you have watched. Follow a show and its new episodes show up under Unwatched once they are out, and under Schedule before that — new episodes and posters come in from TMDB every day." }
  74. if (signedOut) { p { "Log in with ident (top right: choose ident) to follow shows and mark what you have seen." } }
  75. p { "tracker installs as an app on your phone or computer: use your browser's \"Install\" or \"Add to Home Screen\"." }
  76. }
  77. homeSection { id = "home-movies"
  78. h2 { a { href = "/movies" class = "type-word type-movie" "Movies" } }
  79. tileRow {
  80. for (t of movieTiles) {
  81. a { class = "tile" href = t.href
  82. img { class = "tile-poster" src = t.posterUrl alt = t.title loading = "lazy" }
  83. tileTitle { t.title }
  84. tileYear { t.year }
  85. }
  86. }
  87. }
  88. }
  89. homeSection { id = "home-series"
  90. h2 { a { href = "/series" class = "type-word type-series" "Series" } }
  91. tileRow {
  92. for (t of seriesTiles) {
  93. a { class = "tile" href = t.href
  94. img { class = "tile-poster" src = t.posterUrl alt = t.title loading = "lazy" }
  95. tileTitle { t.title }
  96. tileYear { t.year }
  97. }
  98. }
  99. }
  100. }
  101. homeSection { id = "home-shows"
  102. h2 { a { href = "/shows" class = "type-word type-show" "Shows" } }
  103. tileRow {
  104. for (t of showTiles) {
  105. a { class = "tile" href = t.href
  106. img { class = "tile-poster" src = t.posterUrl alt = t.title loading = "lazy" }
  107. tileTitle { t.title }
  108. tileYear { t.year }
  109. }
  110. }
  111. }
  112. }
  113. }
  114. }

Branches

Latest commits

  • 05d89fd0deploy: security gate (tests/security.mjs)mre
  • 2ae8a47bMerge branch 'sk-sec'mre
  • 8fee5d52sessions last 99 years (creator 2026-10-23: logins never expire; only sign out ends them)mre
  • 944ad51eSK: report reports/SK-sec.md, LOGsk
  • 415487c1SK: import budget per user + id type check, gate checkssk
  • 7b8a4f74security audit SK: nosniff + image sandbox headers, face id checks, adult follow, login budget + new session at login, guest-link budget, tests/security.mjssk
  • f0f26c5areports: T18 section (gates, boot-gate, 3x3 table, search + short-id compare)mre
  • 2a8682a1deploy.sh GATES: tests/warmstart.mjsmre
  • 3761338breports/T17-boot.md: handoff (phase table, fix, numbers so far, open proof)mre
  • 52e09eb2boot: sync window 1000 ms (the gates ask for a complete start), README boot-time sectionmre
  • c87149e8tests/warmstart.mjs: the progressive start proven over HTTP (note in the window, 503 short id, after: everything); bootBeginmre
  • 593a6350boot: resumable start-up scan, the server listens first (T17)mre
  • be4890a0reports: H2 hydration audit (no test change needed)mre
  • 1f9c8bf4re-vendor Hybriel 5406d146 (hl:web batches 9+10: #72 emits while the socket is closed delivered after reconnect, browser boot linear, faster list appends; contains int 6–14 + m406)mre
  • c1df88eddocker-compose: HL_GC_TABLE_LOAD=62 (tracker mission 048, T16 real-data numbers)mre
  • d0a82867mission 048: report, LOG (HL_GC_TABLE_LOAD=62 measured)mre
  • 2d4be66fre-vendor Hybriel 5df4eb7e (GC: HL_GC_TABLE_LOAD knob, mission 406)mre
  • 99e7c8b9tests: realdata-m035-radii, repro-t38, realdata-060-backfill ports from env (REAL_PORT, REAL_CHROME, REPRO_CHROME), defaults unchangedmre
  • 4625aa22re-vendor Hybriel 6f8a0689 (int 6–11: streaming cursors, #203 index heal + close() fix, fd403 listDir/cursor fds, hl:time browser side, hl:web batches 5+6)mre
  • a6dfd6ecdeploy: person-lookup gate (tracker#46)mre