Template:Role: Difference between revisions
Jump to navigation
Jump to search
m switch to {{yesno}} |
No edit summary |
||
Line 1: | Line 1: | ||
<span style="box-sizing: border-box; display: inline-flex; vertical-align: middle; align-items: center; height: 1.65em; padding: 0.3em; border: 1px solid {{{2|#b9bbbe}}}; border-radius: 0.825em; {{#if: {{yesno|{{{dark-background|}}}}}|background-color: #18191c;}}"><span style="width: 0.9em; height: 0.9em; padding: 0; margin-right: 4px; border-radius: 50%; background-color: {{{2|#b9bbbe}}};"></span><span style="margin: 0; font-size: 0.9em; line-height: 1; {{#if: {{yesno|{{{dark-background|}}}}}|background-color: #18191c;}}">{{{1}}}</span></span><noinclude>{{documentation}}</noinclude> | <span style="box-sizing: border-box; display: inline-flex; vertical-align: middle; align-items: center; height: 1.65em; padding: 0.3em; border: 1px solid {{{2|#b9bbbe}}}; border-radius: 0.825em; {{#if: {{yesno|{{{dark-background|}}}}}|background-color: #18191c;}}"><span style="width: 0.9em; height: 0.9em; padding: 0; margin-right: 4px; border-radius: 50%; background-color: {{{2|#b9bbbe}}};"></span><span style="margin: 0; font-size: 0.9em; line-height: 1; {{#if: {{yesno|{{{dark-background|}}}}}|background-color: #18191c; color: #ffffff}}">{{{1}}}</span></span><noinclude>{{documentation}}</noinclude> |
Revision as of 16:46, 9 June 2021
{{{1}}}
This template displays a role in the same style Discord does when you click on a user. Like this
Parameters
{{role|name|color|dark-background=yes}}
name
- The name of the role. This will be the text that will appear in the template.color
- The color of the role. Can be a hex code (you must include the #) or any other valid CSS color value. If not specified, defaults to #c4c9ce (the default appearance for non-colored roles).dark-background=
- Set this to "yes" to change the background color of the template to the dark color used on Discord profiles. Otherwise, the background will remain white (or whatever color the surrounding background is).
Example
{{role|Was it worth it?|#eb2d37}}
outputs:
Was it worth it?
TemplateData
Displays a role in the same style that Discord uses when you click on a user.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Role name | 1 | The name of the role. This will be the text that will appear.
| String | required |
Color | 2 | The color of the role. Can be a hex code (you must include the #, e.g. #ff7f00) or any other valid CSS color value.
| String | suggested |
Dark background | dark-background | Set this to "yes" to change the background color of the template to the dark color used on Discord profiles.
| String | optional |