|
|
| (2 intermediate revisions by the same user not shown) |
| Line 1: |
Line 1: |
| <!--
| | <includeonly><div |
| Template:Commentary
| | class="bhashyam-block" |
| ═══════════════════════════════════════════════════════════════════
| |
| Renders a commentary block attached to a verse.
| |
| | |
| Parameters:
| |
| verse_id — ID of the parent verse (e.g. BS_C01_S01_V01)
| |
| id — ID of this commentary block (e.g. BS_C01_S01_V01_B1)
| |
| name — Commentary type/name. Controls rendering:
| |
| empty or "Bhashyam" → running prose (no bubble)
| |
| anything else → teeka bubble with bold title
| |
| label — Display title for the teeka bubble header
| |
| (falls back to name if omitted)
| |
| text — The commentary prose content
| |
| | |
| Rendering:
| |
| Bhashyam / primary bhashya → .commentary-body.gr-bhashyam
| |
| Plain flowing text, same font/size as body, no border, no title
| |
| | |
| Teeka / sub-commentary → .commentary-body.gr-teeka
| |
| Mild grey background, bold name as title, then prose below
| |
| Same font/size as body text — no size change
| |
| No expand/collapse — always visible
| |
| | |
| The CSS classes gr-bhashyam and gr-teeka are defined in
| |
| MediaWiki:Common.css and driven by the ReaderToolbar extension's
| |
| applyCommentaryTypes() function which reads data-commentary-name.
| |
| ═══════════════════════════════════════════════════════════════════
| |
| --><includeonly><div
| |
| class="commentary-body{{#if:{{{name|}}}|{{#ifeq:{{lc:{{{name|}}}}}|bhashyam| gr-bhashyam|{{#ifeq:{{lc:{{{name|}}}}}|bhashya| gr-bhashyam| gr-teeka}}}}| gr-bhashyam}}" | |
| data-verse="{{{verse_id|}}}" | | data-verse="{{{verse_id|}}}" |
| data-commentary-id="{{{id|}}}" | | data-commentary-id="{{{id|}}}">{{{text|}}}</div></includeonly><noinclude> |
| data-commentary-name="{{lc:{{{name|}}}}}">{{#if:{{{name|}}}|{{#ifeq:{{lc:{{{name|}}}}}|bhashyam||{{#ifeq:{{lc:{{{name|}}}}}|bhashya||<div class="gr-teeka-title">{{#if:{{{label|}}}|{{{label}}}|{{{name}}}}}</div>}}}}}}}}{{{text|}}}</div></includeonly><noinclude>
| | == Template:Bhashyam == |
| == Template:Commentary == | | Renders a primary bhāṣya commentary block as plain running prose. |
| | | No box, no title, no border — flows as body text with left indent. |
| Renders a commentary block (bhāṣya or ṭīkā) attached to a verse. | |
|
| |
|
| === Parameters === | | === Parameters === |
| Line 41: |
Line 12: |
| ! Parameter !! Required !! Description | | ! Parameter !! Required !! Description |
| |- | | |- |
| | <code>verse_id</code> || Yes || ID of the parent verse, e.g. <code>BS_C01_S01_V01</code> | | | <code>verse_id</code> || Yes || ID of the parent verse, e.g. <code>ISH_C01_V01</code> |
| |- | | |- |
| | <code>id</code> || No || ID of this commentary block | | | <code>id</code> || No || ID of this commentary block |
| |- | | |- |
| | <code>name</code> || No || Type name. Empty or "Bhashyam" = running prose. Any other value = teeka bubble.
| | | <code>text</code> || Yes || The bhāṣya prose content |
| |-
| |
| | <code>label</code> || No || Display label shown as bubble title (defaults to <code>name</code>)
| |
| |-
| |
| | <code>text</code> || Yes || The commentary text content | |
| |} | | |} |
|
| |
|
| === Rendering behaviour ===
| | === Example === |
| * '''Bhashyam''' (name= empty, "bhashyam", or "bhashya") — renders as plain flowing prose, same size and font as the rest of the document. No background, no title, no border.
| |
| * '''Teeka / sub-commentary''' (any other name=) — renders with a mild grey background, the name/label in bold as a title, then the prose below. Same font and size as body text. Always visible — no expand/collapse.
| |
| | |
| === Example: Bhashyam (running text) === | |
| <pre>
| |
| {{Commentary
| |
| | verse_id = BS_C01_S01_V01
| |
| | id = BS_C01_S01_V01_B1
| |
| | name = Bhashyam
| |
| | text = 'अथ' शब्दो मङ्गलार्थोऽधिकारानन्तर्यार्थश्च ।
| |
| }}
| |
| </pre>
| |
| | |
| === Example: Teeka (bubble) ===
| |
| <pre> | | <pre> |
| {{Commentary | | {{Bhashyam |
| | verse_id = BS_C01_S01_V01 | | | verse_id = ISH_C01_V01 |
| | id = BS_C01_S01_V01_T1 | | | id = ISH_C01_V01_B01 |
| | name = NyayaDeepika | | | text = |
| | label = न्यायदीपिका
| | ईशस्यावासयोग्यमीशावास्यम् । जगत्यां प्रकृतौ । |
| | text = धर्मक्षेत्रे इति — धर्मस्य क्षेत्रं धर्मक्षेत्रम् ।
| |
| }} | | }} |
| </pre> | | </pre> |
|
| |
| [[Category:Templates]] | | [[Category:Templates]] |
| </noinclude> | | </noinclude> |
Template:Bhashyam
Renders a primary bhāṣya commentary block as plain running prose.
No box, no title, no border — flows as body text with left indent.
Parameters
| Parameter |
Required |
Description
|
verse_id |
Yes |
ID of the parent verse, e.g. ISH_C01_V01
|
id |
No |
ID of this commentary block
|
text |
Yes |
The bhāṣya prose content
|
Example
{{Bhashyam
| verse_id = ISH_C01_V01
| id = ISH_C01_V01_B01
| text =
ईशस्यावासयोग्यमीशावास्यम् । जगत्यां प्रकृतौ ।
}}