gitoriaLog in with ident

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitdcc5eecadcc5eecaMerge branch 't14-search'mredcc5eeca/components/home.hl

3.6 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. parent './main.hl'
  11. import { appTitle } from '../project.hl'
  12. import { userIdOfSession } from '../users.hl'
  13. import { latestMovies, latestSeries } from '../catalog.hl'
  14. session = null
  15. signedIn = userIdOfSession(session) != null
  16. signedOut = !signedIn
  17. movieTiles = latestMovies(10)
  18. seriesTiles = latestSeries(10)
  19. __title = appTitle
  20. View {
  21. home {
  22. if (signedIn) {
  23. homeNav {
  24. a { class = "hometile" href = "/my/unwatched"
  25. svg { viewBox = "0 0 24 24" width = "40" height = "40" "aria-hidden" = "true"
  26. circle { cx = "12" cy = "12" r = "10" }
  27. path { d = "M7 12.5 L10.5 16 L17 8.5" }
  28. }
  29. span { "Unwatched" }
  30. }
  31. a { class = "hometile" href = "/my/schedule"
  32. svg { viewBox = "0 0 24 24" width = "40" height = "40" "aria-hidden" = "true"
  33. rect { x = "3" y = "5" width = "18" height = "16" rx = "2" }
  34. 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" }
  35. }
  36. span { "Schedule" }
  37. }
  38. a { class = "hometile" href = "/my/shows"
  39. svg { viewBox = "0 0 24 24" width = "40" height = "40" "aria-hidden" = "true"
  40. rect { x = "2" y = "7" width = "20" height = "14" rx = "2" }
  41. path { d = "M8 3 L12 7 L16 3" }
  42. }
  43. span { "Shows" }
  44. }
  45. a { class = "hometile" href = "/my/movies"
  46. svg { viewBox = "0 0 24 24" width = "40" height = "40" "aria-hidden" = "true"
  47. rect { x = "3" y = "3" width = "18" height = "18" rx = "2" }
  48. 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" }
  49. }
  50. span { "Movies" }
  51. }
  52. }
  53. }
  54. homeIntro {
  55. 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." }
  56. if (signedOut) { p { "Log in with ident (top right) to follow shows and mark what you have seen." } }
  57. p { "tracker installs as an app on your phone or computer: use your browser's \"Install\" or \"Add to Home Screen\"." }
  58. }
  59. homeSection { id = "home-movies"
  60. h2 { a { href = "/movies" "Movies" } }
  61. tileRow {
  62. for (t of movieTiles) {
  63. a { class = "tile" href = t.href
  64. img { class = "tile-poster" src = t.posterUrl alt = t.title loading = "lazy" }
  65. tileTitle { t.title }
  66. tileYear { t.year }
  67. }
  68. }
  69. }
  70. }
  71. homeSection { id = "home-shows"
  72. h2 { a { href = "/shows" "Shows" } }
  73. tileRow {
  74. for (t of seriesTiles) {
  75. a { class = "tile" href = t.href
  76. img { class = "tile-poster" src = t.posterUrl alt = t.title loading = "lazy" }
  77. tileTitle { t.title }
  78. tileYear { t.year }
  79. }
  80. }
  81. }
  82. }
  83. }
  84. }

Branches

Latest commits

  • dcc5eecaMerge branch 't14-search'mre
  • 03edc783Merge branch 't15-tvmaze'mre
  • 71b46345tracker#15: numbering check by date or title, placeholder titles in other languages, docs + real-data proofmre
  • 6bb2daf1tracker#13: homepage (tiles, intro, latest movies/shows), /shows, /movies/page/N, /my/movies; lists cached in memorymre
  • b8bd1157tracker#14: README + STATUS (search, real-data numbers, gate, merge notes)mre
  • 65c694a8tracker#14: search — header magnifier, /search/<text> (in-memory word-prefix index over titles + people), Fetch from web (TMDB search/multi, ours left out), Add = import via syncShow; gate +25 checks, real-data scriptmre
  • 34f2c15btracker#15: TVmaze merge in the sync (gaps only: new episodes/seasons, empty titles/air dates; numbering check), fake TVmaze episodes + gatemre
  • cbdc4ea7tracker#12: link icons TMDB/IMDb/TVDB/TVmaze; sync fills missing ids (TVmaze lookup); movies fetched via /movie/mre
  • b105bcd8tracker#11: Hybriel master ff51cf46 (checks no longer vanish), mobile-first styles, carets, follow button, sign-in modal, inverted check, orange castmre
  • 31b758aatracker#10: installable app (manifest, service worker, offline shell), own icon + faviconmre
  • 2fa9d997tracker#9: TMDB sync (followed shows: seasons, episodes, posters), tools/sync-tmdb.hl + daily run 04:00 UTC, fake TMDB in gatemre
  • 49e1f61edeploy.sh: back up live storage/.sessions/.env before every deploy (newest 5 kept)mre
  • 54070a4etracker#8: /my/unwatched + /my/schedule (301 from old), S01E01, title (year), 1 episode, watched-set lookup (unwatched 15s -> 1s)mre
  • 3251488atracker#7: /my/shows (followed shows, newest follow first, poster, title, last watched SxxEyy); gate can take screenshots (TRACKER_GATE_SHOTS)mre
  • 44b7d9f9tracker#6: /schedule — upcoming episodes of followed shows, soonest firstmre
  • 91c9fc8ctracker#5: /unwatched — unwatched released episodes of followed shows, newest firstmre
  • a97c0295tracker#4: show page /shows/:slug (header, seasons, episodes, watch checks) + tools/relink-episode-seasons.hlmre
  • 05f407c5tracker: no border on any button except inverted ones (Log out, ident status and identities too); header brand weight 100mre
  • 17375427tracker#2: tools/migrate.hl + tools/verify.hl — old MongoDB data into mpackdb with new idsmre
  • 31aac936tracker#3: no border on the header and on filled buttons; inverted buttons keep theirsmre