Explorer

html-ui.module-summary

description
(en) The description and visibility line of the module page
type
Fn(language: String, response: @html-ui.response) -> @html.node
expression
fn(language$990, response$0) =>
  let description$1 = @html-ui.localized-text-in(
      texts: @definy.mcp-read-descriptions(value: @definy.json-get(value: $0.json, key: "descriptions")),
      language: $990,
      fallback: true
    );
  @html.element(
    name: "p",
    attributes: [{name: "class", value: "muted"}],
    children: [
      @html.text(
        text: @core.string-join(
          items: [
            match @core.equal(left: $1, right: "") {
              true =>
                @html-ui.text(language: $990, en: "No description", ja: "説明なし", eo: "Sen priskribo"),
              false =>
                $1
            },
            " · ",
            match @core.equal(left: @html-ui.json-text(value: $0.json, key: "visibility"), right: "private") {
              true =>
                @html-ui.text(language: $990, en: "Private", ja: "非公開", eo: "Privata"),
              false =>
                @html-ui.text(language: $990, en: "Public", ja: "公開", eo: "Publika")
            }
          ],
          separator: ""
        )
      )
    ]
  )
visibility
public
html-ui.module-summary (project html-ui, branch deploy-button, snapshot -OAeJ1OMDC9c1IdYFQHD-zp08inW6onoKyXsh0BwFf4)
id: qSTVOJhg9JxD26L_0aex_-w_1hurBVthyYBWm1hQx04
content hash: tWjrlbI3gAwmdpDB46RBesjf1usFzltMTXJC2LmB1fo