fix: bg reference purport update

This commit is contained in:
gosangam
2026-06-23 15:13:27 +05:30
parent 7b81bbc791
commit 9916810d18
2 changed files with 24 additions and 3 deletions
+11 -3
View File
@@ -219,9 +219,17 @@ function VerseCard({
Purport
</h3>
<div className="text-base text-foreground leading-relaxed space-y-3">
{verse.purport.map((p, i) => (
<p key={i} dangerouslySetInnerHTML={{ __html: p }} />
))}
{verse.purport.map((p, i) =>
// Cited ślokas come wrapped in <blockquote class="shloka"> — a
// block element that can't live inside a <p>, so render those
// in a <div> (styled centered + accent via globals.css); plain
// prose paragraphs stay as <p>.
/^\s*<blockquote/i.test(p) ? (
<div key={i} dangerouslySetInnerHTML={{ __html: p }} />
) : (
<p key={i} dangerouslySetInnerHTML={{ __html: p }} />
),
)}
</div>
</div>
)}
+13
View File
@@ -452,3 +452,16 @@
.reading-justified main {
text-align: justify;
}
/* Cited Sanskrit ślokas quoted inside a purport (wrapped by the extractor as
<blockquote class="shloka">). Set them apart from the running commentary —
centered, italic, in the primary (peacock) accent — so it reads at a glance
as a verse quoted from another reference rather than as prose. Placed last so
the centering wins over .reading-justified. */
blockquote.shloka {
margin: 0.75rem 0;
text-align: center;
font-style: italic;
color: var(--primary);
line-height: 1.7;
}