Шаблон:Currency — различия между версиями

Материал из Guild Wars 2 wiki
Перейти к: навигация, поиск
 
 
Строка 1: Строка 1:
{{#switch:{{lc:{{{2|}}}}}
+
<includeonly>{{#switch:{{lc:{{{2|}}}}}
 
| coin = {{coin|{{{1|}}}|{{{3|}}}}}
 
| coin = {{coin|{{{1|}}}|{{{3|}}}}}
 
| copper = {{copper|{{{1|}}}}}
 
| copper = {{copper|{{{1|}}}}}
Строка 11: Строка 11:
 
| karma = {{karma|{{{1|}}}}}
 
| karma = {{karma|{{{1|}}}}}
 
| supply = {{supply|{{{1|}}}}}
 
| supply = {{supply|{{{1|}}}}}
| #default = <div class="inline-icon">{{#if:{{{1|}}}|{{formatnum:{{{1}}}}}&nbsp;}}[[File:{{{icon|{{{2}}}.png}}}|20px|link={{{2|}}}]]</div>
+
| laurel = {{laurel|{{{1|}}}}}
}}<noinclude>
+
| spirit shard = {{spirit shard|{{{1|}}}}}
 
+
| #default = <div class="inline-icon">{{#if:{{{1|}}}|{{formatnum:{{{1}}}}}&nbsp;}}{{#if:{{{icon|}}}|[[File:{{{icon}}}|20px|link={{{2|}}}]]|[[{{#show:{{{2}}}|?Has game icon|link=none|default=File:Skill.png}}|20px|link={{{2|}}}]]}}{{#if: {{{text|}}} | &nbsp;[[{{{2}}}]] }}</div>
 +
}}</includeonly><noinclude>
  
 
== Usage ==
 
== Usage ==
Строка 28: Строка 29:
 
: Name of the currency article. This is the article the icon links to.
 
: Name of the currency article. This is the article the icon links to.
 
;icon
 
;icon
: The file to use as the icon, include the extension. Defaults to {{{1}}}.png.
+
: The file to use as the icon, include the extension. Defaults to {{{2}}}.png.
 +
;text
 +
: Optional. If set, this parameter will display the name of the item. Only works for irregular currencies not listed below.
  
 
==Currencies==
 
==Currencies==
Строка 55: Строка 58:
 
|-
 
|-
 
| Laurel || <code><nowiki>{{laurel}}</nowiki></code> || {{laurel}}
 
| Laurel || <code><nowiki>{{laurel}}</nowiki></code> || {{laurel}}
 +
|-
 +
| Spirit Shard || <code><nowiki>{{spirit shard}}</nowiki></code> || {{spirit shard}}
 +
|-
 +
| Guild Commendation || <code><nowiki>{{guild commendation}}</nowiki></code> || {{guild commendation}}
 
|}
 
|}
  

Текущая версия на 16:45, 3 апреля 2018


Usage[править]

This template creates an icon for the type of currency. Each currency is defined in a separate template. This template is not meant to be use directly if the currency is defined in its own template. If the currency isn't defined, a default currency icon is generated.

{{currency|<Value>|<Currency>}}
{{currency|<Value>|<Currency>|icon=<Icon>}}

Parameters[править]

Unnamed parameter 1
Value of currency to prefix to the icon.
Unnamed parameter 2
Name of the currency article. This is the article the icon links to.
icon
The file to use as the icon, include the extension. Defaults to {{{2}}}.png.
text
Optional. If set, this parameter will display the name of the item. Only works for irregular currencies not listed below.

Currencies[править]

Currency Code Icon
Coin {{coin}} Медная монета
Copper {{copper}} Медная монета
Silver {{silver}} Серебряная монета
Gold {{gold}} Золотая монета
Experience {{experience}}
Experience.png
Gem {{gem}} Gem.png
Glory {{glory}} Glory.png
Influence {{influence}} Influence
Karma {{karma}} Karma.png
Supply {{supply}} Supply.png
Laurel {{laurel}} Laurel.png
Spirit Shard {{spirit shard}} Spirit Shard.png
Guild Commendation {{guild commendation}} Шаблон:Guild commendation

Examples[править]

Currency Code Icon
Coin {{currency|123|coin}} Серебряная монета 23 Медная монета
Glob of Ectoplasm {{currency|5|Glob of Ectoplasm}}
Glob of Ectoplasm.png
Any text; specific icon {{currency|5|Any text; specific icon|icon=Karma.png}}
Karma.png