Replace generic "Reading"/"Gospel" headings with real incipits
Deploy / deploy (push) Successful in 1m50s
Deploy / deploy (push) Successful in 1m50s
Bible-plan readings now carry a generated bilingual incipit label (bible-book-incipits.ts) instead of falling through to the UI's generic "Reading" heading. Gospel pericopes (whether from the user's own plan or nocturn-readings.ts's proper content) get the same treatment via a new label field on the 'gospel' ResolvedPart, recovering the book from the reading's own citation when no raw book code is available. Updates 3 matins.test.ts assertions that used "no label" as a stand-in for "this is a bible-plan reading" — no longer true now that these readings carry a real label, so they now key off the label's shape (string = patristic attribution, object = generated incipit) instead. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AGjUyhUZJaSjiniEmnLdak
This commit is contained in:
+3
-2
@@ -49,9 +49,10 @@ function renderCitation(text: ResolvedText, languages: readonly string[]): strin
|
||||
function renderLessonLabel(
|
||||
label: string | Partial<Record<string, string>> | undefined,
|
||||
languages: readonly string[],
|
||||
fallback = 'Reading',
|
||||
): string {
|
||||
if (!label) {
|
||||
return '<h3 class="ordo-part-label">Reading</h3>';
|
||||
return `<h3 class="ordo-part-label">${escapeHtml(fallback)}</h3>`;
|
||||
}
|
||||
if (typeof label === 'string') {
|
||||
return `<h3 class="ordo-part-label">${escapeHtml(label)}</h3>`;
|
||||
@@ -115,7 +116,7 @@ function renderPart(part: ResolvedPart, languages: readonly string[]): string {
|
||||
case 'gospel':
|
||||
return `
|
||||
<section class="ordo-part ordo-part-lesson ordo-part-gospel">
|
||||
<h3 class="ordo-part-label">Gospel</h3>
|
||||
${renderLessonLabel(part.label, languages, 'Gospel')}
|
||||
${renderCitation(part.text, languages)}
|
||||
${renderColumns(part.text, languages)}
|
||||
${part.source ? `<p class="ordo-part-citation">${escapeHtml(part.source)}</p>` : ''}
|
||||
|
||||
Reference in New Issue
Block a user