Шаблон:Game update icon — различия между версиями
Материал из Guild Wars 2 wiki
Blood (обсуждение | вклад) |
Blood (обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
− | <includeonly>{{#if: {{{icon|}}} | {{Game update icon result format|Skill|File:{{{icon}}}|{{{1}}}|{{{ | + | <includeonly>{{#if: {{{icon|}}} | {{Game update icon result format|Skill|File:{{{icon}}}|{{{1}}}|{{{2|{{{1}}}}}}}} | {{#show: {{{1|}}} |
| ?Has context | | ?Has context | ||
| ?Has game icon | | ?Has game icon | ||
Строка 9: | Строка 9: | ||
| template = Game update icon result format{{!}}name={{{2|}}} | | template = Game update icon result format{{!}}name={{{2|}}} | ||
| default=[[{{{1|}}}]] | | default=[[{{{1|}}}]] | ||
− | }} | + | }}{{#if: {{{note|}}}|<span>:</span> {{{note|}}}{{increment|notect}}{{#subobject:note{{#var:notect}} |
− | }}</includeonly><noinclude> | + | |Has game update context page={{PAGENAME}} |
− | A template that provides skill and trait icons for game update pages. Format template: {{tl|Game update icon result format}}. | + | |Has game update page={{{1|}}} |
+ | |Has game update note={{{note|}}} | ||
+ | }}}}}}</includeonly><noinclude> | ||
+ | == Description == | ||
+ | A template that provides skill and trait icons for game update pages. Furthermore, allows to set game update "note" which then can be substituted by {{tl|Game update helper}}. Format template: {{tl|Game update icon result format}}. | ||
== Usage == | == Usage == | ||
Строка 23: | Строка 27: | ||
;icon | ;icon | ||
:Optional. Specify a valid filename without the "File:" prefix. | :Optional. Specify a valid filename without the "File:" prefix. | ||
− | ; | + | ;note |
− | :Optional. | + | :Optional. Displays the game update note and creates a subobject ([[Property:Has game update context page|Has game update context page]]=Game updates/<date> and [[Property:Has game update page|Has game update page]]=skill or trait page) which sets the property [[Property:Has game update note|Has game update note]]. |
== Example == | == Example == | ||
<pre>{{Game update icon|Retribution (trait)}}</pre> | <pre>{{Game update icon|Retribution (trait)}}</pre> | ||
+ | {{Game update icon|Retribution (trait)}} | ||
− | {{Game update icon|Retribution (trait)}} | + | <pre>{{Game update icon|Retribution (trait)|note=This trait no longer grants bonus ferocity.}}</pre> |
+ | {{Game update icon|Retribution (trait)|note=This trait no longer grants bonus ferocity.}} | ||
== Notes == | == Notes == |
Текущая версия на 09:58, 13 октября 2019
Содержание
Description[править]
A template that provides skill and trait icons for game update pages. Furthermore, allows to set game update "note" which then can be substituted by {{Game update helper}}. Format template: {{Game update icon result format}}.
Usage[править]
{{Game update icon|<page name>}}
Parameters[править]
- 1 (unnamed parameter)
- skill or trait page name.
- 2 (unnamed parameter)
- Optional. Displayed skill or trait name. This one may differ from the page name, for example upper-/lowercase mistakes in the game update notes.
- icon
- Optional. Specify a valid filename without the "File:" prefix.
- note
- Optional. Displays the game update note and creates a subobject (Has game update context page=Game updates/<date> and Has game update page=skill or trait page) which sets the property Has game update note.
Example[править]
{{Game update icon|Retribution (trait)}}Retribution
{{Game update icon|Retribution (trait)|note=This trait no longer grants bonus ferocity.}}Retribution: This trait no longer grants bonus ferocity.
Notes[править]
- Implementation supported with the following lines in MediaWiki:Common.js:
// Scripts to use when viewing game updates if (mw.config.get('wgPageName').substring(0, 12) == 'Game_updates') { $('li .skillicon, li .effecticon, li .traiticon').each(function(){ $(this).parent('li').addClass('patchnote'); }); }
- And also supported with the following lines in MediaWiki:Common.css:
.patchnote { line-height: 2.7em; } .patchnote .skillicon img, .patchnote .traiticon img { background-color: black; }