Difference between revisions of "Template:MainTemplateModern"

From Holdfast: Nations At War
Jump to navigation Jump to search
Line 1: Line 1:
<!-- Template:MainTemplateModern -->
 
<!-- Modern, responsive replacement for the table-based MainTemplate. Uses TemplateStyles for CSS. -->
 
<!-- Usage: {{MainTemplateModern
 
| welcome = [[File:Forum Logo.png|left|alt=Server Hosting]]
 
| blurb = Short description of the page.
 
| sections_title = On this page
 
| sections_content = * [[#Intro]]\n* [[#Setup]]\n* [[#FAQ]]
 
| about_title = About this wiki
 
| about_content = Some about text.
 
| featured_title = Featured content
 
| featured_content = {{:{{FULLPAGENAME}}/Body}}
 
| news_title = News
 
| news_content = * 2025-09-23 — Something shipped.
 
| image_content = [[File:Holdfast screenshot.jpg|frameless|upright=1.1|alt=...]]
 
}} -->
 
 
 
<noinclude>{{Documentation}}</noinclude>
 
<templatestyles src="MainTemplateModern/styles.css"/>
 
 
 
<!-- Header -->
 
{{HeaderTemplate|welcome={{{welcome|}}}|blurb={{{blurb|}}}}}
 
 
 
 
<!-- Outer wrapper -->
 
<!-- Outer wrapper -->
 
<div class="hf-main">
 
<div class="hf-main">
<div class="hf-grid">
+
  <div class="hf-grid">
 
 
  
<!-- LEFT / Sections (optional) -->
+
    <!-- LEFT / Sections -->
{{#if:{{{sections_content|}}}|
+
    {{#if:{{{sections_content|}}}|
<aside class="hf-left" role="complementary">
+
    <aside class="hf-left" role="complementary">
{{SectionTemplate
+
      {{SectionTemplate
| title = {{{sections_title|On this page}}}
+
        | title   = {{{sections_title|On this page}}}
| content = {{{sections_content|}}}
+
        | content = {{{sections_content|}}}
}}
+
      }}
</aside>
+
    </aside>
}}
+
    }}
  
 +
    <!-- CENTER / Stacked cards -->
 +
    <main class="hf-center" role="main">
 +
      {{#if:{{{about_content|}}}|
 +
      <section class="hf-card" id="about">
 +
        {{SectionTemplate|title={{{about_title|About}}}|content={{{about_content|}}}}}
 +
      </section>
 +
      }}
  
<!-- CENTER / Stacked cards -->
+
      {{#if:{{{featured_content|}}}|
<main class="hf-center" role="main">
+
      <section class="hf-card" id="featured">
{{#if:{{{about_content|}}}|
+
        {{SectionTemplate|title={{{featured_title|Featured}}}|content={{{featured_content|}}}}}
<section class="hf-card" id="about">
+
      </section>
{{SectionTemplate|title={{{about_title|About}}}|content={{{about_content|}}}}}
+
      }}
</section>
 
}}
 
  
 +
      {{#if:{{{news_content|}}}|
 +
      <section class="hf-card" id="news">
 +
        {{SectionTemplate|title={{{news_title|News}}}|content={{{news_content|}}}}}
 +
      </section>
 +
      }}
 +
    </main>
  
{{#if:{{{featured_content|}}}|
+
    <!-- RIGHT / Image or custom -->
<section class="hf-card" id="featured">
+
    {{#if:{{{image_content|}}}|
{{SectionTemplate|title={{{featured_title|Featured}}}|content={{{featured_content|}}}}}
+
    <aside class="hf-right" role="complementary">
</section>
+
      <div class="hf-card hf-right-card">
}}
+
        {{{image_content|}}}
 +
      </div>
 +
    </aside>
 +
    }}
  
 
+
  </div>
{{#if:{{{news_content|}}}|
 
<section class="hf-card" id="news">
 
{{SectionTemplate|title={{{news_title|News}}}|content={{{news_content|}}}}}
 
</section>
 
}}
 
</main>
 
 
 
 
 
<!-- RIGHT / Image or custom (optional) -->
 
{{#if:{{{image_content|}}}|
 
<aside class="hf-right" role="complementary">
 
<div class="hf-card hf-right-card">
 
{{{image_content|}}}
 
 
</div>
 
</div>
</aside>
 
}}
 
 
 
</div>
 
</div>
 
 
  
 
__NOTOC__
 
__NOTOC__
 
__NOEDITSECTION__
 
__NOEDITSECTION__
 
<noinclude>[[Category:Templates]]</noinclude>
 
<noinclude>[[Category:Templates]]</noinclude>

Revision as of 16:55, 23 September 2025


   <main class="hf-center" role="main">
     



   </main>