Diferencia entre revisiones de «Plantilla:Icono moneda»
De Inkipedia
(Added Golden Egg) |
(Reinventing the wheel is my specialty. And it was my wheel!) |
||
Línea 1: | Línea 1: | ||
{{ | <includeonly>{{User:GuyPerfect/BoxLabel| | ||
[[File:{{#switch:{{#if:{{{currency|}}}|{{{currency}}}|cash}} | |||
|sss = Super Sea Snail.png | |sss = Super Sea Snail.png | ||
|pe = Power Egg.png | |pe = Power Egg.png | ||
|#default = Coins.png | |#default = Coins.png | ||
}}|{{{ | }}|{{{2|24px}}}|{{#switch:{{#if:{{{currency|}}}|{{{currency}}}|cash}} | ||
| | |sss = Super Sea Snails | ||
|pe = Power Eggs | |||
|#default = Cash | |||
}}|link={{#switch:{{#if:{{{currency|}}}|{{{currency}}}|cash}} | |||
|sss = Super Sea Snail | |sss = Super Sea Snail | ||
|pe = Power Egg | |pe = Power Egg | ||
|#default = Cash | |#default = Cash | ||
}} | }}]]{{#ifeq:{{{icononly|}}}|true||<span style="display: inline-block; text-align: right; {{#if:{{{width|}}}|width: {{{width}}};}}"> [[{{#switch:{{#if:{{{currency|}}}|{{{currency}}}|cash}} | ||
|width | |sss = Super Sea Snail | ||
| | |pe = Power Egg | ||
}}<noinclude> | |#default = Cash | ||
}}|{{{1}}}]]</span>}} | |||
}}</includeonly><noinclude> | |||
__NOTOC__ | |||
Displays an inline currency icon with a text link. | |||
=== Parameters === | |||
{| | |||
|- style="vertical-align: top;" | |||
|<code>price</code>||Unnamed.||The numeric price to display. | |||
|- style="vertical-align: top;" | |||
|<code>size</code>||Unnamed, optional.||A MediaWiki image size value to use for the icon. The default size is 24px. | |||
|- style="vertical-align: top;" | |||
|<code>currency</code>||Optional.||The type of currency to display. The default value is "cash". Must be one of the following: | |||
* [[File:Coins.png|20px|Cash|link=Cash]] cash | |||
* [[File:Power Egg.png|20px|Power Eggs|link=Power Egg]] pe | |||
* [[File:Super Sea Snail.png|20px|Super Sea Snails|link=Super Sea Snail]] sss | |||
|- style="vertical-align: top;" | |||
|<code>icononly</code>||Optional.||If present and set to <code>true</code>, the text label will be omitted. | |||
|- style="vertical-align: top;" | |||
|<code>width</code>||Optional.||A CSS width value to use for the text label. The text itself will be right-aligned. | |||
|} | |||
=== Examples === | |||
==== Markup ==== | |||
<nowiki>{{Cost|200}}<br /> | |||
{{Cost|200|48px}}<br /> | |||
{{Cost|200|currency=pe}}<br /> | |||
{{Cost|currency=sss|icononly=true}}<br /> | |||
{{Cost|200|width=50px}}</nowiki> | |||
==== Output ==== | |||
{{User:GuyPerfect/Cost|200}}<br /> | |||
{{User:GuyPerfect/Cost|200|48px}}<br /> | |||
{{User:GuyPerfect/Cost|200|currency=pe}}<br /> | |||
{{User:GuyPerfect/Cost|currency=sss|icononly=true}}<br /> | |||
{{User:GuyPerfect/Cost|200|width=50px}} | |||
</noinclude> | </noinclude> |
Revisión del 04:11 1 ago 2017
Displays an inline currency icon with a text link.
Parameters
price |
Unnamed. | The numeric price to display. |
size |
Unnamed, optional. | A MediaWiki image size value to use for the icon. The default size is 24px. |
currency |
Optional. | The type of currency to display. The default value is "cash". Must be one of the following:
|
icononly |
Optional. | If present and set to true , the text label will be omitted.
|
width |
Optional. | A CSS width value to use for the text label. The text itself will be right-aligned. |
Examples
Markup
{{Cost|200}}<br /> {{Cost|200|48px}}<br /> {{Cost|200|currency=pe}}<br /> {{Cost|currency=sss|icononly=true}}<br /> {{Cost|200|width=50px}}
Output
Usuario:GuyPerfect/Cost
Usuario:GuyPerfect/Cost
Usuario:GuyPerfect/Cost
Usuario:GuyPerfect/Cost
Usuario:GuyPerfect/Cost