Difference between revisions of "Template:ContentTemplate"

From Holdfast: Nations At War
Jump to navigation Jump to search
(Created page with "<noinclude><!-- Template:ContentTemplate --></noinclude> <!-- Minimal wrapper for inner pages (guides, docs). Requires ParserFunctions. --> <div class="ct"> <!-- Optional h...")
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude><!-- Template:ContentTemplate --></noinclude>
+
<!-- Modern, responsive content layout (div + flexbox) -->
<!-- Minimal wrapper for inner pages (guides, docs). Requires ParserFunctions. -->
+
<!-- Based on Paradox-style layout, but using semantic wrappers and CSS classes -->
<div class="ct">
 
  
  <!-- Optional header -->
 
  {{#if:{{{title|}}}|
 
    <div class="ct-head">
 
      {{#if:{{{icon|}}}|<span class="ct-icon">{{{icon}}}</span>}}
 
      <span class="ct-title">{{{title}}}</span>
 
      {{#if:{{{subtitle|}}}|<span class="ct-sub">{{{subtitle}}}</span>}}
 
    </div>
 
  }}
 
  
  <div class="ct-body {{#if:{{{sidebar|}}}|ct-has-sidebar|}}">
+
{{HeaderTemplate|welcome={{{welcome|}}}|blurb={{{blurb|}}}}}
    <div class="ct-main">
 
      {{{content|''(No content provided.)''}}}
 
    </div>
 
  
    {{#if:{{{sidebar|}}}|
 
      <aside class="ct-sidebar">
 
        {{{sidebar}}}
 
      </aside>
 
    }}
 
  </div>
 
  
  {{#if:{{{footer|}}}|
+
<div class="cpage" role="presentation">
    <div class="ct-foot">
+
<div class="cpage__left">
      {{{footer}}}
+
{{SectionTemplate
    </div>
+
|title = {{{sections_title|Sections}}}
  }}
+
|content = {{{sections_content|}}}
 +
}}
 +
</div>
 +
 
 +
 
 +
<main class="cpage__main" role="main">
 +
{{#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>
 +
 +
 +
{{#if:{{{image_content|}}}|
 +
<aside class="cpage__aside" role="complementary">
 +
{{{image_content}}}
 +
</aside>
 +
|}}
 
</div>
 
</div>
<noinclude>
 
== Usage ==
 
<pre>
 
{{ContentTemplate
 
| title    = Beginner’s Guide
 
| subtitle = An introductory guide for new players.
 
| icon    = 🪖
 
| content  =
 
Your full page wikitext goes here, including == headings ==, lists, tables, etc.
 
  
| sidebar  =
 
* [[Game Modes]]
 
* [[Classes:_Command|Classes]]
 
* [[Aiming]]
 
* [[Melee]]
 
* [[Organised Events]]
 
  
| footer  = Last updated: {{REVISIONDAY}} {{REVISIONMONTHNAME}} {{REVISIONYEAR}}
+
<!-- Optional magic words (default hidden). Set |show_toc=yes or |show_section_edit=yes to enable. -->
}}
+
{{#ifeq:{{{show_toc|no}}}|yes||__NOTOC__}}
</pre>
+
{{#ifeq:{{{show_section_edit|no}}}|yes||__NOEDITSECTION__}}
 +
 
  
== Notes ==
+
<noinclude>[[Category:Templates]]</noinclude>
* All parameters are optional.
 
* Wrap big blocks in nowiki only if you see parsing conflicts.
 
* Protect this template if lots of pages depend on it.
 
</noinclude>
 

Latest revision as of 08:41, 18 September 2025