Template:SubHeading: Difference between revisions

From Star Trek: Theurgy Wiki

No edit summary
(Blanked the page)
 
Line 1: Line 1:
<includeonly>{{br|{{{3|}}}}}<h3 style="border-bottom: none; font-size:large; font-weight:bold;{{#if: {{{ALIGN|}}}|text-align:{{{ALIGN|}}}|}}">{{{1|}}}</h3><hr style="background:{{color|{{{2}}}}}; height:2px"></includeonly><noinclude>This template creates a subheading style that uses a thin colored line specified by the user. Basically, it creates a heading one level below [[Template:Heading]] when listed in the table of contents (the equivalent of h3 or <nowiki>===This level===</nowiki> compared to [[Template:Heading]], which is equivalent to h2 or <nowiki>==This Level==</nowiki>). For instance, notice in the table of contents that "How to Use" is a parent header to all the other headers in the table of contents. This is because it is using [[Template:Heading]].


===Note about colors===
This template translates the standard color names for the divisions to the colors we use on the wiki. Thus '''<font color=maroon>Red</font>, <font color=darkgoldenrod>Gold</font>, <font color=steelblue>Blue</font>, <font color=teal>Teal</font>, <font color=purple>Violet</font>, <font color=black>Black</font>, <font color=dimgray>Silver</font>, and <font color=darkgreen>Green</font>''' are not necessarily the same as their true html color name. Any other html color name or HEX code will be shown as entered. To get around the preset color names above, use the raw HEX code (for instance, use #FF0000 to get <font color=#FF0000>this red</font> rather than using "Red" to get <font color=maroon>this red</font>. [http://www.w3schools.com/html/html_colornames.asp Consult this table for reference.]
{{Heading|How to Use|black}}
<pre>{{SubHeading|Name of Heading|Blue}}</pre>
{{SubHeading|Name of Heading|Blue}}
===Clearing a Section===
You can also add a <nowiki><br clear=all></nowiki> before the heading so that a thumbnail or sidebar will be displayed completely above it by adding "clear" to the end :
<pre>{{SubHeading|Name of Heading|Color|clear}}</pre>
[[File:Trip.jpg|thumb|[[Template:Header|Hi, again!]]]]
{{SubHeading|Before|Red}}
[[File:Trip.jpg|thumb|[[Template:Header|Whoa!]]]]
{{SubHeading|After|Gold|clear}}
===Changing alignment of text===
You can now have the subheading text appear on the center or right by adding ALIGN=center or ALIGN=right.
<pre>{{SubHeading|USS Enterprise|Red|ALIGN=center}}</pre>
{{SubHeading|USS Enterprise|Red|ALIGN=center}}
<pre>{{SubHeading|Starfleet Medical|Teal|ALIGN=right}}</pre>
{{SubHeading|Starfleet Medical|Teal|ALIGN=right}}
[[Category:Templates]]
</noinclude>

Latest revision as of 22:54, 30 May 2022