gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit6dc08a8e6dc08a8eMerge branch 'p51-public-pr-reads' into mainGitoria6dc08a8e/components/index.hl

1.4 KB

  1. // components/index.hl — `/` ON EVERY ADDRESS (ticket #6, gitoria#16). The request's host decides, on the SERVER
  2. // (`host = null`, hybriel#74): the main address (gitoria.worldapi.org) shows the repo list (list.hl), a repo
  3. // address (<slug>.gitoria.worldapi.org) shows that repo's Readme view (readme.hl) — or "No such repository".
  4. parent './repo.hl'
  5. import { siteName } from '../project.hl'
  6. import RepoList from './list.hl'
  7. import OrgList from './orglist.hl'
  8. import Readme from './readme.hl'
  9. import { titleSlug } from '../lib/repos.hl'
  10. import { pageTitle } from '../lib/repos-helpers.hl'
  11. import { slugOfRequest } from '../lib/orgs.hl'
  12. import { slugOfHost } from '../lib/util.hl'
  13. import { orgFor } from '../lib/repos.hl'
  14. import { userIdOfSession } from '../lib/users.hl'
  15. host = null
  16. orepo = ''
  17. session = null
  18. // the main address: the repo list · an organization's address (a name that is one the viewer may see): its repos · else a repo's page (or "No such repository")
  19. onMain = slugOfHost(host) == '' && orepo == ''
  20. onOrg = slugOfHost(host) != '' && orepo == '' && orgFor(slugOfHost(host), userIdOfSession(session)) != null
  21. onRepo = !onMain && !onOrg
  22. __title = pageTitle(siteName, titleSlug(host, orepo, session), '')
  23. View {
  24. repoHome {
  25. if (onMain) { RepoList { } }
  26. if (onOrg) { OrgList { } }
  27. if (onRepo) { Readme { orepo = orepo } }
  28. }
  29. }
  30. Style {
  31. repoHome {
  32. display = 'grid'
  33. gap = '1rem'
  34. minWidth = '0'
  35. // Direct-child universal selectors have no bare language form.
  36. '> *' {
  37. margin = '0'
  38. }
  39. }
  40. }

Branches

Latest commits

  • 6dc08a8eMerge branch 'p51-public-pr-reads' into mainGitoria
  • 7b88cfe0Type publicReaderOfRequest parameters (L10)Gitoria
  • 2a4b3dc1|||PR Anonymous reads of public repos' pulls and statusesmre
  • 21b2c141Merge branch 's25-no-session-on-login-error' into mainGitoria
  • 698458e2|||PR No session for cookieless login errors: READMEmre
  • cce7b785|||PR No session for cookieless login errorsmre
  • 678d6303Merge branch 'v59' into mainGitoria
  • 5803cf4f|||PR vendor: Hybriel set-day59 and GC budget 32 MiBmre
  • 9eff6627Merge branch 'f2-api-bugs' into mainGitoria
  • 26117255|||PR apps API: review comments on files with spaces in their namemre
  • b8796cecMerge branch 'f1-broken-json' into mainGitoria
  • 2f2959c5|||PR apps API: broken JSON body gives 400 invalid_json, not 500mre
  • f7c6ca07Merge branch 'ident-chooser-selector' into mainGitoria
  • 691abb8e|||PR tests: find ident identity choice without the removed .choose classmre
  • 16a3530fMerge branch 'heap-revert' into mainGitoria
  • 220a80e0|||PR Remove temporary /__heap route and heap helper; logmre
  • 13f0c342Merge branch 'hl25-records' into mainGitoria
  • a002ecb7|||PR records: HL25 report, heap helper, logmre
  • 2492a55cTemporary keyed /__heap route for the live memory snapshotmre
  • fefaedd2log: tracker PR-only, HL25 startedmre