Jump to content

Template:Prasna: Difference between revisions

From Grantha
No edit summary
No edit summary
Line 14: Line 14:
<!--
<!--
   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}}}" style="margin:1.2em 0; font-family:'Adishila',serif;">
  class="prasna-block mw-collapsible mw-collapsed"
  id="{{{chapter_id}}}_PR{{{prasna_num}}}"
  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 -->
  <!-- Label row -->
    <span class="prasna-title" style="
  <p style="font-size:13px; letter-spacing:0.1em; text-transform:uppercase; color:#aaa; margin:0 0 0.3em; font-family:monospace;">
      font-size:1em;
    ❓ Praśna &nbsp;·&nbsp; [[#{{{chapter_id}}}_PR{{{prasna_num}}}|{{{chapter_id}}}_PR{{{prasna_num}}}]]{{#if:{{{source_verse|}}}|&nbsp;·&nbsp; [[#{{{source_verse}}}|↗ {{{source_verse}}}]]}}{{#if:{{{questioner|}}}|&nbsp;·&nbsp; <span style="font-style:italic;color:#9e4a2e;">{{{questioner}}}</span>}}
      color:#3a1008;
  </p>
      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|}}}|
  <!-- Title -->
    <span style="font-size:0.7em;color:#9e4a2e;font-style:italic;opacity:0.85;white-space:nowrap;">
  <h4 style="font-size:24px; font-weight:bold; color:#3a1008; margin:0 0 0.2em; font-family:'Adishila',serif;">
      — {{{questioner}}}
     {{{title}}}{{#if:{{{title_trans|}}}|<span style="font-size:18px; font-weight:normal; font-style:italic; color:#9e4a2e; margin-left:0.5em;">{{{title_trans}}}</span>}}
    </span>
  </h4>
    }}


    {{#if:{{{source_verse|}}}|
  <!-- Question -->
    <a href="#{{{source_verse}}}"
  <div style="font-size:28px; line-height:1.95; color:#3a1008; padding-left:2.5em; direction:auto; unicode-bidi:plaintext; font-family:'Adishila',serif; border-left:3px solid #9e4a2e; margin-bottom:0.8em;">
      title="Jump to source verse {{{source_verse}}}"
     {{{question}}}
      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>


   <!-- Collapsible body -->
   <!-- Answer (optional) -->
   <div class="mw-collapsible-content prasna-body" style="
   {{#if:{{{answer|}}}|
    background:#fdf6f3;
  <div style="font-size:28px; line-height:1.95; color:#2a1f0a; padding-left:2.5em; direction:auto; unicode-bidi:plaintext; font-family:'Adishila',serif; border-left:3px solid #c97a5a;">
    border:1px solid #deb0a0;
    {{{answer}}}
    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>
  }}


</div>
</div>
Line 169: Line 51:
| has_answer  = {{#if:{{{answer|}}}|yes|no}}
| has_answer  = {{#if:{{{answer|}}}|yes|no}}
| source_verse = {{{source_verse|}}}
| source_verse = {{{source_verse|}}}
}}<!--store only-->
}}

Revision as of 06:58, 16 March 2026

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

❓ Praśna  ·  [[#{{{chapter_id}}}_PR{{{prasna_num}}}|{{{chapter_id}}}_PR{{{prasna_num}}}]]

{{{title}}}

   {{{question}}}