Template:Gear: Difference between revisions

From Inkipedia, the Splatoon wiki
m (Updated documentation to reflect the previous change and fixed a small bug with it.)
(making into module invocation (stand back, I'm trying science))
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>[[File:{{{1}}}_Gear_{{{2}}}_{{{3}}}.png|{{#iferror:{{#expr:{{{4|24}}}}}|24}}px|link={{{3}}}]]{{#ifeq:{{{4}}}|icononly||{{#ifeq:{{{5}}}|icononly||&#32;[[{{{3}}}]]}}}}</includeonly><noinclude>
<includeonly>{{#invoke:Gear|main}}</includeonly><noinclude>
Displays an inline [[gear]] item icon with a text link.
Template invocation of [[Module:Gear]].


== Parameters ==
{{:Module:Gear/doc}}
<code><nowiki>{{Gear|game|category|name|size|icononly}}</nowiki></code>
{| class="wikitable"
|- style="vertical-align: top;"
|<code>game</code>||Unnamed, required.||The game that the item belongs to. Must be one of the following:
*<code>S</code> for Splatoon
*<code>S2</code> for Splatoon 2
|- style="vertical-align: top;"
|<code>category</code>||Unnamed, required.||The type of gear. Must be one of the following:
*<code>Headgear</code>
*<code>Clothing</code>
*<code>Shoes</code>
|- style="vertical-align: top;"
|<code>name</code>||Unnamed, required.||The English name of the item.
|- style="vertical-align: top;"
|<code>size</code>||Unnamed, optional.||The pixel width for the icon. The default size is 24px.
|- style="vertical-align: top;"
|<code>icononly</code>||Unnamed, optional.||If present, the text label will be omitted.
|}
 
== Examples ==
=== Input ===
<pre>{{Gear|S|Clothing|Basic Tee}}
 
{{Gear|S|Clothing|Basic Tee|64}}
 
{{Gear|S|Clothing|Basic Tee|64|icononly}}
 
{{Gear|S|Clothing|Basic Tee|icononly}}
 
{{Gear|S2|Clothing|Basic Tee|64|icononly}}</pre>
 
=== Output ===
{{Gear|S|Clothing|Basic Tee}}
 
{{Gear|S|Clothing|Basic Tee|64}}
 
{{Gear|S|Clothing|Basic Tee|64|icononly}}
 
{{Gear|S|Clothing|Basic Tee|icononly}}
 
{{Gear|S2|Clothing|Basic Tee|64|icononly}}
 
[[Category:Templates]]
</noinclude>
</noinclude>

Latest revision as of 15:59, 4 September 2023

Template invocation of Module:Gear.

Displays an inline gear item icon with a text link.

Usage

{{Gear|<game>|<category>|<name>|<size>|<icononly>}}

Parameters

Parameter Type Status Description
game Named or unnamed (first positional) Optional, defaults to S The game that the item belongs to. Must be one of the following:
  • S for Splatoon
  • S2 for Splatoon 2
  • S3 for Splatoon 3
category Named or unnamed (second positional) Optional, defaults to Headgear The type of gear. Must be one of the following:
  • Headgear
  • Clothing
  • Shoes
name Named or unnamed (third positional) Optional, defaults to White Headband The English name of the item.
size Named or unnamed (fourth positional) Optional The pixel width for the icon. The default size is 24px.
icononly Named or unnamed (fourth or fifth positional) Optional If present, the text label will be omitted.
mio Named only Optional For manually overriding the icon with a different filename. This parameter is particularly helpful when an icon is missing and needs a temporary placeholder. 'mio' stands for manual icon override.

Examples

Markup

* {{Gear}}
* {{Gear|S|Clothing|Basic Tee}}
* {{Gear|S2|Clothing|Basic Tee|64}}
* {{Gear|S3|Clothing|Basic Tee|200px}}
* {{Gear|S|Clothing|Basic Tee|64|icononly}}
* {{Gear|S|Clothing|Basic Tee|icononly}}
* {{Gear|S2|Clothing|Basic Tee|64|icononly}}
* {{Gear|S|Shoes|Cream Basics|256|mio=S2 Gear Shoes Cream Basics.png}}

Output