gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit7e8aabea7e8aabeareport: W51b pull source verificationmre7e8aabea/components/readme.hl

2.6 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" class = "notice" "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 { class = "path" 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. dl {
  55. display = 'grid'
  56. gridTemplateColumns = 'auto minmax(0, 1fr)'
  57. gap = '.3rem 1rem'
  58. alignItems = 'center'
  59. margin = '0'
  60. }
  61. dt {
  62. color = 'var(--color-text-muted)'
  63. }
  64. dd {
  65. margin = '0'
  66. overflowWrap = 'anywhere'
  67. '> a' {
  68. display = 'inline-flex'
  69. alignItems = 'center'
  70. minHeight = '2.75rem'
  71. }
  72. }
  73. homepageFile {
  74. display = 'grid'
  75. gap = '.5rem'
  76. minWidth = '0'
  77. '> *' {
  78. margin = '0'
  79. }
  80. '> .path' {
  81. color = 'var(--color-text-muted)'
  82. fontSize = '.875rem'
  83. background = 'transparent'
  84. padding = '0'
  85. }
  86. }
  87. repoHomepage {
  88. display = 'grid'
  89. gap = '1.5rem'
  90. minWidth = '0'
  91. }
  92. }

Branches

Latest commits

  • 7e8aabeareport: W51b pull source verificationmre
  • 6c18de76fix: preserve pull sources across containing branchesmre
  • fc36fa2elog: W51b pull source bugmre
  • 56bc1220log: v1.5.1 livemre
  • 845fc0aareport: W51mre
  • 83127391fix: return v1.5.1 app and merge error detailsmre
  • b07d0e97log: W51 v1.5.1 startedmre
  • 0b417d06docs: apps-api v1.5 user tokens (#48, W49)mre
  • d046940alog: vinzenz contract note sentmre
  • db443456log: vinzenz note retry 2mre
  • 802f229alog: kunibert repo ping provenmre
  • 2d2eaa92log: Kunibert connected to kunibert repomre
  • 65d5f80alogmre
  • dab74b0dW49 report, logmre
  • fd4fc028Exercise member status reads with a populated check statemre
  • 536ca6f9Allow repository members to read pull workflow APIs with user tokensmre
  • 705dd834W49 missionmre
  • b554cd5flogmre
  • f4c9440ddeploy.sh: tar --hard-dereference for the live data backupmre
  • 1a687b15Merge branch 'w48-member-merge'mre