From 24de019a3e1d5b9a6d4601bdd65489813baa7e58 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Wed, 19 Aug 2026 09:59:47 +0200 Subject: feat(templates): wall calendar grid in LaTeX, groff and HTML Three flavours, not six: a month grid in Markdown or plain text is a worse artefact than the booklet already is, and shipping a template we would not use ourselves is maintenance with no reader. These are the first templates to use weeks and in_month, so this is where the view model earns its keep -- the booklet and the grid come from one model with no second code path. Every cell carries a per-cell 'last' boolean (already in the view). A table row needs a separator BETWEEN cells and the engine deliberately has no 'unless last' construct; the rule is shape the data, not the template. Without it the LaTeX grid emits eight columns for seven cells and pdflatex rejects the file. Day cells resolve their label as {{#name}}{{la}}{{^la}}{{slug}}{{/la}} {{/name}}, never a bare {{name.la}}: the enclosing month object has its own name.la, and the engine's scope lookup falls back outward, so a bare dotted lookup would render the month's own Latin name on every day lacking one -- a wall calendar where every day reads "January". Verified on the goldens: Ianuarius appears exactly once per file, the month heading, never as a day label. --- templates/ef/grid.html | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 templates/ef/grid.html (limited to 'templates/ef/grid.html') diff --git a/templates/ef/grid.html b/templates/ef/grid.html new file mode 100644 index 0000000..b92e14a --- /dev/null +++ b/templates/ef/grid.html @@ -0,0 +1,35 @@ + + + + +Calendarium {{year}} + +

Calendarium {{year}} · {{rite}}

+{{#months}} + + + + {{#weeks}} + {{#days}}{{#in_month}}{{/in_month}}{{^in_month}}{{/in_month}}{{/days}} + + {{/weeks}} +
{{name.la}}
DomLunMarMerIovVenSab
{{dom}}{{#name}}{{la}}{{^la}}{{slug}}{{/la}}{{/name}}
+{{/months}} + -- cgit v1.3