Difference between revisions of "Template:ContentTemplateModernInline"

From Holdfast: Nations At War
Jump to navigation Jump to search
Line 11: Line 11:
 
|}}<nowiki/><!--trim-->
 
|}}<nowiki/><!--trim-->
  
<!-- Quick summary box -->
+
<!-- Quick summary box (render only if content is real, not empty/quotes/spaces) -->
 
{{#ifeq:{{{show_summary|no}}}|yes|
 
{{#ifeq:{{{show_summary|no}}}|yes|
<div style="margin:.75rem 0 0 0;border:1px solid #e5e7eb;border-left-width:6px;border-left-color:#10b981;background:#f9fafb;padding:.75rem 1rem;border-radius:.5rem;">
+
  {{#switch:{{{quick_summary|}}}
  <div style="font-weight:700;margin-bottom:.25rem;">Quick Summary</div>
+
  |                                  =            <!-- truly empty -->
  <div>{{{quick_summary|}}}</div>
+
  | ""                                =            <!-- plain quotes -->
</div>
+
  | &quot;&quot;                          =            <!-- HTML entity quotes -->
 +
  | ‘’                                =            <!-- curly single quotes -->
 +
  | “”                                =            <!-- curly double quotes -->
 +
  | ''                                =            <!-- two apostrophes -->
 +
  | &#32;                              =            <!-- one space -->
 +
  | &#32;&#32;                        =            <!-- two spaces -->
 +
  | &#32;&#32;&#32;                    =            <!-- three spaces -->
 +
  | #default =
 +
    <div style="margin:.75rem 0 0 0;border:1px solid #e5e7eb;border-left-width:6px;border-left-color:#10b981;background:#f9fafb;padding:.75rem 1rem;border-radius:.5rem;">
 +
      <div style="font-weight:700;margin-bottom:.25rem;">Quick Summary</div>
 +
      <div>{{{quick_summary}}}</div>
 +
    </div>
 +
  }}
 
|}}<nowiki/><!--trim-->
 
|}}<nowiki/><!--trim-->
  
<!-- Alert strip -->
+
 
 +
<!-- Alert strip (only with real content) -->
 
{{#ifeq:{{{show_alert|no}}}|yes|
 
{{#ifeq:{{{show_alert|no}}}|yes|
<div style="margin:.75rem 0 0 0;border:1px solid #fee2e2;background:#fff7f7;color:#7f1d1d;padding:.6rem .9rem;border-radius:.5rem;">
+
  {{#switch:{{{alert|}}}
  <strong style="margin-right:.25rem;">Heads up:</strong>{{{alert|}}}
+
  |                                  =
</div>
+
  | ""                                =
 +
  | &quot;&quot;                          =
 +
  | ‘’                                =
 +
  | “”                                =
 +
  | ''                                =
 +
  | &#32;                              =
 +
  | &#32;&#32;                        =
 +
  | &#32;&#32;&#32;                    =
 +
  | #default =
 +
    <div style="margin:.75rem 0 0 0;border:1px solid #fee2e2;background:#fff7f7;color:#7f1d1d;padding:.6rem .9rem;border-radius:.5rem;">
 +
      <strong style="margin-right:.25rem;">Heads up:</strong>{{{alert}}}
 +
    </div>
 +
  }}
 
|}}<nowiki/><!--trim-->
 
|}}<nowiki/><!--trim-->
  

Revision as of 19:29, 18 September 2025

Navigation menu