Explorer

html-ui.docs-document-page

description
The page /docs/<name>: the document docs.<name> rendered with markdown.to-html
type
Fn(language: String, name: String, part_id: String, text: String) -> @definy.service-io
expression
fn(language$0, name$1, part_id$2, text$3) =>
  @html-ui.page(
    language: $0,
    title: @html-ui.docs-title(text: $3, name: $1),
    body: [
      @html.element(name: "style", attributes: [], children: [@html.text(text: @html-ui.docs-style)]),
      @html.element(
        name: "p",
        attributes: [],
        children: [
          @html.element(
            name: "a",
            attributes: [{name: "href", value: "/docs"}],
            children: [
              @html.text(text: @html-ui.text(language: $0, en: "Docs", ja: "ドキュメント", eo: "Dokumentoj"))
            ]
          ),
          @html.text(text: " / "),
          @html.element(
            name: "a",
            attributes: [{name: "href", value: @core.string-concat(left: "/part/", right: $2)}],
            children: [@html.text(text: @core.string-concat(left: "docs.", right: $1))]
          )
        ]
      ),
      @html.element(
        name: "article",
        attributes: [{name: "class", value: "doc"}],
        children: @markdown.to-html(text: $3, doc_prefix: "/docs/")
      )
    ]
  )
visibility
public
html-ui.docs-document-page (project html-ui, branch main, snapshot Daaw3vbJhY15cDW6JsA4JuXvffjj_qFyxoZQMUM8hvQ)
id: bDqLn5A0EGs6qVfqJWuVixl1mupVuhnxtB8sVK0NY6w
content hash: jhuFTyiWtCOD07lLYcmZ7j76v8dAt4om-7ezoPrx5dk