Template:Heading: Difference between revisions

From 118Wiki
Jump to navigation Jump to search
(San serif font)
(templatedata)
 
Line 36: Line 36:


{{SubHeading|Starfleet Medical|Teal|ALIGN=right}}
{{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>

Latest revision as of 18:08, 27 February 2024

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

This template translates the standard color names for the divisions to the colors we use on the wiki. Thus Red, Gold, Blue, Teal, Violet, Black, Silver, and Green 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 this red rather than using "Red" to get this red. Consult this table for reference.

Example

{{Heading|Name of Heading|Blue}}

Name of Heading




Clearing a Section

You can also add a
before the heading so that a thumbnail or sidebar will be displayed completely above it by adding "clear" to the end :

{{Heading|Name of Heading|Color|clear}}

Before



After



Changing alignment of text

You can now have the subheading text appear on the center or right by adding ALIGN=center or ALIGN=right.

{{SubHeading|USS Enterprise|Red|ALIGN=center}}

USS Enterprise


{{SubHeading|Starfleet Medical|Teal|ALIGN=right}}

Starfleet Medical


Template Data

Creates a heading style that uses a thin colored line specified by the user.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Name of Heading1

The title of the section displayed over the line.

Linerequired
Color2

The color of the line. Uses division colors (instead of HTML color names) or color codes. See documentation for more information.

Suggested values
red gold blue teal violet black silver green
Linesuggested
Clear3

Clears the heading so that it doesn't collide with images or other objects. Write e.g. "clear" to clear, leave empty otherwise.

Lineoptional
AlignmentALIGN

Align the title to left, right or center of the line.

Suggested values
left right center
Default
left
Lineoptional