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

Материал из Guild Wars 2 wiki
Перейти к: навигация, поиск
 
(не показаны 4 промежуточные версии этого же участника)
Строка 2: Строка 2:
 
{{#vardefine:smw_icon|{{#show:{{{1|}}}|?Has game icon|link=none|default=File:Trait.png}}}}
 
{{#vardefine:smw_icon|{{#show:{{{1|}}}|?Has game icon|link=none|default=File:Trait.png}}}}
 
{{#vardefine:smw_name|{{#show:{{{1|}}}|?Has canonical name|default={{{1|Trait}}}}}}}
 
{{#vardefine:smw_name|{{#show:{{{1|}}}|?Has canonical name|default={{{1|Trait}}}}}}}
{{#vardefine:smw_line|{{#show:{{{1|}}}|?Is in trait line|default={{#var:smw_name}}}}}}
+
}}<span {{#ifexpr: {{{size|25}}} > 25||class="inline-icon"}}>[[{{#var:smw_icon}}|{{{size|25}}}px|class=inline-icon-addition|link={{{1}}}|{{{2|{{{1}}}}}}]]</span>&nbsp;[[{{{1|Trait}}}|{{{2|{{rus lang|specialization|{{#var:smw_name}}}}}}}]]</includeonly><noinclude>
}}<span {{#ifexpr: {{{size|25}}} > 25||class="inline-icon"}}>[[{{#var:smw_icon}}|{{{size|25}}}px|class=inline-icon-addition|link={{{1}}}|{{{2|{{#var:smw_line}}}}}]]</span>&nbsp;[[{{{1|Trait}}}|{{{2|{{#var:smw_name}}}}}]]</includeonly><noinclude>
 
  
 
== Description ==
 
== Description ==
 
<pre>{{trait icon|<trait name>}}</pre>
 
<pre>{{trait icon|<trait name>}}</pre>
  
Displays a link to the trait name (canonical name) and the trait tier icon. The tooltip of the icon displays the trait line and the tooltip of the link displays the article name.
+
Displays a link to the trait name (canonical name) and the trait icon. The tooltips display the article name.
  
 
=== Parameters ===
 
=== Parameters ===

Текущая версия на 02:12, 5 сентября 2021


Description[править]

{{trait icon|<trait name>}}

Displays a link to the trait name (canonical name) and the trait icon. The tooltips display the article name.

Parameters[править]

unnamed parameter 1
Trait name. Defaults to "Trait".
unnamed parameter 2
Link text. Defaults to canonical name.
size
Size of icon to display, in px. Defaults to "25" px.

Examples[править]

  • Persisting Flames Persisting Flames is produced from {{trait icon|Persisting Flames}}
  • Zephyr's Speed (ranger) Zephyr's Speed is produced from {{trait icon|Zephyr's Speed (ranger)}}
  • ZOOM! ZOOM! is produced from {{trait icon|Zephyr's Speed (ranger)|ZOOM!}}
  • Example Example is produced from {{trait icon|Nonexistent page|Example}}