Jump to content

Template:Prasna: Difference between revisions

From Grantha
Created page with "<!-- Template:Prasna ═══════════════ Renders a collapsible Praśna (question / pūrvapakṣa) block. Visually distinct — uses a terracotta/rust accent to signal inquiry. Parameters: document_id – e.g. NNS (required) chapter_id – e.g. NNS_C01 (required) prasna_num – e.g. 01 (required, zero-padded within chapter) title – Short title of the question (required..."
 
No edit summary
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
<noinclude>
{{#cargo_declare: _table=Prasna
| document_id  = String
| chapter_id  = String
| prasna_id    = String
| prasna_num  = String
| title        = String
| title_trans  = String
| questioner  = String
| has_answer  = Boolean
| source_verse = String
}}
</noinclude>
<!--
<!--
   Template:Prasna
   Template:Prasna
  ═══════════════
  Renders a collapsible Praśna (question / pūrvapakṣa) block.
  Visually distinct — uses a terracotta/rust accent to signal inquiry.
  Parameters:
    document_id  – e.g. NNS            (required)
    chapter_id    – e.g. NNS_C01        (required)
    prasna_num    – e.g. 01              (required, zero-padded within chapter)
    title        – Short title of the question  (required)
    title_trans  – IAST transliteration          (optional)
    question      – The question / objection as stated (required)
    answer        – The answer / siddhānta        (optional)
    source_verse  – verse_id this Praśna is tied to (optional)
    questioner    – Who raises this question (e.g. पूर्वपक्षी) (optional)
  Auto-ID format: {chapter_id}_PR{prasna_num}
  Example:        NNS_C01_PR01
  Usage:
    {{Prasna
    | document_id  = NNS
    | chapter_id  = NNS_C01
    | prasna_num  = 01
    | title        = नखप्रकाशः किम्?
    | title_trans  = Nakha-prakāśaḥ kim?
    | questioner  = पूर्वपक्षी
    | question    = कथं नखा एव प्रकाशन्ते?
    | answer      = श्रीमन्नारायणस्य नखाः स्वयंज्योतिषः सन्ति...
    | source_verse = NNS_C01_V01
    }}
-->
-->
<div
<div class="prasna-block" id="{{{chapter_id}}}_PR{{{prasna_num}}}">
  class="prasna-block mw-collapsible mw-collapsed"
   <div class="prasna-title">
  id="{{{chapter_id}}}_PR{{{prasna_num}}}"
     {{{title}}}{{#if:{{{title_trans|}}}|<span>{{{title_trans}}}</span>}}
  style="margin:1.2em 0;font-family:'Adishila',serif;">
 
  <!-- Header -->
   <div
    class="mw-collapsible-toggle prasna-header"
    style="
      display:flex;
      align-items:center;
      gap:8px;
      background:#f5ece8;
      border-left:4px solid #9e4a2e;
      padding:7px 12px;
      cursor:pointer;
      font-weight:bold;
      font-family:'Adishila',serif;">
 
    <!-- Type badge -->
     <span class="prasna-badge" style="
      font-size:0.72em;
      font-weight:bold;
      color:#fff;
      background:#9e4a2e;
      padding:2px 8px;
      border-radius:3px;
      letter-spacing:0.04em;
      white-space:nowrap;">
      ❓ Praśna
    </span>
 
    <!-- Auto-ID chip -->
    <span class="prasna-id" style="
      font-size:0.7em;
      color:#9e4a2e;
      background:#f5ddd6;
      border:1px solid #deb0a0;
      padding:1px 7px;
      border-radius:10px;
      font-family:monospace;
      white-space:nowrap;">
      {{{chapter_id}}}_PR{{{prasna_num}}}
    </span>
 
    <!-- Title -->
    <span class="prasna-title" style="
      font-size:1em;
      color:#3a1008;
      flex:1;">
      {{{title}}}{{#if:{{{title_trans|}}}|
      <span style="font-size:0.82em;font-weight:normal;color:#8a5040;font-style:italic;margin-left:6px;">{{{title_trans}}}</span>
      }}
    </span>
 
    {{#if:{{{questioner|}}}|
    <span style="font-size:0.7em;color:#9e4a2e;font-style:italic;opacity:0.85;white-space:nowrap;">
      — {{{questioner}}}
    </span>
    }}
 
    {{#if:{{{source_verse|}}}|
    <a href="#{{{source_verse}}}"
      title="Jump to source verse {{{source_verse}}}"
      style="font-size:0.7em;color:#9e4a2e;text-decoration:none;opacity:0.8;white-space:nowrap;">
      ↗ {{{source_verse}}}
    </a>
    }}
 
    <!-- Permalink -->
    <a href="#{{{chapter_id}}}_PR{{{prasna_num}}}"
      title="Link to this Praśna"
      style="font-size:0.7em;color:#9e4a2e;text-decoration:none;opacity:0.6;">
      ¶
    </a>
   </div>
   </div>
 
   <div class="prasna-question">
  <!-- Collapsible body -->
     {{{question}}}
   <div class="mw-collapsible-content prasna-body" style="
    background:#fdf6f3;
    border:1px solid #deb0a0;
    border-top:none;
    font-family:'Adishila',serif;
    font-size:1em;
    line-height:1.9;
    color:#3a1008;">
 
    <!-- Question / objection -->
     <div class="prasna-question" style="
      padding:10px 14px 8px;
      border-bottom:{{#if:{{{answer|}}}|1px dashed #deb0a0|none}};">
      <span style="font-size:0.72em;font-weight:bold;color:#9e4a2e;display:block;margin-bottom:4px;text-transform:uppercase;letter-spacing:0.06em;">
        {{#if:{{{questioner|}}}|{{{questioner}}} asks|Question}}
      </span>
      <div style="direction:auto;unicode-bidi:plaintext;">{{{question}}}</div>
    </div>
 
    {{#if:{{{answer|}}}|
    <!-- Answer / siddhānta -->
    <div class="prasna-answer" style="
      padding:10px 14px;
      background:#fff9f7;
      border-left:3px solid #c97a5a;">
      <span style="font-size:0.72em;font-weight:bold;color:#9e4a2e;display:block;margin-bottom:4px;text-transform:uppercase;letter-spacing:0.06em;">
        Answer
      </span>
      <div style="direction:auto;unicode-bidi:plaintext;">{{{answer}}}</div>
    </div>
    }}
 
   </div>
   </div>
 
  {{#if:{{{answer|}}}|
  <div class="prasna-answer">
    {{{answer}}}
  </div>
  }}
</div>
</div>
<!-- Cargo store -->
<!-- Cargo store -->
Line 156: Line 39:
| has_answer  = {{#if:{{{answer|}}}|yes|no}}
| has_answer  = {{#if:{{{answer|}}}|yes|no}}
| source_verse = {{{source_verse|}}}
| source_verse = {{{source_verse|}}}
}}<!--store only-->
}}

Latest revision as of 17:59, 20 March 2026

This template defines the table "Prasna". View table. A replacement table has been generated for this table; View replacement table.

   {{{title}}}
   {{{question}}}