Template:Role/doc: Difference between revisions

From Irony Wiki
Jump to navigation Jump to search
documentate
 
No edit summary
 
Line 5: Line 5:


* <code>name</code> - The name of the role. This will be the text that will appear in the template.
* <code>name</code> - The name of the role. This will be the text that will appear in the template.
* <code>color</code> - The color of the role. Can be a hex code (you must include the #) or any other [https://developer.mozilla.org/en-US/docs/Web/CSS/color_value valid CSS color value]. If not specified, defaults to ''#b9bbbe'' (the default Discord role color).
* <code>color</code> - The color of the role. Can be a hex code (you must include the #) or any other [https://developer.mozilla.org/en-US/docs/Web/CSS/color_value valid CSS color value]. If not specified, defaults to ''#c4c9ce'' (the default appearance for non-colored roles).
* <code>dark-background=</code> - 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).
* <code>dark-background=</code> - 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).


Line 30: Line 30:
"description": "The color of the role. Can be a hex code (you must include the #, e.g. #ff7f00) or any other valid CSS color value.",
"description": "The color of the role. Can be a hex code (you must include the #, e.g. #ff7f00) or any other valid CSS color value.",
"type": "string",
"type": "string",
"default": "#b9bbbe",
"default": "#c4c9ce",
"suggested": true
"suggested": true
},
},

Latest revision as of 06:18, 14 January 2024

This template displays a role in the same style Discord does when you click on a user. Like this

Parameters[edit source]

{{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[edit source]

{{role|Was it worth it?|#eb2d37}}

outputs:

Was it worth it?

TemplateData[edit source]

Displays a role in the same style that Discord uses when you click on a user.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Role name1

The name of the role. This will be the text that will appear.

Example
Was it worth it?
Stringrequired
Color2

The color of the role. Can be a hex code (you must include the #, e.g. #ff7f00) or any other valid CSS color value.

Default
#c4c9ce
Stringsuggested
Dark backgrounddark-background

Set this to "yes" to change the background color of the template to the dark color used on Discord profiles.

Example
yes
Stringoptional