Template:equip name: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Changed the way the image is handled (workaround) |
||
Line 1: | Line 1: | ||
<includeonly><small style="margin-right: 3px;">{{#if:{{{2|}}}|{{#if:{{{3|}}}|<sup> | <includeonly><small style="margin-right: 3px;">{{#if:{{{2|}}}|{{#if:{{{3|}}}|<sup>{{#widget:LayoutImage|src={{filepath:Icon_{{{2|}}}_S_{{{3|}}}star.png|20}}|class=type-icon}}</sup>}}}}</small>[[{{{1|}}}|<span class="equipname" style="color:{{#ifeq:{{{3|}}}|2|#ccc}}{{#ifeq:{{{3|}}}|3|#6BDFCE}}{{#ifeq:{{{3|}}}|4|#D6E35A}}{{#ifeq:{{{3|}}}|5|#FFCD4A}}; text-shadow: 0px 0px 3px {{#ifeq:{{{3|}}}|2|#ccc}}{{#ifeq:{{{3|}}}|3|#6BDFCE}}{{#ifeq:{{{3|}}}|4|#D6E35A}}{{#ifeq:{{{3|}}}|5|#FFCD4A}};display:inline-block">{{{1|?}}}</span>]]</includeonly><noinclude>{{Documentation}}</noinclude> | ||
{{ | |||
</noinclude> |
Revision as of 21:20, 21 July 2024
Template for displaying an equipment name with proper colouring and a (optional) a small icon
Parameter | Description | Type | Status | |
---|---|---|---|---|
Equipment name | 1 | no description
| Page name | required |
Equipment Type | 2 | The type of the equipment.
| String | optional |
Rarity | 3 | The equipment rarity (number between 2 and 5 inclusive)
| Number | required |
Usage
See the template's testcases:
Usual call | |
---|---|
Wiki code | {{equip name|P22 Laser Sight|Silencer|4}} |
Main version | P22 Laser Sight |
Sandbox version | P22 Laser Sight |
Call within text | |
---|---|
Wiki code | Hello, I'm a text. {{equip name|P22 Laser Sight|Silencer|4}} is a good equipment. |
Main version | Hello, I'm a text. P22 Laser Sight is a good equipment. |
Sandbox version | Hello, I'm a text. P22 Laser Sight is a good equipment. |
Call without type. | |
---|---|
Wiki code | Hello, I'm a text. {{equip name|P22 Laser Sight||4}} is a good equipment. |
Main version | Hello, I'm a text. P22 Laser Sight is a good equipment. |
Sandbox version | Hello, I'm a text. P22 Laser Sight is a good equipment. |
The above documentation is transcluded from Template:equip name/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |