Template:Heading: Difference between revisions

templatedata
No edit summary
(templatedata)
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
<includeonly>{{br|{{{3|}}}}}<h2 style="border-bottom: none; font-size:large; font-weight:bold;">{{{1|}}}</h2><hr style="background:{{color|{{{2}}}}}; height:2px"></includeonly><noinclude>This template creates a heading style that uses a thin colored line specified by the user. It is an alternative to [[Template:Section]] and [[Template:Header]].
<includeonly>{{br|{{{3|}}}}}<h2 style="border-bottom: none; font-family:Arial, Helvetica, sans-serif; font-size:large; font-weight:bold;{{#if: {{{ALIGN|}}}|text-align:{{{ALIGN|}}}|}}">{{{1|}}}</h2><hr style="background:{{color|{{{2}}}}}; height:2px"></includeonly><noinclude>This template creates a heading style that uses a thin colored line specified by the user. It is an alternative to [[Template:Section]] and [[Template:Header]].


===Note about colors===
===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.]
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 '''[[Template:LCARS Section Heading]]''' or 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.]


===Example===
===Example===
Line 22: Line 24:
[[File:Trip.jpg|thumb|[[Template:Header|Whoa!]]]]
[[File:Trip.jpg|thumb|[[Template:Header|Whoa!]]]]
{{Heading|After|Gold|clear}}
{{Heading|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}}
{{Navbox|title=Template Data|
<templatedata>
{
"params": {
"1": {
"label": "Name of Heading",
"description": "The title of the section displayed over the line.",
"type": "line",
"required": true
},
"2": {
"label": "Color",
"description": "The color of the line. Uses division colors (instead of HTML color names) or color codes. See documentation for more information.",
"type": "line",
"suggestedvalues": [
"red",
"gold",
"blue",
"teal",
"violet",
"black",
"silver",
"green"
],
"suggested": true
},
"3": {
"label": "Clear",
"description": "Clears the heading so that it doesn't collide with images or other objects. Write e.g. \"clear\" to clear, leave empty otherwise.",
"type": "line"
},
"ALIGN": {
"label": "Alignment",
"description": "Align the title to left, right or center of the line.",
"type": "line",
"suggestedvalues": [
"left",
"right",
"center"
],
"default": "left"
}
},
"description": "Creates a heading style that uses a thin colored line specified by the user.",
"paramOrder": [
"1",
"2",
"3",
"ALIGN"
],
"format": "inline"
}
</templatedata>}}


[[Category:Templates]]
[[Category:Templates]]
__NOTOC__</noinclude>
__NOTOC__</noinclude>
1,474

edits