Difference between revisions of "Template:ContentTemplateModernInline"

From Holdfast: Nations At War
Jump to navigation Jump to search
Line 1: Line 1:
 
<!-- ContentTemplateModernInline — MW 1.35 safe / inline styles only -->
 
<!-- ContentTemplateModernInline — MW 1.35 safe / inline styles only -->
  
{{HeaderTemplate|welcome={{{welcome|}}}|blurb={{{blurb|}}}}}{{#ifeq:{{{show_toc|no}}}|yes|__TOC__|__NOTOC__}}<nowiki/><!--trim-->
+
{{HeaderTemplate|welcome={{{welcome|}}}|blurb={{{blurb|}}}}}
 +
{{#ifeq:{{{show_toc|no}}}|yes|__TOC__|__NOTOC__}}<nowiki/>
  
 
<!-- Badges row (version / updated) -->
 
<!-- Badges row (version / updated) -->
Line 9: Line 10:
 
   {{#if:{{{updated|}}}|<span style="display:inline-block;padding:.2em .5em;border-radius:.5em;background:#ecfeff;color:#155e75;font-weight:600;font-size:.85em;">Updated: {{{updated}}}</span>|}}
 
   {{#if:{{{updated|}}}|<span style="display:inline-block;padding:.2em .5em;border-radius:.5em;background:#ecfeff;color:#155e75;font-weight:600;font-size:.85em;">Updated: {{{updated}}}</span>|}}
 
</div>
 
</div>
|}}<nowiki/><!--trim-->
+
|}}
  
<!-- Quick summary box (render only if content is real, not empty/quotes/spaces) -->
+
<!-- Quick summary box -->
{{#ifeq:{{{show_summary|no}}}|yes|
+
{{#if:{{{quick_summary|}}}|
  {{#switch:{{{quick_summary|}}}
+
<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;">
  |                                  =            <!-- truly empty -->
+
  <div style="font-weight:700;margin-bottom:.25rem;">Quick Summary</div>
  | ""                                =            <!-- plain quotes -->
+
  <div>{{{quick_summary}}}</div>
  | &quot;&quot;                          =            <!-- HTML entity quotes -->
+
</div>
  | ‘’                                =            <!-- 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-->
 
  
 
+
<!-- Alert strip -->
<!-- Alert strip (only with real content) -->
+
{{#if:{{{alert|}}}|
{{#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-->
 
  
 
<!-- MAIN LAYOUT -->
 
<!-- MAIN LAYOUT -->
 
{{#switch:{{{layout|auto}}}
 
{{#switch:{{{layout|auto}}}
| stack =<!--no-nl-->
+
| stack =
<div class="cpage" role="presentation" style="display:block;overflow:hidden;border-top:1px solid transparent;margin-top:-{{{pullup|0.8em}}};padding-top:{{{pullup|0.8em}}};">
+
  <div class="cpage" role="presentation"
  <div class="cpage__left" style="margin-bottom:{{{gap|1rem}}};">{{SectionTemplate|title={{{sections_title|Sections}}}|content={{{sections_content|}}}}}</div><!--trim-->
+
      style="display:block;overflow:hidden;border-top:1px solid transparent;margin-top:-{{{pullup|0.8em}}};padding-top:{{{pullup|0.8em}}};">
  <div class="cpage__main" role="main" style="margin-bottom:{{{gap|1rem}}};">
+
 
    {{#if:{{{about_content|}}}|{{SectionTemplate|title={{{about_title|About}}}|content={{{about_content}}}}}|}}<nowiki/><!--trim-->
+
    <div class="cpage__left" style="margin-bottom:{{{gap|1rem}}};">
    {{#if:{{{featured_content|}}}
+
      {{SectionTemplate|title={{{sections_title|Sections}}}|content={{{sections_content|}}}}}
      | {{SectionTemplate|title={{{featured_title|Featured}}}|content={{{featured_content}}}}}
+
    </div>
      | {{SectionTemplate|title={{{featured_title|Featured}}}|content={{:{{FULLPAGENAME}}/Body}} }}
+
 
    }}<nowiki/><!--trim-->
+
    <div class="cpage__main" role="main" style="margin-bottom:{{{gap|1rem}}};">
    {{#if:{{{news_content|}}}|{{SectionTemplate|title={{{news_title|News}}}|content={{{news_content}}}}}|}}<nowiki/><!--trim-->
+
      {{#if:{{{about_content|}}}|{{SectionTemplate|title={{{about_title|About}}}|content={{{about_content}}}}}|}}
  </div><!--trim-->
+
      {{#if:{{{featured_content|}}}
  {{#ifeq:{{{two_col|no}}}|yes
+
        | {{SectionTemplate|title={{{featured_title|Featured}}}|content={{{featured_content}}}}}
    | <!-- two_col = yes → no aside -->
+
        | {{SectionTemplate|title={{{featured_title|Featured}}}|content={{:{{FULLPAGENAME}}/Body}} }}
    | {{#if:{{{image_content|}}}|<div class="cpage__aside" role="complementary">{{{image_content}}}</div>|}}
+
      }}
  }}<nowiki/><!--trim-->
+
      {{#if:{{{news_content|}}}|{{SectionTemplate|title={{{news_title|News}}}|content={{{news_content}}}}}|}}
</div><!--trim-->
+
    </div>
 +
 
 +
    {{#ifeq:{{{two_col|no}}}|yes
 +
      | <!-- two_col = yes → no aside -->
 +
      | {{#if:{{{image_content|}}}|<div class="cpage__aside" role="complementary">{{{image_content}}}</div>|}}
 +
    }}
 +
  </div>
 +
 
 +
| #default =
 +
  <div class="cpage" role="presentation"
 +
      style="display:flex;align-items:flex-start;gap:{{{gap|1rem}}};overflow:hidden;border-top:1px solid transparent;margin-top:-{{{pullup|0.8em}}};padding-top:{{{pullup|0.8em}}};">
 +
    <div class="cpage__left" style="flex:0 0 {{{left_width|320px}}};min-width:260px;">
 +
      {{SectionTemplate|title={{{sections_title|Sections}}}|content={{{sections_content|}}}}}
 +
    </div>
 +
 
 +
    <div class="cpage__main" role="main" style="flex:1 1 auto;min-width:0;">
 +
      {{#if:{{{about_content|}}}|{{SectionTemplate|title={{{about_title|About}}}|content={{{about_content}}}}}|}}
 +
      {{#if:{{{featured_content|}}}
 +
        | {{SectionTemplate|title={{{featured_title|Featured}}}|content={{{featured_content}}}}}
 +
        | {{SectionTemplate|title={{{featured_title|Featured}}}|content={{:{{FULLPAGENAME}}/Body}} }}
 +
      }}
 +
      {{#if:{{{news_content|}}}|{{SectionTemplate|title={{{news_title|News}}}|content={{{news_content}}}}}|}}
 +
    </div>
  
| #default =<!--no-nl-->
+
     {{#ifeq:{{{two_col|no}}}|yes
<div class="cpage" role="presentation" style="display:flex;align-items:flex-start;gap:{{{gap|1rem}}};overflow:hidden;border-top:1px solid transparent;margin-top:-{{{pullup|0.8em}}};padding-top:{{{pullup|0.8em}}};">
+
      | <!-- two_col = yes → no aside -->
  <div class="cpage__left" style="flex:0 0 {{{left_width|320px}}};min-width:260px;">{{SectionTemplate|title={{{sections_title|Sections}}}|content={{{sections_content|}}}}}</div><!--trim-->
+
      | {{#if:{{{image_content|}}}|<div class="cpage__aside" role="complementary" style="flex:0 0 {{{aside_width|320px}}};min-width:260px;">{{{image_content}}}</div>|}}
  <div class="cpage__main" role="main" style="flex:1 1 auto;min-width:0;">
+
    }}
    {{#if:{{{about_content|}}}|{{SectionTemplate|title={{{about_title|About}}}|content={{{about_content}}}}}|}}<nowiki/><!--trim-->
+
  </div>
     {{#if:{{{featured_content|}}}
+
}}
      | {{SectionTemplate|title={{{featured_title|Featured}}}|content={{{featured_content}}}}}
 
      | {{SectionTemplate|title={{{featured_title|Featured}}}|content={{:{{FULLPAGENAME}}/Body}} }}
 
    }}<nowiki/><!--trim-->
 
    {{#if:{{{news_content|}}}|{{SectionTemplate|title={{{news_title|News}}}|content={{{news_content}}}}}|}}<nowiki/><!--trim-->
 
  </div><!--trim-->
 
  {{#ifeq:{{{two_col|no}}}|yes
 
    | <!-- two_col = yes → no aside -->
 
    | {{#if:{{{image_content|}}}|<div class="cpage__aside" role="complementary" style="flex:0 0 {{{aside_width|320px}}};min-width:260px;">{{{image_content}}}</div>|}}
 
  }}<nowiki/><!--trim-->
 
</div><!--trim-->
 
}}<nowiki/><!--trim-->
 
  
 
<!-- Footer nav -->
 
<!-- Footer nav -->
Line 94: Line 81:
 
   <div>{{#if:{{{next_link|}}}|<span style="display:inline-block;padding:.45rem .7rem;border:1px solid #e5e7eb;border-radius:.5rem;background:#fff;">{{{next_link}}} →</span>|}}</div>
 
   <div>{{#if:{{{next_link|}}}|<span style="display:inline-block;padding:.45rem .7rem;border:1px solid #e5e7eb;border-radius:.5rem;background:#fff;">{{{next_link}}} →</span>|}}</div>
 
</div>
 
</div>
|}}<nowiki/><!--trim-->
+
|}}

Revision as of 19:30, 18 September 2025

Navigation menu