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 -->
+
<!-- ContentTemplateModernInline — MW 1.35 safe --> {{HeaderTemplate|welcome={{{welcome|}}}|blurb={{{blurb|}}}}} {{#ifeq:{{{show_toc|no}}}|yes|__TOC__|__NOTOC__}}<nowiki/><!--trim--> <!-- Inline edit tools for /Body (Option A) --> {{#ifeq:{{{show_tools|yes}}}|yes| <div style="display:flex;justify-content:flex-end;gap:.5rem;margin:.25rem 0 .5rem 0;font-size:.9em;"> {{#ifexist: {{FULLPAGENAME}}/Body | <span style="display:inline-block;padding:.25em .55em;border:1px solid #e5e7eb;border-radius:.5rem;background:#fff;"> [{{fullurl:{{FULLPAGENAME}}/Body|veaction=edit}} Edit body (VE)] </span> <span style="display:inline-block;padding:.25em .55em;border:1px solid #e5e7eb;border-radius:.5rem;background:#fff;"> [{{fullurl:{{FULLPAGENAME}}/Body|action=edit}} Edit body (source)] </span> <span style="display:inline-block;padding:.25em .55em;border:1px solid #e5e7eb;border-radius:.5rem;background:#fff;"> [{{fullurl:{{FULLPAGENAME}}/Body|action=history}} History] </span> | <span style="display:inline-block;padding:.25em .55em;border:1px solid #e5e7eb;border-radius:.5rem;background:#fff;"> [{{fullurl:{{FULLPAGENAME}}/Body|action=edit}} Create body] </span> }} </div> |}}<nowiki/><!--trim--> {{#switch:{{{layout|auto}}} | 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__left" style="margin-bottom:{{{gap|1rem}}};"> {{SectionTemplate|title={{{sections_title|Sections}}}|content={{{sections_content|}}}}} </div> <div class="cpage__main" role="main" style="margin-bottom:{{{gap|1rem}}};"> {{#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}}}}}|}} </div> {{#ifexpr: {{#ifeq:{{{two_col|no}}}|yes|1|0}} + {{#if:{{{image_content|}}}|1|0}} = 2 | | {{#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}}}}}|}} {{#if:{{{news_content|}}}|{{SectionTemplate|title={{{news_title|News}}}|content={{{news_content}}}}}|}} </div> {{#ifexpr: {{#ifeq:{{{two_col|no}}}|yes|1|0}} + {{#if:{{{image_content|}}}|1|0}} = 2 | | {{#if:{{{image_content|}}}|<div class="cpage__aside" role="complementary" style="flex:0 0 {{{aside_width|320px}}};min-width:260px;">{{{image_content}}}</div>|}} }} </div> }}
 
 
{{HeaderTemplate|welcome={{{welcome|}}}|blurb={{{blurb|}}}}}
 
{{#ifeq:{{{show_toc|no}}}|yes|__TOC__|__NOTOC__}}<nowiki/><!--trim-->
 
 
 
<!-- Inline edit tools for /Body (Option A) -->
 
{{#ifeq:{{{show_tools|yes}}}|yes|
 
<div style="display:flex;justify-content:flex-end;gap:.5rem;margin:.25rem 0 .5rem 0;font-size:.9em;">
 
  {{#ifexist: {{FULLPAGENAME}}/Body
 
    | <span style="display:inline-block;padding:.25em .55em;border:1px solid #e5e7eb;border-radius:.5rem;background:#fff;">
 
        [{{fullurl:{{FULLPAGENAME}}/Body|veaction=edit}} Edit body (VE)]
 
      </span>
 
      <span style="display:inline-block;padding:.25em .55em;border:1px solid #e5e7eb;border-radius:.5rem;background:#fff;">
 
        [{{fullurl:{{FULLPAGENAME}}/Body|action=edit}} Edit body (source)]
 
      </span>
 
      <span style="display:inline-block;padding:.25em .55em;border:1px solid #e5e7eb;border-radius:.5rem;background:#fff;">
 
        [{{fullurl:{{FULLPAGENAME}}/Body|action=history}} History]
 
      </span>
 
    | <span style="display:inline-block;padding:.25em .55em;border:1px solid #e5e7eb;border-radius:.5rem;background:#fff;">
 
        [{{fullurl:{{FULLPAGENAME}}/Body|action=edit}} Create body]
 
      </span>
 
  }}
 
</div>
 
|}}<nowiki/><!--trim-->
 
 
 
{{#switch:{{{layout|auto}}}
 
 
 
| 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__left" style="margin-bottom:{{{gap|1rem}}};">
 
    {{SectionTemplate|title={{{sections_title|Sections}}}|content={{{sections_content|}}}}}
 
  </div>
 
 
 
  <div class="cpage__main" role="main" style="margin-bottom:{{{gap|1rem}}};">
 
    {{#if:{{{about_content|}}}|{{SectionTemplate|title={{{about_title|About}}}|content={{{about_content}}}}}|}}<nowiki/><!--trim-->
 
 
 
    <!-- Featured: render only if explicit content OR /Body exists -->
 
    {{#if:{{{featured_content|}}}
 
      | {{SectionTemplate|title={{{featured_title|Featured}}}|content={{{featured_content}}}}}
 
      | {{#ifexist:{{FULLPAGENAME}}/Body
 
          | {{SectionTemplate|title={{{featured_title|Featured}}}|content={{:{{FULLPAGENAME}}/Body}} }}
 
        }}
 
    }}<nowiki/><!--trim-->
 
 
 
    {{#if:{{{news_content|}}}|{{SectionTemplate|title={{{news_title|News}}}|content={{{news_content}}}}}|}}<nowiki/><!--trim-->
 
  </div>
 
 
 
  {{#ifexpr: {{#ifeq:{{{two_col|no}}}|yes|1|0}} + {{#if:{{{image_content|}}}|1|0}} = 2
 
  |
 
  |
 
    {{#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}}}}}|}}<nowiki/><!--trim-->
 
 
 
    <!-- Featured: render only if explicit content OR /Body exists -->
 
    {{#if:{{{featured_content|}}}
 
      | {{SectionTemplate|title={{{featured_title|Featured}}}|content={{{featured_content}}}}}
 
      | {{#ifexist:{{FULLPAGENAME}}/Body
 
          | {{SectionTemplate|title={{{featured_title|Featured}}}|content={{:{{FULLPAGENAME}}/Body}} }}
 
        }}
 
    }}<nowiki/><!--trim-->
 
 
 
    {{#if:{{{news_content|}}}|{{SectionTemplate|title={{{news_title|News}}}|content={{{news_content}}}}}|}}<nowiki/><!--trim-->
 
  </div>
 
 
 
  {{#ifexpr: {{#ifeq:{{{two_col|no}}}|yes|1|0}} + {{#if:{{{image_content|}}}|1|0}} = 2
 
  |
 
  |
 
    {{#if:{{{image_content|}}}|<div class="cpage__aside" role="complementary" style="flex:0 0 {{{aside_width|320px}}};min-width:260px;">{{{image_content}}}</div>|}}
 
  }}
 
</div>
 
 
 
}}
 

Revision as of 19:52, 18 September 2025

Create body

Navigation menu