gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitcb634512cb634512log: 2026-11-08 keyed lists livemrecb634512/components/readme.hl

2.7 KB

  1. // components/readme.hl — THE README VIEW of a repo (ticket #8, gitoria#16): `/` on <slug>.<domain>, composed
  2. // into components/index.hl. Rendered on the SERVER with its content: the repo from the request's host, the
  3. // README.md / $docs Markdown from git (lib/homepage.hl homepageNow — hl:proc run() waits, hybriel#80).
  4. import Markdown from './markdown.hl'
  5. import { slugOfRequest } from '../lib/orgs.hl'
  6. import { px, repoOrigin } from '../lib/util.hl'
  7. import { forwardOf } from '../lib/forwards.hl'
  8. import { repoAt } from '../lib/repos.hl'
  9. import { homepageNow } from '../lib/homepage.hl'
  10. host = null
  11. orepo = ''
  12. session = null
  13. slug = slugOfRequest(host, orepo)
  14. repo = repoAt(slug, session)
  15. hasRepo = repo != null
  16. pre = px(slug)
  17. codeHref = pre + '/code'
  18. movedTo = repo == null ? forwardOf(slug) : null
  19. wasMoved = movedTo != null
  20. movedHref = movedTo != null ? repoOrigin(movedTo) + '/' : ''
  21. home = repo != null ? homepageNow(slug, repo.branch) : null
  22. docsFound = home != null && home.found
  23. docsNone = home != null && !home.found
  24. docsTruncated = home != null && home.truncated
  25. docs = home != null ? home.files : []
  26. View {
  27. repoPage {
  28. if (wasMoved) { p { id = "moved" "This repository moved to " a { id = "movedlink" href = movedHref movedTo } "." } }
  29. if (hasRepo) {
  30. dl {
  31. dt { "Address" }
  32. dd { a { id = "repoaddress" href = repo.address repo.address } }
  33. dt { "Owner" }
  34. dd { id = "repoowner" repo.owner }
  35. dt { "Created" }
  36. dd { time { id = "repocreated" repo.created } }
  37. }
  38. if (docsNone) { p { id = "nohomepage" class = "empty" "This repository has no README.md yet. Open the " a { id = "tocode" href = codeHref "Code" } " page to see how to push code." } }
  39. if (docsFound) {
  40. repoHomepage { id = "homepage"
  41. for (d of docs) {
  42. homepageFile {
  43. if (d.isDocs) { code { d.path } }
  44. Markdown { blocks = d.blocks }
  45. }
  46. }
  47. if (docsTruncated) { p { id = "docstruncated" class = "muted" "Very long files are cut off here." } }
  48. }
  49. }
  50. }
  51. }
  52. }
  53. Style {
  54. #moved {
  55. margin = '0'
  56. color = 'var(--color-success)'
  57. }
  58. #dl {
  59. display = 'grid'
  60. gridTemplateColumns = 'auto minmax(0, 1fr)'
  61. gap = '.3rem 1rem'
  62. alignItems = 'center'
  63. margin = '0'
  64. dt {
  65. color = 'var(--color-text-muted)'
  66. }
  67. dd {
  68. margin = '0'
  69. overflowWrap = 'anywhere'
  70. // Direct-child selectors have no bare language form.
  71. '> a' {
  72. display = 'inline-flex'
  73. alignItems = 'center'
  74. minHeight = '2.75rem'
  75. }
  76. }
  77. }
  78. homepageFile {
  79. display = 'grid'
  80. gap = '.5rem'
  81. minWidth = '0'
  82. // Direct-child universal selectors have no bare language form.
  83. '> *' {
  84. margin = '0'
  85. }
  86. }
  87. #code {
  88. color = 'var(--color-text-muted)'
  89. fontSize = '.875rem'
  90. background = 'transparent'
  91. padding = '0'
  92. }
  93. repoHomepage {
  94. display = 'grid'
  95. gap = '1.5rem'
  96. minWidth = '0'
  97. }
  98. }

Branches

Latest commits

  • cb634512log: 2026-11-08 keyed lists livemre
  • 07c98d4aLists: keyed rows with @id, remove(id) and one whole-list assignment instead of hand-rebuilt loopsmre
  • 0db0d81elog: 2026-11-08 day52 live, W30 startedmre
  • b05f6d92tests/status: the gate's 3 s app token expired during the restart; it lives 60 s like status-keyedmre
  • 1e8f4f0avendor: Hybriel set-day52 (fault-path leak fix #335, keyed rows #331)mre
  • f5f0fb7blog: 2026-11-08 day50/#29 live, H25 correction, V52 startedmre
  • dc77fb95main: offline note from __hlOnline, tick removed (#29)mre
  • 37a86d93tests/reviews: seeded fake hook's DNS failures are not server errors (flaky gate)mre
  • 07ab845bvendor: Hybriel set-day50 (run() leak fix #335)mre
  • 71b2fa4blog: hybriel#335mre
  • bd94cc7elog: #25 cause found (run() leak)mre
  • 565cb508log: H25 round 1mre
  • 90a0af84log: H25 startedmre
  • 87bd53b8mission H25mre
  • 71a746cflog: day48 livemre
  • bf568e14log: V48 mergedmre
  • 09955dedMerge v48: Hybriel set-day48, theme layouts ce4a0bamre
  • f2a2b0cevendor: Hybriel set-day48, theme layouts ce4a0bamre
  • 5d0834e7log: Apollo model rulemre
  • fe8e5bd5log: #25 sample, V48 missionmre