1,979
edits
(doc) |
No edit summary |
||
Line 1: | Line 1: | ||
Outputs a server's color scheme. | |||
For example, a template's header about Whenthe might look something like | For example, a template's header about Whenthe might look something like | ||
Line 5: | Line 5: | ||
<div style="min-width:25%; max-width:300px; font-weight:bold; text-align:center; {{server color|Whenthe}}">Whenthe</div> | <div style="min-width:25%; max-width:300px; font-weight:bold; text-align:center; {{server color|Whenthe}}">Whenthe</div> | ||
because that is defined | because that is the color scheme defined in the [[Whenthe]] infobox. | ||
The template outputs in a {{w|CSS}} format. It is used for styling templates, such as {{tl|Infobox Discord server}} and {{tl|Server subbox}}. | The template outputs in a {{w|CSS}} format (e.g., the default output is <code>{{server color}}</code>). It is used for styling templates, such as {{tl|Infobox Discord server}} and {{tl|Server subbox}}. | ||
Usage: <code>{{Server color|''server name''}}</code> | Usage: <code>{{Server color|''server name or ID''}}</code> | ||
This template pulls the colors from the [[Special:CargoTables/discord_servers|Discord servers Cargo table]], which in turn pulls its data from the infobox for each server. The template's parameter must exactly match either the name or Discord ID used on the server's infobox. | |||
== TemplateData == | |||
<templatedata> | |||
{ | |||
"params": { | |||
"1": { | |||
"label": "Server", | |||
"description": "Either the name or the Discord ID of the server. It must match the name or ID that is in the server's infobox.", | |||
"example": "Whenthe", | |||
"type": "string", | |||
"required": true | |||
} | |||
}, | |||
"description": "Outputs the CSS for a server's color scheme, which is defined in that server's infobox. White-on-blue is the default if no other color scheme is defined." | |||
} | |||
</templatedata> |