|
6 | 6 |
|
7 | 7 | const APP_ROOT = '/app/liturgical-calendar/' |
8 | 8 |
|
9 | | -const WASM_URL = `${APP_ROOT}liturgical_calendar_wasm.wasm?v=12` |
10 | | -const KALD_URL = `${APP_ROOT}romanus_universale.kald?v=12` |
11 | | -const LITS_URL = `${APP_ROOT}romanus_universale_la.lits?v=12` |
| 9 | +const WASM_URL = `${APP_ROOT}liturgical_calendar_wasm.wasm?v=15` |
| 10 | +const KALD_URL = `${APP_ROOT}romanus_universale.kald?v=15` |
| 11 | +const LITS_URL = `${APP_ROOT}romanus_universale_la.lits?v=15` |
12 | 12 |
|
13 | 13 | const KAL_ENGINE_OK = 0 |
14 | 14 | const KAL_ERR_BUILD_ID_MISMATCH = -22 |
@@ -265,45 +265,51 @@ function renderDay(year, month, day, exports, memory) { |
265 | 265 | const label = res ? res.label : `Fête inconnue (0x${feastId.toString(16).toUpperCase()})` |
266 | 266 | const annotation = res ? res.annotation : null |
267 | 267 |
|
268 | | - html = `<div class="column-fix gap">` |
269 | | - html += `<article class="card feast primary color-${COLOR_CSS[color] ?? ''}" style="text-align: left;"> |
270 | | - <h2>${label}</h2>` |
271 | | - if (annotation) html += `<p class="annotation">${renderMarkdown(annotation)}</p>` |
272 | | - html += `<ul> |
273 | | - <li>Feast ID: 0x${feastId.toString(16).toUpperCase().padStart(4, '0')}</li> |
274 | | - <li>Précédence: ${PRECEDENCE[precedence] ?? precedence} (${precedence + 1})</li> |
275 | | - <li>Couleur: ${COLOR[color] ?? color}</li> |
276 | | - <li>Période: ${PERIOD[period] ?? period}</li> |
277 | | - <li>Nature: ${NATURE[nature] ?? nature}</li>` |
278 | | - if (hasVigil) html += `<li>Vigile propre: oui (invariant)</li>` |
279 | | - if (hasVesperaeI) html += `<li>Vêpres I: ce soir</li>` |
280 | | - if (hasVigilia) html += `<li>Vigile: ce soir</li>` |
281 | | - html += `</ul></article>` |
| 268 | + html += `<div class="grid3 gap">` |
| 269 | + html += `<table class="table liturgical-calendar">` |
| 270 | + html += `<caption class="h4 color-${COLOR_CSS[color] ?? ''}">` |
| 271 | + html += `${label}` |
| 272 | + if (annotation) html += `. ${renderMarkdown(annotation)}` |
| 273 | + html += `</caption>` |
| 274 | + html += `<tbody>` |
| 275 | + html += `<tr><td>Feast ID</td><td>0x${feastId.toString(16).toUpperCase().padStart(4, '0')}</td></tr> |
| 276 | + <tr><td>Précédence</td><td>${PRECEDENCE[precedence] ?? precedence} (${precedence + 1})</td></tr> |
| 277 | + <tr><td>Nature</td><td>${NATURE[nature] ?? nature}</td></tr> |
| 278 | + <tr><td>Couleur</td><td>${COLOR[color] ?? color}</td></tr>` |
| 279 | + if (hasVigil) html += `<tr><td>Vigile propre</td><td>oui (invariant)</td></tr>` |
| 280 | + if (hasVesperaeI) html += `<tr><td>Vêpres I</td><td>ce soir</td></tr>` |
| 281 | + if (hasVigilia) html += `<tr><td>Vigile</td><td>ce soir</td></tr>` |
| 282 | + html += `<tr><td>Période</td><td>${PERIOD[period] ?? period}</td></tr>` |
| 283 | + html += `</tbody>` |
| 284 | + html += `</table>` |
| 285 | + html += `</div>` |
282 | 286 |
|
283 | 287 | if (secCount > 0 && exports.kal_wasm_read_secondary(secOffset, secCount) === KAL_ENGINE_OK) { |
284 | 288 | const sv = new DataView(memory.buffer, exports.kal_wasm_secondary_ptr(), secCount * 2) |
285 | | - html += `</div>` |
286 | 289 | html += `<hr>` |
287 | | - html += `<h2>Fêtes secondaires du jour :</h2>` |
288 | | - html += `<div class="column-fix gap gap-top">` |
| 290 | + html += `<h2 class="h3">Fêtes secondaires du jour :</h2>` |
| 291 | + html += `<div class="grid3 gap">` |
289 | 292 | for (let i = 0; i < secCount; i++) { |
290 | 293 | const ridx = sv.getUint16(i * 2, true) |
291 | 294 | if (ridx === 0) continue |
292 | 295 | const resSec = resolveSecondary(exports, memory, ridx, year) |
293 | 296 | if (!resSec) continue |
294 | 297 | const sf = decodeFeastFlags(resSec.feastFlags) |
295 | | - html += `<article class="card secondaries feast secondary color-${COLOR_CSS[sf.color] ?? ''}" style="text-align: left;"> |
296 | | - <h2>${resSec.label}</h2>` |
297 | | - if (resSec.annotation) html += `<p class="annotation">${renderMarkdown(resSec.annotation)}</p>` |
298 | | - html += `<ul> |
299 | | - <li>Feast ID: 0x${ridx.toString(16).toUpperCase().padStart(4, '0')}</li> |
300 | | - <li>Précédence: ${PRECEDENCE[sf.precedence] ?? sf.precedence} (${sf.precedence + 1})</li> |
301 | | - <li>Couleur: ${COLOR[sf.color] ?? sf.color}</li> |
302 | | - <li>Nature: ${NATURE[sf.nature] ?? sf.nature}</li> |
303 | | - </ul></article>` |
| 298 | + html += `<table class="table liturgical-calendar">` |
| 299 | + html += `<caption class="h4 color-${COLOR_CSS[sf.color] ?? ''}">` |
| 300 | + html += `${resSec.label}` |
| 301 | + if (resSec.annotation) html += `. ${renderMarkdown(resSec.annotation)}` |
| 302 | + html += `</caption>` |
| 303 | + html += `<tbody>` |
| 304 | + html += `<tr><td>Feast ID</td><td>0x${ridx.toString(16).toUpperCase().padStart(4, '0')}</td></tr>` |
| 305 | + html += `<tr><td>Précédence</td><td>${PRECEDENCE[sf.precedence] ?? sf.precedence} (${sf.precedence + 1})</td></tr>` |
| 306 | + html += `<tr><td>Nature</td><td>${NATURE[sf.nature] ?? sf.nature}</td></tr>` |
| 307 | + html += `<tr><td>Couleur</td><td>${COLOR[sf.color] ?? sf.color}</td></tr>` |
| 308 | + html += `</tbody>` |
| 309 | + html += `</table>` |
304 | 310 | } |
| 311 | + html += `</div>` |
305 | 312 | } |
306 | | - html += `</div>` |
307 | 313 | } else { |
308 | 314 | html = |
309 | 315 | '<div class="message-highlight"><svg class="icon" role="img" focusable="false"><use href="/sprites/util.svg#pencil"></use></svg><div><p>Pas de célébration répertoriée pour cette date.</p></div></div>' |
|
0 commit comments