User:Evertiro/Shields: Difference between revisions
From Step Mods | Change The Game
No edit summary |
|||
Line 1: | Line 1: | ||
<includeonly> | <includeonly><img src="https://img.shields.io/badge/{{{label|}}}-{{{message|}}}-{{{color|}}}.svg" style="vertical-align: middle" /></includeonly><noinclude>__NOTOC__ | ||
==Purpose & Usage== | ==Purpose & Usage== | ||
This template provides a simple means to render | This template provides a simple means to render custom scalable tags for use when applicable. Note that spaces must be url-safe, meaning that you must replace spaces with %20 (see examples). | ||
====Parameters:==== | ====Parameters:==== | ||
* ''''' | * '''''label''''' is the text for the (optional) label. | ||
* ''''' | * '''''message''''' is the text for the (recommended) message. | ||
* ''''' | * '''''color''''' determines the color used for the message background. The following built-in colors are available, custom colors can be defined by entering a hex color code: | ||
** brightgreen | |||
** green | |||
** | ** yellowgreen | ||
** | ** yellow | ||
** | ** orange | ||
** | ** red | ||
** | ** blue | ||
** | ** lightgrey | ||
** | ** blueviolet | ||
** | ** success | ||
** | ** important | ||
** critical | |||
** informational | |||
** inactive | |||
==Examples== | |||
'''Code:''' (note %20 for spaces) | |||
<pre>{{User:Evertiro/Shields|label=Hi!|message=I'm%20a%20shield.|color=blue}}</pre> | |||
'''Result:''' | |||
{{User:Evertiro/Shields|label=Hi!|message=I'm%20a%20shield.|color=blue}} | |||
</noinclude> |
Revision as of 18:30, June 1, 2019
Purpose & Usage
This template provides a simple means to render custom scalable tags for use when applicable. Note that spaces must be url-safe, meaning that you must replace spaces with %20 (see examples).
Parameters:
- label is the text for the (optional) label.
- message is the text for the (recommended) message.
- color determines the color used for the message background. The following built-in colors are available, custom colors can be defined by entering a hex color code:
- brightgreen
- green
- yellowgreen
- yellow
- orange
- red
- blue
- lightgrey
- blueviolet
- success
- important
- critical
- informational
- inactive
Examples
Code: (note %20 for spaces)
{{User:Evertiro/Shields|label=Hi!|message=I'm%20a%20shield.|color=blue}}
Result: <img src="https://img.shields.io/badge/Hi!-I'm%20a%20shield.-blue.svg" style="vertical-align: middle" />