Template:Infobox role: Difference between revisions
Create role infobox template |
m Remove empty line |
||
Line 5: | Line 5: | ||
| image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{{image_size|{{{photo-size|}}}}}}|sizedefault=frameless|alt={{{alt|}}}}} | | image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{{image_size|{{{photo-size|}}}}}}|sizedefault=frameless|alt={{{alt|}}}}} | ||
| caption = {{{caption|}}} | | caption = {{{caption|}}} | ||
| label1 = Role Color | | label1 = Role Color | ||
| data1 = {{{role_color|{{{role color|}}}}}} | | data1 = {{{role_color|{{{role color|}}}}}} |
Revision as of 00:12, 2 October 2020
}}} | subheader = | subheaderstyle = line-height:12px; background-color:#{{{role color}}}; border: 0.1px solid #000000 | image = | caption = | label1 = Role Color | data1 = | label2 = Anyone can Mention | data2 = | label3 = Obtainable | data3 = }}</includeonly>
![]() | This template uses Lua: |
Usage
The following is the base code required to generate an infobox. One can copy and paste the base code into an article and insert relevant information in front of the "=" signs. Removing HTML comments ("<!--", "-->" and anything between these two) is optional. To avoid accidental misuse, this base code does not have a handful of parameters that must be handled with absolute care and are not normally needed, such as {{{bodystyle}}}
.
{{{title}}} | |
---|---|
[[File:{{{image}}}|frameless|alt={{{alt}}}]] {{{caption}}} | |
Role Color | {{{role color}}} |
Anyone can Mention | {{{mentionable}}} |
Obtainable | {{{obtainable}}} |
{{Infobox role
| title =
| image =
| alt =
| caption =
| created = <!-- {{start date and age|YYYY|MM|DD}} -->
| role color = <!-- RRGGBB -->
| mentionable = <!-- Yes/No -->
| obtainable = <!-- Yes/No -->
| id =
}}
Example
Wiki Nerd | |
---|---|
Role Color | f09727 |
Anyone can Mention | No |
Obtainable | Yes |
{{Infobox role | title = Wiki Nerd | created = {{start date and age|2020|09|25}} | role color = f09727 | mentionable = No | obtainable = Yes | id = 759189017035800646 }}
Parameters
All parameters are optional.
- title
- Name of the infobox.
- Attention: Please do not include a wikilink, Wikipedia:hyperlink or image in this parameter. This parameter should be composed of pure text.
- image
- Code for a small image to be displayed as roles's icon. You may specify a file name, with or without namespace prefix. In other words, the following examples are all acceptable:
- The GIMP icon - gnome.svg
- File:The GIMP icon - gnome.svg
- alt
- Alternative text of the image; very important.
- caption
- Caption of the image that appears below it. Should not be used to provide trivial captions, such as "This is the logo of X", which is automatically assumed. Reserved for special cases when a description beyond telling the obvious is needed, or for inserting {{ffdc}} or {{deletable image-caption}}.
- created
- The date the role was created, if known.
- The content of this field should look like the following:
{{Start date and age|year|month|day}}
- In case the article uses DMY as date format, use this code instead:
{{Start date and age|year|month|day|df=yes}}
- If you are unsure which date format to use, please consult Wikipedia:WP:MOSDATES.
- role color
- The color the role displays as, in hex triplet format. Omit the #
- mentionable
- Whether or not the role can be mentioned by everyone. Format as Yes or No.
- obtainable
- Whether specific steps can be taken to obtain the role. Format as Yes or No.
- id
- The ID of the role. Used for linking to the appropriate page on the main site.