Шаблон:Game update icon — различия между версиями
Материал из Guild Wars 2 wiki
Blood (обсуждение | вклад) (Новая страница: «<includeonly>{{#show: {{{1|}}} | ?Has context | ?Has game icon | ? | ?Has canonical name | link = none | format = template | template = Game update icon result fo…») |
Blood (обсуждение | вклад) |
||
(не показаны 3 промежуточные версии этого же участника) | |||
Строка 1: | Строка 1: | ||
− | <includeonly>{{#show: {{{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 | ||
Строка 5: | Строка 5: | ||
| ?Has canonical name | | ?Has canonical name | ||
| link = none | | link = none | ||
+ | | userparam = {{{1|}}} | ||
| format = template | | format = template | ||
− | | template = Game update icon result format | + | | template = Game update icon result format{{!}}name={{{2|}}} |
− | }}</includeonly><noinclude> | + | | default=[[{{{1|}}}]] |
− | A template that provides skill and trait icons for game update pages. | + | }}{{#if: {{{note|}}}|<span>:</span> {{{note|}}}{{increment|notect}}{{#subobject:note{{#var:notect}} |
+ | |Has game update context page={{PAGENAME}} | ||
+ | |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 == | ||
− | <pre>{{Game update icon | + | <pre>{{Game update icon|<page name>}}</pre> |
=== Parameters === | === Parameters === | ||
;1 ''(unnamed parameter)'' | ;1 ''(unnamed parameter)'' | ||
:skill or trait page name. | :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 ([[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 == | ||
Строка 27: | Строка 42: | ||
// Scripts to use when viewing game updates | // Scripts to use when viewing game updates | ||
if (mw.config.get('wgPageName').substring(0, 12) == 'Game_updates') { | if (mw.config.get('wgPageName').substring(0, 12) == 'Game_updates') { | ||
− | $('li .skillicon, li .traiticon').each(function(){ | + | $('li .skillicon, li .effecticon, li .traiticon').each(function(){ |
$(this).parent('li').addClass('patchnote'); | $(this).parent('li').addClass('patchnote'); | ||
}); | }); |
Текущая версия на 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; }