Modèle:Icon/doc
This template can be used to display one or more platform icons.
Can currently display icons for Desktop, Console, Japan Console, Old-gen Console, Mobile, and 3DS.
Will also add others like Xbox, PS3, etc.
NOTE: If you only want to display a single platform icon, say, desktop, you can use {{icon|desktop}}, of course; but if in a performance-sensitive context (such as used in other templates), you can use {{icon/desktop}} / {{icon/console}} / {{icon/japan}} / {{icon/old-gen}} / {{icon/mobile}} / {{icon/3ds}} directly. In addition, this also allows you to have full control over the icon size.
Usage
{{icon
|icon (can be multiple and duplicate) : desktop/dsk, console/cns, japan/jas, old-gen/oldgen/old, mobile/mbl, 3ds/3DS (case insensitive). The display order is in the input order.
|nl=y or nolink=y : optional, icons will not be linked
|small=y : optional, each icon will be smaller than normal
}}
The order of unnamed parameters is irrelevant.
All Valid Icons
Parameters are case insensitive. List only in lowercase.
Template pages:
Example
How to Add New Icon Types
Only need to create a corresponding Template:icon/[icontype]
(Its content can refer to {{icon/desktop}}). If you need to allow multiple valid parameters for it, use redirection.
For example, say, want to add a new ios icon type:
- Create
Template:icon/ios
(similar to {{icon/desktop}}).Note: Template name must use lowercase(e.g. Template:icon/ios, not Template:icon/IOS or Template:icon/Ios). That's all. Now we can use{{icon|ios}}
to display a ios icon. - If you want to add a new alias parameter for it, for example, you want to allow display a ios icon by using
{{icon|iphone}}
, just create a redirect pageTemplate:icon/iphone
, and set its redirect target toTemplate:icon/ios
.