gitoriaLog in with ident

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit31b758aa31b758aatracker#10: installable app (manifest, service worker, offline shell), own icon + faviconmre31b758aa/styles.hl

8.3 KB

  1. // styles.hl — all of the app's CSS, served as /__hl/app.css. Components carry no Style
  2. // blocks: markup is domain tags, this file lays them out.
  3. //
  4. // TOKENS: the WorldAPI palette + semantic tokens are declared in `shared/tokens.hl` as
  5. // hl:web css variables, vendored verbatim from ident.worldapi.org (see that project's
  6. // README "Design tokens"). This file imports the tokens it uses and writes them as members;
  7. // the app sets only its accent (greenDark, per CONCEPT.md / antcolony README "look and style").
  8. //
  9. // In a styles file a bare name is a TAG (camelCase -> kebab: `emptyState` is `empty-state`),
  10. // a quoted name is a selector written verbatim. MOBILE FIRST: every rule is the phone's; the
  11. // one min-width block adds the wide layout.
  12. import { var } from 'hl:web/css'
  13. import { greenDark, colorText, colorBackground, colorTextStrong, colorBackgroundSunken, colorTextMuted, colorAccentText, colorBorder, colorDanger, colorSurface, red, blueDark } from './shared/tokens.hl'
  14. colorAccent = var(greenDark) // the app's accent: the only token this app sets
  15. // tracker.worldapi.org#4, the creator's own words: artists in red, genre pills in blue — the raw
  16. // palette tokens (like the accent above), not the semantic `colorDanger`/`colorAction` (this isn't a
  17. // warning or an action, just the creator's chosen colour for these two kinds of link/pill)
  18. colorArtist = var(red)
  19. colorGenre = var(blueDark)
  20. '*,
  21. *::before,
  22. *::after' { boxSizing = 'border-box' }
  23. html { colorScheme = 'dark' }
  24. body { margin = '0' font = '16px/1.5 system-ui, sans-serif' color = colorText background = colorBackground }
  25. a { color = colorAccent textDecoration = 'none' }
  26. 'a:hover' { textDecoration = 'underline' }
  27. h1 { margin = '0 0 1rem' fontSize = '1.3rem' lineHeight = '1.3' color = colorTextStrong }
  28. button { font = 'inherit' fontWeight = '600' padding = '.4rem .9rem' color = colorAccentText background = colorAccent border = '0' borderRadius = '.4rem' cursor = 'pointer' }
  29. 'button:hover' { filter = 'brightness(1.1)' }
  30. 'button.quiet' { color = colorText background = 'transparent' border = '0' }
  31. // the ONLY buttons with a border are inverted ones (creator: "no borders for the buttons unless they are inverted")
  32. 'button.inverted' { color = colorAccent background = 'transparent' border = '1px solid ' + colorAccent }
  33. 'button.quiet:hover' { background = colorSurface filter = 'none' }
  34. applicationHeader { position = 'sticky' top = '0' zIndex = '5' display = 'flex' flexWrap = 'wrap' alignItems = 'baseline' gap = '.2rem 1rem' padding = '.6rem 1rem' background = colorBackgroundSunken }
  35. 'application-header .brand' { fontWeight = '100' fontSize = '1.15rem' color = colorAccent }
  36. main { display = 'block' maxWidth = '60rem' margin = '0 auto' padding = '1rem' }
  37. // ---- login (top right of the header), copied from calendar.worldapi.org's styles.hl -------------
  38. userBox { display = 'flex' alignItems = 'center' gap = '.5rem' marginLeft = 'auto' }
  39. 'a.button' { display = 'inline-block' padding = '.35rem .8rem' fontWeight = '600' color = colorAccentText background = colorAccent borderRadius = '.4rem' }
  40. 'a.button:hover' { textDecoration = 'none' filter = 'brightness(1.1)' }
  41. identSelector { '--ident-accent' = colorAccent '--ident-accent-text' = colorAccentText '--ident-background' = colorSurface '--ident-border' = colorBorder '--ident-font' = '600 .9rem/1.4 system-ui, sans-serif' }
  42. 'ident-selector::part(button)' { padding = '.35rem .8rem' border = 'none' }
  43. 'ident-selector::part(status)' { padding = '.35rem .8rem' border = 'none' }
  44. 'ident-selector::part(identity)' { border = 'none' }
  45. '.message' { color = colorDanger }
  46. '.muted' { color = colorTextMuted }
  47. '.message.banner' { margin = '0' padding = '.5rem 1rem' background = colorBackgroundSunken }
  48. 'p.message:empty' { display = 'none' }
  49. // ---- offline (tracker.worldapi.org#10, components/main.hl): the note under the header, and the probe whose endless
  50. // animation is the shell's 1 s tick (it must be rendered for the animation to run — not display none — so: invisible)
  51. offlineNote { display = 'block' padding = '.5rem 1rem' color = colorTextStrong background = colorSurface }
  52. netProbe { position = 'fixed' left = '0' top = '0' width = '1px' height = '1px' opacity = '0' pointerEvents = 'none' animation = 'tracker-net-tick 1s linear infinite' }
  53. '@keyframes tracker-net-tick' = {
  54. 'from' = { opacity = '0' }
  55. to = { opacity = '0' }
  56. }
  57. // ---- /shows/:slug (tracker.worldapi.org#4) --------------------------------------------------
  58. showPage { display = 'block' }
  59. showHeader { display = 'flex' flexDirection = 'column' gap = '1rem' marginBottom = '1.5rem' }
  60. showPoster { flex = 'none' width = '10rem' }
  61. 'show-poster img' { display = 'block' width = '100%' height = 'auto' borderRadius = '.4rem' aspectRatio = '2 / 3' objectFit = 'cover' background = colorSurface }
  62. showMeta { flex = '1' }
  63. showGenres { display = 'flex' flexWrap = 'wrap' gap = '.4rem' margin = '.5rem 0' }
  64. '.genre-pill' { display = 'inline-block' padding = '.15rem .6rem' borderRadius = '1rem' fontSize = '.85rem' color = colorGenre border = '1px solid ' + colorGenre }
  65. showSummary { display = 'block' margin = '.5rem 0' color = colorText }
  66. showCast { display = 'block' margin = '.5rem 0' }
  67. '.artist-link' { color = colorArtist }
  68. '.artist-link:not(:last-child)::after' { content = "', '" color = colorTextMuted }
  69. showSeasons { display = 'block' }
  70. seasonRow { display = 'flex' alignItems = 'center' gap = '.6rem' padding = '.6rem 0' borderTop = '1px solid ' + colorBorder }
  71. 'button.season-toggle' { flex = '1' display = 'flex' alignItems = 'baseline' gap = '.6rem' justifyContent = 'flex-start' padding = '0' color = colorText background = 'transparent' border = '0' fontWeight = '600' cursor = 'pointer' textAlign = 'left' }
  72. seasonCount { fontWeight = '400' fontSize = '.85rem' color = colorTextMuted }
  73. episodeRow { display = 'flex' alignItems = 'center' gap = '.6rem' padding = '.4rem 0 .4rem 2.8rem' }
  74. episodeNumber { flex = 'none' width = '2rem' color = colorTextMuted }
  75. episodeTitle { flex = '1' }
  76. // the check: "a disc with a check in it" (drawn in CSS/SVG, no icon font) — solid (filled, accent)
  77. // once watched, regular (outline only) while not
  78. 'button.checkicon' { flex = 'none' display = 'grid' placeItems = 'center' width = '2rem' height = '2rem' padding = '0' background = 'transparent' border = '0' borderRadius = '50%' cursor = 'pointer' }
  79. '.checkicon circle' { fill = 'transparent' stroke = colorBorder strokeWidth = '1.5' }
  80. '.checkicon path' { fill = 'none' stroke = 'transparent' strokeWidth = '2' strokeLinecap = 'round' strokeLinejoin = 'round' }
  81. '.checkicon.solid circle' { fill = colorAccent stroke = colorAccent }
  82. '.checkicon.solid path' { stroke = colorAccentText }
  83. // ---- /unwatched (tracker.worldapi.org#5) ----------------------------------------------------
  84. unwatchedPage { display = 'block' }
  85. unwatchedRows { display = 'block' }
  86. unwatchedRow { display = 'flex' alignItems = 'center' gap = '.6rem' padding = '.5rem 0' borderTop = '1px solid ' + colorBorder }
  87. '.unwatched-show' { flex = 'none' fontWeight = '600' }
  88. unwatchedEpisode { flex = '1' color = colorText }
  89. unwatchedDate { flex = 'none' fontSize = '.85rem' color = colorTextMuted }
  90. // ---- /schedule (tracker.worldapi.org#6) — same row layout as /unwatched, minus the check icon -----
  91. schedulePage { display = 'block' }
  92. scheduleRows { display = 'block' }
  93. scheduleRow { display = 'flex' alignItems = 'center' gap = '.6rem' padding = '.5rem 0' borderTop = '1px solid ' + colorBorder }
  94. '.schedule-show' { flex = 'none' fontWeight = '600' }
  95. scheduleEpisode { flex = '1' color = colorText }
  96. scheduleDate { flex = 'none' fontSize = '.85rem' color = colorTextMuted }
  97. // ---- /my/shows (tracker.worldapi.org#7) — small poster, title, last watched episode ------------
  98. myShowsPage { display = 'block' }
  99. myShowsRows { display = 'block' }
  100. myShowRow { display = 'flex' alignItems = 'center' gap = '.8rem' padding = '.5rem 0' borderTop = '1px solid ' + colorBorder }
  101. 'img.myshow-poster' { flex = 'none' display = 'block' width = '2.5rem' height = 'auto' aspectRatio = '2 / 3' objectFit = 'cover' borderRadius = '.25rem' background = colorSurface }
  102. '.myshow-title' { flex = '1' fontWeight = '600' }
  103. myShowEpisode { flex = 'none' fontSize = '.9rem' color = colorTextMuted fontVariantNumeric = 'tabular-nums' }
  104. '@media (min-width: 40rem)' = {
  105. showHeader = { flexDirection = 'row' }
  106. }

Branches

Latest commits

  • 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
  • 2ad9d29ctracker#1: login exactly like calendar (identity selector in the header, empty homepage)mre
  • 3691e176tracker#1: empty tracker with the ident login (state of 2026-09-27)mre