summaryrefslogtreecommitdiff
path: root/book/book.js
diff options
context:
space:
mode:
Diffstat (limited to 'book/book.js')
-rw-r--r--book/book.js27
1 files changed, 14 insertions, 13 deletions
diff --git a/book/book.js b/book/book.js
index 094068c0..00c83426 100644
--- a/book/book.js
+++ b/book/book.js
@@ -40,17 +40,20 @@ const about = () => ({
t: "page", es: [
{ t: "text", s: tr("b.about"), color: "#000000", size: 30, font: "FreeSans" },
par("b.about.name"),
- { t: "text", s: tr("b.about.image_attrib"), color: "#000000", size: 20, font: "FreeSans" },
+ { t: "conditional", cond: "image_attribution", value: true, e: { t: "text", s: tr("b.about.image_attrib"), color: "#000000", size: 20, font: "FreeSans" } },
{
- 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"))],
- [par("b.curry"), par_raw(plain("Andy Hay(unsplash), adapted"))],
- [par("b.mochi"), par_raw(plain("blackieshoot(unsplash)"))],
- [par("b.burger"), par_raw(plain("Pablo Merchán Montes(unsplash), adapted"))],
- [par("b.tomato_soup"), par_raw(plain("Julia Kicova(unsplash), adapted"))],
- ]
+ t: "conditional", cond: "image_attribution", value: true, e:
+ {
+ 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"))],
+ [par("b.curry"), par_raw(plain("Andy Hay (unsplash), adapted"))],
+ [par("b.mochi"), par_raw(plain("blackieshoot (unsplash)"))],
+ [par("b.burger"), par_raw(plain("Pablo Merchán Montes (unsplash), adapted"))],
+ [par("b.tomato_soup"), par_raw(plain("Julia Kicova (unsplash), adapted"))],
+ ]
+ }
}
]
})
@@ -58,9 +61,7 @@ const recipe = (n, i, th = false, extra = []) => ({
t: "page", background: n, es: [
h2(`b.${n}`, th),
par(`b.${n}.desc`, th),
- {
- t: "list", es: i.map(e => emph(`b.ingred.${e}`, th))
- },
+ { t: "list", es: i.map(e => emph(`b.ingred.${e}`, th)) },
par(`b.${n}.steps`, th),
...extra
]