Template:PageTitle: Difference between revisions
From Step Mods | Change The Game
mNo edit summary |
mNo edit summary |
||
Line 3: | Line 3: | ||
<div style="display: table-row;"> | <div style="display: table-row;"> | ||
<div style="display:table-cell; vertical-align:bottom; {{#if:{{{logo|}}}| padding-right:0.2em; | padding:0;}}"> | <div style="display:table-cell; vertical-align:bottom; {{#if:{{{logo|}}}| padding-right:0.2em; | padding:0;}}"> | ||
{{#if:{{{logo|}}}|[[File:{{#switch:{{{logo}}}|delta=Delta_c.png|#default={{{logo}}} }}| | {{#if:{{{logo|}}}|[[File:{{#switch:{{{logo}}}|delta=Delta_c.png|#default={{{logo}}} }}|105px|none|bottom]]| }}</div> | ||
<div style="display: table-cell; width: 100%; overflow:hidden; {{#if:{{{subtitle|}}}|padding-bottom:0.2em;|{{#if:{{{author|}}}|padding-bottom:0.2em;|{{#if:{{{forumtid|}}}|padding-bottom:0.2em;| }} | }} | }}"> | <div style="display: table-cell; width: 100%; overflow:hidden; {{#if:{{{subtitle|}}}|padding-bottom:0.2em;|{{#if:{{{author|}}}|padding-bottom:0.2em;|{{#if:{{{forumtid|}}}|padding-bottom:0.2em;| }} | }} | }}"> | ||
<div class="pagetitle-title">{{{title}}}</div> | <div class="pagetitle-title">{{{title}}}</div> | ||
<div class="pagetitle-subtitle">{{#if:{{{subtitle|}}}|{{{subtitle}}}}}</div> | <div class="pagetitle-subtitle">{{#if:{{{subtitle|}}}|{{{subtitle}}}}}</div> | ||
<div class="pagetitle-extra">{{#if:{{{author|}}}|''by: {{{author}}}''}}</div> | <div class="pagetitle-extra">{{#if:{{{author|}}}|''by: {{{author}}}''}}</div> | ||
<div class="pagetitle-extra">{{#if:{{{forumtid|}}}|[https:// | <div class="pagetitle-extra">{{#if:{{{forumtid|}}}|[https://stepmodifications.org/ipb4/topic/{{{forumtid}}}- '''Forum Topic''']}}</div></div></div></div></div>{{clear}}__NOTITLE__</includeonly><noinclude>__NOTOC__ __NOTITLE__ [[Category:Formatting Templates]] | ||
==Purpose & Usage== | ==Purpose & Usage== |
Revision as of 17:28, January 12, 2021
Purpose & Usage
Used at top of pages to include a standardized page-title header. This template relies upon global CSS classes.
Parameters:
- logo: (optional) Displays a logo to the left of the content
- fill with the file name (with extension) of an uploaded image (e.g. Delta_c.png )
- if logo=delta, then the Step delta logo will be displayed
- title: is the text for the title
- subtitle: (optional) this is this the text that appears below the title.
- author: (optional) field for the author(s)
- forumtid: (optional) use a forum topic's ID to include a link to related forum topic
Example 01 (title only)
Code:
{{PageTitle|title=Your Title Here}}
Result:
Example 02 (all options w/default logo)
Code:
{{PageTitle|logo=delta|title=Your Title Here|subtitle=Your subtitle text here|author= Team XYZ|forumtid=423}}
Result:
Example 03 (all options w/custom logo)
Code:
{{PageTitle|logo=[[File:Fallout3.png|115px|left]]|title=Your Title Here|subtitle=Your subtitle text here|author= Team XYZ|forumtid=423}}
Result:
Example 04 (wo/subtitle)
Code:
{{PageTitle|logo=delta|title=Your Title Here|author= Team XYZ|forumtid=423}}
Result: