|
|
| (8 intermediate revisions by 2 users not shown) |
| Line 1: |
Line 1: |
| <noinclude> | | <noinclude>{{#cargo_declare: _table=Adhyaya |
| {{#cargo_declare: _table=Adhyaya | |
| | document_id = String | | | document_id = String |
| | chapter_id = String | | | chapter_id = String |
| | chapter_num = String | | | chapter_num = String |
| | | section_num = String |
| | title = String | | | title = String |
| | title_trans = String
| | }}</noinclude>{{#cargo_store: _table=Adhyaya |
| | has_intro = Boolean
| |
| }} | |
| </noinclude><!-- | |
| Template:Adhyaya
| |
| ════════════════
| |
| Renders a chapter heading with optional intro text.
| |
| Parameters:
| |
| document_id – e.g. NNS (required)
| |
| chapter_num – e.g. 01 (required, zero-padded)
| |
| title – Sanskrit/display title (required)
| |
| title_trans – IAST transliteration (optional)
| |
| intro – Introductory prose (optional)
| |
| Auto-ID format: {document_id}_C{chapter_num}
| |
| -->
| |
| <div class="adhyaya-block" id="{{{document_id}}}_C{{{chapter_num}}}" style="margin:3em 0 2em; font-family:'Adishila',serif; text-align:center;">
| |
| | |
| <p style="font-size:14px; letter-spacing:0.12em; text-transform:uppercase; color:#888; margin:0 0 0.4em;">
| |
| Chapter {{{chapter_num}}}
| |
| <span style="margin-left:1.2em; font-size:12px; font-family:monospace; color:#bbb; text-transform:none; letter-spacing:0;">[[#{{{document_id}}}_C{{{chapter_num}}}|{{{document_id}}}_C{{{chapter_num}}}]]</span>
| |
| </p>
| |
| | |
| <h2 style="font-size:32px; font-weight:bold; color:#1a1208; margin:0; line-height:1.3; font-family:'Adishila',serif;">
| |
| {{{title}}}
| |
| </h2>
| |
| | |
| {{#if:{{{title_trans|}}}|
| |
| <p style="font-size:20px; font-style:italic; color:#5a4a28; margin:0.3em 0 0; font-family:'Adishila',serif;">
| |
| {{{title_trans}}}
| |
| </p>
| |
| }}
| |
| | |
| {{#if:{{{intro|}}}|
| |
| <div style="margin:1.6em auto 0; max-width:720px; text-align:left; font-size:18px; line-height:1.9; color:#2a1f0a; font-family:'Adishila',serif; padding-left:2em; border-left:2px solid #c9a84c;">
| |
| {{{intro}}}
| |
| </div>
| |
| }}
| |
| | |
| </div>
| |
| {{#cargo_store: _table=Adhyaya | |
| | document_id = {{{document_id|}}} | | | document_id = {{{document_id|}}} |
| | chapter_id = {{{document_id}}}_C{{{chapter_num}}} | | | chapter_id = {{{document_id}}}_C{{{chapter_num|}}} |
| | chapter_num = {{{chapter_num|}}} | | | chapter_num = {{{chapter_num|}}} |
| | | section_num = {{{section_num|}}} |
| | title = {{{title|}}} | | | title = {{{title|}}} |
| | title_trans = {{{title_trans|}}}
| | }}<noinclude> |
| | has_intro = {{#if:{{{intro|}}}|yes|no}}
| | == Template:Adhyaya == |
| }}
| | Stores chapter metadata in Cargo only. The visible heading comes from |
| | == wiki markup == in the page wikitext, which MW's TOC picks up natively. |
| | [[Category:Templates]] |
| | [[Category:Cargo store templates]] |
| | </noinclude> |