Difference between revisions of "Template:MainTemplateModern"

From Holdfast: Nations At War
Jump to navigation Jump to search
(Created page with "{{MainTemplateModern | welcome = left|alt=... | blurb = Short description. | sections_title = On this page | sections_content...")
 
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{MainTemplateModern
+
<!-- Template:MainTemplateModern -->
| welcome         = [[File:Forum Logo.png|left|alt=...]]
+
<!-- Modern, responsive replacement for the table-based MainTemplate. Uses TemplateStyles for CSS. -->
| blurb           = Short description.
+
<!-- Usage: {{MainTemplateModern
| sections_title   = On this page
+
| welcome = [[File:Forum Logo.png|left|alt=Server Hosting]]
| sections_content = * [[#Intro]]\n* [[#Setup]]\n* [[#FAQ]]
+
| blurb = Short description of the page.
| about_title     = About this wiki
+
| sections_title = On this page
| about_content   = ...
+
| sections_content = * [[#Intro]]\n* [[#Setup]]\n* [[#FAQ]]
| featured_title   = Featured
+
| about_title = About this wiki
| featured_content = {{:{{FULLPAGENAME}}/Body}}
+
| about_content = Some about text.
| news_title       = News
+
| featured_title = Featured content
| news_content     = * 2025-09-23 — Something shipped.
+
| featured_content = {{:{{FULLPAGENAME}}/Body}}
| image_content   = [[File:Holdfast screenshot.jpg|frameless|upright=1.1]]
+
| 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 -->
 +
<div class="hf-main">
 +
<div class="hf-grid">
 +
 
 +
 
 +
<!-- LEFT / Sections (optional) -->
 +
{{#if:{{{sections_content|}}}|
 +
<aside class="hf-left" role="complementary">
 +
{{SectionTemplate
 +
| title = {{{sections_title|On this page}}}
 +
| content = {{{sections_content|}}}
 
}}
 
}}
 +
</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>
 +
}}
 +
 +
 +
{{#if:{{{featured_content|}}}|
 +
<section class="hf-card" id="featured">
 +
{{SectionTemplate|title={{{featured_title|Featured}}}|content={{{featured_content|}}}}}
 +
</section>
 +
}}
 +
 +
 +
{{#if:{{{news_content|}}}|
 +
<section class="hf-card" id="news">
 +
{{SectionTemplate|title={{{news_title|News}}}|content={{{news_content|}}}}}
 +
</section>
 +
}}
 +
</main>
 +
 +
 +
<!-- RIGHT / Image + Tools (optional, both can render) -->
 +
{{#if:{{{image_content|}}}{{{show_tools|}}}|
 +
<aside class="hf-right" role="complementary">
 +
  {{#if:{{{image_content|}}}|
 +
  <div class="hf-card hf-right-card">
 +
    {{{image_content|}}}
 +
  </div>
 +
  }}
 +
 +
  {{#ifeq:{{{show_tools|no}}}|yes|
 +
  <div class="hf-card hf-right-card" id="edit-tools">
 +
    {{SectionTemplate
 +
      | title  = {{{tools_title|Edit Tools}}}
 +
      | content =
 +
<div class="hf-chiprow">
 +
  <span class="hf-chip">Body</span>
 +
</div>
 +
<div class="plainlinks">
 +
  {{#ifexist:{{FULLPAGENAME}}/Body
 +
    | <ul>
 +
        <li>[{{fullurl:{{FULLPAGENAME}}/Body|veaction=edit}} Edit body (VE)]</li>
 +
        <li>[{{fullurl:{{FULLPAGENAME}}/Body|action=edit}} Edit body (source)]</li>
 +
        <li>[{{fullurl:{{FULLPAGENAME}}/Body|action=history}} Body history]</li>
 +
        <li>Last body edit: [[User:{{REVISIONUSER:{{FULLPAGENAME}}/Body}}|{{REVISIONUSER:{{FULLPAGENAME}}/Body}}]] — {{#time:Y-m-d H:i \\U\\T\\C|{{REVISIONTIMESTAMP:{{FULLPAGENAME}}/Body}}}}</li>
 +
      </ul>
 +
    | <ul>
 +
        <li>[{{fullurl:{{FULLPAGENAME}}/Body|action=edit}} Create body]</li>
 +
      </ul>
 +
  }}
 +
</div>
 +
    }}
 +
  </div>
 +
  }}
 +
</aside>
 +
}}
 +
 +
 +
</div>
 +
</div>
 +
 +
 +
__NOTOC__
 +
__NOEDITSECTION__
 +
<noinclude>[[Category:Templates]]</noinclude>

Latest revision as of 17:08, 23 September 2025



<templatestyles src="MainTemplateModern/styles.css" />





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




</main>