Difference between revisions of "Template:ContentTemplateModernInline"

From Holdfast: Nations At War
Jump to navigation Jump to search
(Created page with "<!-- Modern content layout with ZERO site CSS and NO TemplateStyles. Everything is inline. Media queries aren't possible; use |layout=stack to force vertical layout. -->...")
 
Line 1: Line 1:
<!-- Modern content layout with ZERO site CSS and NO TemplateStyles.
+
<!-- ContentTemplateModernInline — no Variables extension, no leading spaces -->
    Everything is inline. Media queries aren't possible; use |layout=stack to force vertical layout. -->
 
  
 
{{HeaderTemplate|welcome={{{welcome|}}}|blurb={{{blurb|}}}}}
 
{{HeaderTemplate|welcome={{{welcome|}}}|blurb={{{blurb|}}}}}
  
<!-- Defaults -->
+
{{#switch:{{{layout|auto}}}
{{#vardefine:gap|{{{gap|1rem}}} }}
 
{{#vardefine:left_width|{{{left_width|320px}}} }}
 
{{#vardefine:aside_width|{{{aside_width|320px}}} }}
 
{{#vardefine:show_toc|{{{show_toc|no}}} }}
 
{{#vardefine:show_section_edit|{{{show_section_edit|no}}} }}
 
{{#vardefine:layout|{{lc:{{{layout|auto}}}}} }} <!-- auto|stack -->
 
 
 
<!-- Wrapper (switch for layout) -->
 
{{#switch:{{#var:layout}}
 
 
| stack =
 
| stack =
  <div class="cpage" role="presentation" style="display:block;">
+
<div class="cpage" role="presentation" style="display:block;">
    <!-- Left column -->
+
<div class="cpage__left" style="margin-bottom:{{{gap|1rem}}};">
    <div class="cpage__left" style="margin-bottom:{{#var:gap}};">
+
{{SectionTemplate|title={{{sections_title|Sections}}}|content={{{sections_content|}}}}}
      {{SectionTemplate
+
</div>
        |title   = {{{sections_title|Sections}}}
+
<main class="cpage__main" role="main" style="margin-bottom:{{{gap|1rem}}};">
        |content = {{{sections_content|}}}
+
{{#if:{{{about_content|}}}|{{SectionTemplate|title={{{about_title|About}}}|content={{{about_content}}}}}|}}
      }}
+
{{#if:{{{featured_content|}}}|{{SectionTemplate|title={{{featured_title|Featured}}}|content={{{featured_content}}}}}|}}
    </div>
+
{{#if:{{{news_content|}}}|{{SectionTemplate|title={{{news_title|News}}}|content={{{news_content}}}}}|}}
 
+
</main>
    <!-- Main column -->
+
{{#if:{{{image_content|}}}|<aside class="cpage__aside" role="complementary">{{{image_content}}}</aside>|}}
    <main class="cpage__main" role="main" style="margin-bottom:{{#var:gap}};">
+
</div>
      {{#if:{{{about_content|}}}|
 
        {{SectionTemplate|title={{{about_title|About}}}|content={{{about_content}}}}}
 
      |}}
 
      {{#if:{{{featured_content|}}}|
 
        {{SectionTemplate|title={{{featured_title|Featured}}}|content={{{featured_content}}}}}
 
      |}}
 
      {{#if:{{{news_content|}}}|
 
        {{SectionTemplate|title={{{news_title|News}}}|content={{{news_content}}}}}
 
      |}}
 
    </main>
 
 
 
    <!-- Optional aside -->
 
    {{#if:{{{image_content|}}}|
 
      <aside class="cpage__aside" role="complementary">
 
        {{{image_content}}}
 
      </aside>
 
    |}}
 
  </div>
 
 
| #default =
 
| #default =
  <div class="cpage" role="presentation" style="display:flex;align-items:flex-start;gap:{{#var:gap}};">
+
<div class="cpage" role="presentation" style="display:flex;align-items:flex-start;gap:{{{gap|1rem}}};">
    <!-- Left column -->
+
<div class="cpage__left" style="flex:0 0 {{{left_width|320px}}};min-width:260px;">
    <div class="cpage__left" style="flex:0 0 {{#var:left_width}};min-width:260px;">
+
{{SectionTemplate|title={{{sections_title|Sections}}}|content={{{sections_content|}}}}}
      {{SectionTemplate
+
</div>
        |title   = {{{sections_title|Sections}}}
+
<main class="cpage__main" role="main" style="flex:1 1 auto;min-width:0;">
        |content = {{{sections_content|}}}
+
{{#if:{{{about_content|}}}|{{SectionTemplate|title={{{about_title|About}}}|content={{{about_content}}}}}|}}
      }}
+
{{#if:{{{featured_content|}}}|{{SectionTemplate|title={{{featured_title|Featured}}}|content={{{featured_content}}}}}|}}
    </div>
+
{{#if:{{{news_content|}}}|{{SectionTemplate|title={{{news_title|News}}}|content={{{news_content}}}}}|}}
 
+
</main>
    <!-- Main column -->
+
{{#if:{{{image_content|}}}|<aside class="cpage__aside" role="complementary" style="flex:0 0 {{{aside_width|320px}}};min-width:260px;">{{{image_content}}}</aside>|}}
    <main class="cpage__main" role="main" style="flex:1 1 auto;min-width:0;">
+
</div>
      {{#if:{{{about_content|}}}|
 
        {{SectionTemplate|title={{{about_title|About}}}|content={{{about_content}}}}}
 
      |}}
 
      {{#if:{{{featured_content|}}}|
 
        {{SectionTemplate|title={{{featured_title|Featured}}}|content={{{featured_content}}}}}
 
      |}}
 
      {{#if:{{{news_content|}}}|
 
        {{SectionTemplate|title={{{news_title|News}}}|content={{{news_content}}}}}
 
      |}}
 
    </main>
 
 
 
    <!-- Optional aside -->
 
    {{#if:{{{image_content|}}}|
 
      <aside class="cpage__aside" role="complementary" style="flex:0 0 {{#var:aside_width}};min-width:260px;">
 
        {{{image_content}}}
 
      </aside>
 
    |}}
 
  </div>
 
 
}}
 
}}
  
<!-- TOC / edit link toggles -->
+
{{#ifeq:{{{show_toc|no}}}|yes||__NOTOC__}}
{{#ifeq:{{#var:show_toc}}|yes||__NOTOC__}}
+
{{#ifeq:{{{show_section_edit|no}}}|yes||__NOEDITSECTION__}}
{{#ifeq:{{#var:show_section_edit}}|yes||__NOEDITSECTION__}}
 
  
 
<noinclude>[[Category:Templates]]</noinclude>
 
<noinclude>[[Category:Templates]]</noinclude>

Revision as of 09:03, 18 September 2025