diff options
author | metamuffin <metamuffin@disroot.org> | 2024-10-14 00:24:15 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-10-14 00:24:15 +0200 |
commit | 3951a63d9393ed7e1381bbb9da95dfb2dd2d6b13 (patch) | |
tree | cd586f961075c8d5f8d2ac583dfbc257d82efca5 /book | |
parent | 3b0bb4132eb8d3a0fd3438f4f344e8687a5dd71e (diff) | |
download | hurrycurry-3951a63d9393ed7e1381bbb9da95dfb2dd2d6b13.tar hurrycurry-3951a63d9393ed7e1381bbb9da95dfb2dd2d6b13.tar.bz2 hurrycurry-3951a63d9393ed7e1381bbb9da95dfb2dd2d6b13.tar.zst |
book intermediate representation and packets for sending to client
Diffstat (limited to 'book')
-rw-r--r-- | book/book.js | 4 | ||||
-rw-r--r-- | book/book.typ | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/book/book.js b/book/book.js index 84c0e9dc..094068c0 100644 --- a/book/book.js +++ b/book/book.js @@ -1,5 +1,5 @@ -const tr = t => ({ translated: t }) +const tr = t => ({ translation: { id: t, params: [] } }) const plain = t => ({ text: t }) const par_raw = (s, th, bold) => ({ t: "par", es: [{ @@ -42,7 +42,7 @@ const about = () => ({ par("b.about.name"), { t: "text", s: tr("b.about.image_attrib"), color: "#000000", size: 20, font: "FreeSans" }, { - t: "table", cols: 2, es: [ + t: "table", es: [ [par("b.about.image_attrib.name", false, true), par("b.about.image_attrib.author", false, true)], [par("b.nigiri"), par_raw(plain("Ahtziri Lagarde(unsplash)"))], [par("b.icecream"), par_raw(plain("Markus Spiske(unsplash), adapted"))], diff --git a/book/book.typ b/book/book.typ index 39f3cc46..14e617a0 100644 --- a/book/book.typ +++ b/book/book.typ @@ -21,7 +21,7 @@ } #let tr(s) = translations.at(s, default: text(fill: red)[TRANSLATION: #s]) -#let msgstr(o) = if "translated" in o { tr(o.translated) } else { o.text } +#let msgstr(o) = if "translation" in o { tr(o.translation.id) } else { o.text } #let element(elem) = if elem.t == "document" [ #for e in elem.es [ @@ -50,7 +50,7 @@ ] else if elem.t == "par" [ #par(..elem.es.map(element)) ] else if elem.t == "table" [ - #table(columns: elem.cols, ..elem.es.flatten().map(element)) + #table(columns: elem.es.at(0).len(), ..elem.es.flatten().map(element)) ] else [ #elem ] |