gitoria
All repositories: gitoria
6.0 KB
// components/markdown.hl — A MARKDOWN TEXT, RENDERED (as tickets.worldapi.org components/markdown.hl,// for the repo homepage gitoria#8): `Markdown { blocks = … }` with the blocks of markdown.hl's// markdownBlocks. The blocks are plain data; every character of the source is a TEXT node here and a// link's href was checked by markdown.hl safeHref — no HTML string is ever built (no raw HTML, no// scripts, no `javascript:` links). The page owns h1 (the repo name): a README's `#` is an h2, `##`// an h3, deeper an h4. The span markup is written out once per block kind: a View has no macros.blocks = []View {markdownText {for (b of blocks) {if (b.isP) { p {for (s of b.spans) {if (s.isText) { s.text }if (s.isStrong) { strong { s.text } }if (s.isEm) { em { s.text } }if (s.isStrongEm) { strong { em { s.text } } }if (s.isCode) { code { s.text } }if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }}} }if (b.isH1) { h2 {for (s of b.spans) {if (s.isText) { s.text }if (s.isStrong) { strong { s.text } }if (s.isEm) { em { s.text } }if (s.isStrongEm) { strong { em { s.text } } }if (s.isCode) { code { s.text } }if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }}} }if (b.isH2) { h3 {for (s of b.spans) {if (s.isText) { s.text }if (s.isStrong) { strong { s.text } }if (s.isEm) { em { s.text } }if (s.isStrongEm) { strong { em { s.text } } }if (s.isCode) { code { s.text } }if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }}} }if (b.isH3) { h4 {for (s of b.spans) {if (s.isText) { s.text }if (s.isStrong) { strong { s.text } }if (s.isEm) { em { s.text } }if (s.isStrongEm) { strong { em { s.text } } }if (s.isCode) { code { s.text } }if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }}} }if (b.isQuote) { blockquote {for (s of b.spans) {if (s.isText) { s.text }if (s.isStrong) { strong { s.text } }if (s.isEm) { em { s.text } }if (s.isStrongEm) { strong { em { s.text } } }if (s.isCode) { code { s.text } }if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }}} }if (b.isUl) { ul {for (it of b.items) { li {for (s of it.spans) {if (s.isText) { s.text }if (s.isStrong) { strong { s.text } }if (s.isEm) { em { s.text } }if (s.isStrongEm) { strong { em { s.text } } }if (s.isCode) { code { s.text } }if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }}} }} }if (b.isOl) { ol { start = b.startfor (it of b.items) { li {for (s of it.spans) {if (s.isText) { s.text }if (s.isStrong) { strong { s.text } }if (s.isEm) { em { s.text } }if (s.isStrongEm) { strong { em { s.text } } }if (s.isCode) { code { s.text } }if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }}} }} }if (b.isCode) { pre { code { b.code } } }if (b.isHr) { hr { } }if (b.isTable) { tableScroll { table {thead { tr {for (c of b.head) { th {for (s of c.spans) {if (s.isText) { s.text }if (s.isStrong) { strong { s.text } }if (s.isEm) { em { s.text } }if (s.isStrongEm) { strong { em { s.text } } }if (s.isCode) { code { s.text } }if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }}} }} }tbody {for (r of b.rows) { tr {for (c of r) { td {for (s of c.spans) {if (s.isText) { s.text }if (s.isStrong) { strong { s.text } }if (s.isEm) { em { s.text } }if (s.isStrongEm) { strong { em { s.text } } }if (s.isCode) { code { s.text } }if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }}} }} }}} } }}}}Style {markdownText {display = 'block'minWidth = '0''> :first-child' {marginTop = '0'}'> :last-child' {marginBottom = '0'}p {margin = '.5rem 0'overflowWrap = 'anywhere'}li {margin = '.15rem 0'overflowWrap = 'anywhere'}h2 {margin = '1.2rem 0 .5rem'lineHeight = '1.3'color = 'var(--color-text-strong)'fontSize = '1.25rem'}h3 {margin = '1.2rem 0 .5rem'lineHeight = '1.3'color = 'var(--color-text-strong)'fontSize = '1.08rem'}h4 {margin = '1.2rem 0 .5rem'lineHeight = '1.3'color = 'var(--color-text-strong)'fontSize = '1rem'}ul {margin = '.5rem 0'paddingLeft = '1.4rem'listStyleType = 'disc'}ol {margin = '.5rem 0'paddingLeft = '1.4rem'listStyleType = 'decimal'}strong {color = 'var(--color-text-strong)'}a {color = 'var(--color-accent)'textDecoration = 'underline'textUnderlineOffset = '.15em'}code {font = 'max(.875rem, .9em)/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace'padding = '.05em .3em'color = 'var(--color-text-strong)'background = 'var(--color-background-sunken)'borderRadius = 'var(--radius-small)'}pre {margin = '.5rem 0'padding = '.6rem .8rem'overflowX = 'auto'background = 'var(--color-background-sunken)'borderRadius = 'var(--radius-large)'code {padding = '0'background = 'transparent'whiteSpace = 'pre'}}blockquote {margin = '.5rem 0'padding = '.1rem .9rem'color = 'var(--color-text-muted)'borderLeft = '3px solid ' + 'var(--color-surface)' // functional: the bar identifies a quotation.}hr {height = '1px'margin = '1rem 0'border = '0'background = 'var(--color-surface)'}tableScroll {display = 'block'maxWidth = '100%'overflowX = 'auto'margin = '.5rem 0'contain = 'inline-size'}table {width = 'auto'margin = '0'}th {fontSize = '.875rem'}}}
Branches
- f1-broken-json
- f2-api-bugs
- gp-gate-ports
- heap-revert
- hl25-records
- ident-chooser-selector
- mainmain branch
- p51-public-pr-reads
- records-1112
- s25-no-session-on-login-error
- v59
- w52-person-approval
- w52b-approval-followup
- w52c-header-phone
- w53-pulls-speed-pr
- w54-repo-rename-pr
- w55-rename-org
- w56-owner-members
- w62-pr-close
- w63-force-push
- w64-org-slash
Latest commits
- 7bcf7bc2Nest repo navigation media rules and document selector gapsmre
- 46a76272Reference release row styles from the Viewmre
- a383f428Tie README definition and path styles to its own Viewmre
- a90812ffConsolidate add-code styles under its existing View idmre
- 89107a3eDocument the index direct-child selector remaindermre
- 07403362Scope reply form layout through the component form rulemre
- 097c52baStyle the login error through its View idmre
- c6d9c86aOwn the not-found code rule in its componentmre
- 055424c2Record W61 replacement theme gates, sidebar repro and baselinemre
- 2ed09441Use layouts theme 17e0f03 for W61 compatibilitymre
- b8609a91Merge branch 'main' into w61-stylemre
- 4639caf7Report W61 theme startup blocker and day39 Style probemre
- 81f0a0bbREADME: two caches were restored by 90b4f72; log W62mre
- 4a3f557eImport layouts theme ebd00b6 for W61 (startup blocked)mre
- ab12a257Merge W62: #25 commit page measurements and proc repromre
- 41323e49gitoria#25: measure commit request costs and reproduce blocking process waitsmre
- 53ca42b2log: W60 merged, W61 W62 startedmre
- 80870a33mission W61: style passmre
- 560fd208Merge W60: helpers, bound forms, login in topics, two form fixes (gitoria#28 #32 #33)mre
- ac5ba6a4log: W60, #25 measuredmre