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 v2 — MW 1.35+ safe; cleaned + consistent -->
  
 
{{HeaderTemplate|welcome={{{welcome|}}}|blurb={{{blurb|}}}}}
 
{{HeaderTemplate|welcome={{{welcome|}}}|blurb={{{blurb|}}}}}
 
{{#ifeq:{{{show_toc|no}}}|yes|__TOC__|__NOTOC__}}<nowiki/><!--trim-->
 
{{#ifeq:{{{show_toc|no}}}|yes|__TOC__|__NOTOC__}}<nowiki/><!--trim-->
  
<!-- Inline edit chips (off by default; set | show_tools = yes to show) -->
+
<!-- Inline edit chips (off by default; set |show_tools=yes to show) -->
 
{{#ifeq:{{{show_tools|no}}}|yes|
 
{{#ifeq:{{{show_tools|no}}}|yes|
 
<div style="display:flex;justify-content:flex-end;gap:.5rem;margin:.25rem 0 .5rem 0;font-size:.9em;">
 
<div style="display:flex;justify-content:flex-end;gap:.5rem;margin:.25rem 0 .5rem 0;font-size:.9em;">
   {{#ifexist: {{FULLPAGENAME}}/Body
+
   {{#ifexist:{{FULLPAGENAME}}/Body
     | <span style="display:inline-block;padding:.25em .55em;border:1px solid #e5e7eb;border-radius:.5rem;background:#fff;">
+
     | <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>
        [{{fullurl:{{FULLPAGENAME}}/Body|veaction=edit}} Edit body (VE)]
+
       <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>
+
       <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;">
+
     | <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>
        [{{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>
 
</div>
Line 46: Line 38:
 
   </div>
 
   </div>
  
   <!-- Tools panel is desktop-only by default; enable on stack explicitly if needed -->
+
   <!-- Optional tools panel for stack layout (off by default) -->
 
   {{#ifeq:{{{show_tools_panel_stack|no}}}|yes|
 
   {{#ifeq:{{{show_tools_panel_stack|no}}}|yes|
 
     {{SectionTemplate
 
     {{SectionTemplate
 
       | title  = {{{tools_title|Tools}}}
 
       | title  = {{{tools_title|Tools}}}
 
       | content =
 
       | content =
{{#ifexist: {{FULLPAGENAME}}/Body
+
{{#ifexist:{{FULLPAGENAME}}/Body
 
| * [{{fullurl:{{FULLPAGENAME}}/Body|veaction=edit}} Edit body (VE)]
 
| * [{{fullurl:{{FULLPAGENAME}}/Body|veaction=edit}} Edit body (VE)]
 
* [{{fullurl:{{FULLPAGENAME}}/Body|action=edit}} Edit body (source)]
 
* [{{fullurl:{{FULLPAGENAME}}/Body|action=edit}} Edit body (source)]
Line 68: Line 60:
 
   |}}<nowiki/><!--trim-->
 
   |}}<nowiki/><!--trim-->
  
 
  {{#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>
 
</div>
  
Line 96: Line 82:
 
   </div>
 
   </div>
  
   <!-- Optional image/right aside -->
+
   <!-- Right aside (image) — suppressed if two_col=yes -->
   {{#ifexpr: {{#ifeq:{{{two_col|no}}}|yes|1|0}} + {{#if:{{{image_content|}}}|1|0}} = 2
+
   {{#ifeq:{{{two_col|no}}}|yes|
  |
+
    <!-- two_col: hide aside entirely -->
  |
+
   
    {{#if:{{{image_content|}}}|<div class="cpage__aside" role="complementary" style="flex:0 0 {{{aside_width|320px}}};min-width:260px;">{{{image_content}}}</div>|}}
+
    | {{#if:{{{image_content|}}}|<div class="cpage__aside" role="complementary" style="flex:0 0 {{{aside_width|320px}}};min-width:260px;">{{{image_content}}}</div>|}}
 
   }}
 
   }}
  
Line 109: Line 95:
 
         | title = {{{tools_title|Tools}}}
 
         | title = {{{tools_title|Tools}}}
 
         | content =
 
         | content =
{{#ifexist: {{FULLPAGENAME}}/Body
+
{{#ifexist:{{FULLPAGENAME}}/Body
 
| * [{{fullurl:{{FULLPAGENAME}}/Body|veaction=edit}} Edit body (VE)]
 
| * [{{fullurl:{{FULLPAGENAME}}/Body|veaction=edit}} Edit body (VE)]
 
* [{{fullurl:{{FULLPAGENAME}}/Body|action=edit}} Edit body (source)]
 
* [{{fullurl:{{FULLPAGENAME}}/Body|action=edit}} Edit body (source)]

Revision as of 20:10, 18 September 2025

Navigation menu