Template:Skill icon: Difference between revisions

From FHX Wiki
No edit summary
 
(28 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>[[File:{{{1}}} icon.png|{{#switch:{{{2}}}|big=50|huge=100|#default=32}}px|link={{{1}}}]] [[{{{1}}}]]</includeonly><noinclude>
<includeonly>{{#if:{{{3|}}}|{{exists|page=File:{{{3}}} icon.png|then=[[File:{{{3}}} icon.png|{{#switch:{{{2}}}|big=50|huge=100|#default=32}}px|link={{#if:{{{3|}}}|{{{3}}}|{{{1}}}}}]] [[{{#if:{{{3|}}}|{{{3}}}{{!}}{{{1}}}|{{{1}}}}}]]|else={{exists|page=File:{{{3}}} icon.gif|then=[[File:{{{3}}} icon.gif|{{#switch:{{{2}}}|big=50|huge=100|#default=32}}px|link={{#if:{{{3|}}}|{{{3}}}|{{{1}}}}}]] [[{{#if:{{{3|}}}|{{{3}}}{{!}}{{{1}}}|{{{1}}}}}]]|else={{exists|page=File:{{{1}}} icon.png|then=[[File:{{{1}}} icon.png|{{#switch:{{{2}}}|big=50|huge=100|#default=32}}px|link={{#if:{{{3|}}}|{{{3}}}|{{{1}}}}}]] [[{{#if:{{{3|}}}|{{{3}}}{{!}}{{{1}}}|{{{1}}}}}]]|else={{exists|page=File:{{{1}}} icon.gif|then=[[File:{{{1}}} icon.gif|{{#switch:{{{2}}}|big=50|huge=100|#default=32}}px|link={{#if:{{{3|}}}|{{{3}}}|{{{1}}}}}]] [[{{#if:{{{3|}}}|{{{3}}}{{!}}{{{1}}}|{{{1}}}}}]]|else=[[File:missing icon.png|{{#switch:{{{2}}}|big=50|huge=100|#default=32}}px|link={{#if:{{{3|}}}|{{{3}}}|{{{1}}}}}]] [[{{#if:{{{3|}}}|{{{3}}}{{!}}{{{1}}}|{{{1}}}}}]]}}}}}}}}|{{exists|page=File:{{{1}}} icon.png|then=[[File:{{{1}}} icon.png|{{#switch:{{{2}}}|big=50|huge=100|#default=32}}px|link={{#if:{{{3|}}}|{{{3}}}|{{{1}}}}}]] [[{{#if:{{{3|}}}|{{{3}}}{{!}}{{{1}}}|{{{1}}}}}]]|else={{exists|page=File:{{{1}}} icon.gif|then=[[File:{{{1}}} icon.gif|{{#switch:{{{2}}}|big=50|huge=100|#default=32}}px|link={{#if:{{{3|}}}|{{{3}}}|{{{1}}}}}]] [[{{#if:{{{3|}}}|{{{3}}}{{!}}{{{1}}}|{{{1}}}}}]]|else=[[File:missing icon.png|{{#switch:{{{2}}}|big=50|huge=100|#default=32}}px|link={{#if:{{{3|}}}|{{{3}}}|{{{1}}}}}]] [[{{#if:{{{3|}}}|{{{3}}}{{!}}{{{1}}}|{{{1}}}}}]]}}}}}}</includeonly><noinclude>
== Description ==
== Description ==
<pre>{{skill icon|<skill name>}}</pre>
<pre>{{skill icon|<skill name>|<size>|<alternate page link>}}</pre>


Displays a link to the skill and adds a skill icon in front of it.
Displays a link to the skill and adds a skill icon in front of it.
Line 10: Line 10:
;2 ''(unnamed parameter)''
;2 ''(unnamed parameter)''
: Icon size. Options: "big" (48px), "huge" (100px), or, blank (32px) - which is the default size.
: Icon size. Options: "big" (48px), "huge" (100px), or, blank (32px) - which is the default size.
;3 ''(unnamed parameter)''
: Alternate page link. Include if skill needs disambiguation from another page (e.g. the Paladin Hammer skill should not link to the Hammer item page).


== Examples ==
== Examples ==
Line 15: Line 17:
* {{skill icon|Magic Defense|big}} is produced from <code><nowiki>{{skill icon|Magic Defense|big}}</nowiki></code>
* {{skill icon|Magic Defense|big}} is produced from <code><nowiki>{{skill icon|Magic Defense|big}}</nowiki></code>
* {{skill icon|Magic Defense|huge}} is produced from <code><nowiki>{{skill icon|Magic Defense|huge}}</nowiki></code>
* {{skill icon|Magic Defense|huge}} is produced from <code><nowiki>{{skill icon|Magic Defense|huge}}</nowiki></code>
* {{skill icon|Revive}} is produced from <code><nowiki>{{skill icon|Revive}}</nowiki></code>
* {{skill icon|Teleport}} is produced from <code><nowiki>{{skill icon|Teleport}}</nowiki></code>
* {{skill icon|Visit}} is produced from <code><nowiki>{{skill icon|Visit}}</nowiki></code>
* {{skill icon|Invite}} is produced from <code><nowiki>{{skill icon|Invite}}</nowiki></code>
* {{skill icon|Party Recall}} is produced from <code><nowiki>{{skill icon|Party Recall}}</nowiki></code>
* {{skill icon|Hammer||Hammer (skill)}} is produced from <code><nowiki>{{skill icon|Hammer||Hammer (skill)}}</nowiki></code>
* {{skill icon|Manufacture}} is produced from <code><nowiki>{{skill icon|Manufacture}}</nowiki></code>
* {{skill icon|Fire Bolt}} is produced from <code><nowiki>{{skill icon|Fire Bolt}}</nowiki></code>
* {{skill icon|Fire Bolt||Fire Bolt (summoner)}} is produced from <code><nowiki>{{skill icon|Fire Bolt||Fire Bolt (summoner)}}</nowiki></code>


TODO:  
[[Category:Icon templates]]
* Add {{#if}} to include article link or only icon.
* Import all skill icon image files (need to get export)
</noinclude>
</noinclude>

Latest revision as of 21:22, 16 April 2025

Description

{{skill icon|<skill name>|<size>|<alternate page link>}}

Displays a link to the skill and adds a skill icon in front of it.

Parameters

1 (unnamed parameter)
Skill name.
2 (unnamed parameter)
Icon size. Options: "big" (48px), "huge" (100px), or, blank (32px) - which is the default size.
3 (unnamed parameter)
Alternate page link. Include if skill needs disambiguation from another page (e.g. the Paladin Hammer skill should not link to the Hammer item page).

Examples

  • Magic Defense is produced from {{skill icon|Magic Defense}}
  • Magic Defense is produced from {{skill icon|Magic Defense|big}}
  • Magic Defense is produced from {{skill icon|Magic Defense|huge}}
  • Revive is produced from {{skill icon|Revive}}
  • Teleport is produced from {{skill icon|Teleport}}
  • Visit is produced from {{skill icon|Visit}}
  • Invite is produced from {{skill icon|Invite}}
  • Party Recall is produced from {{skill icon|Party Recall}}
  • Hammer is produced from {{skill icon|Hammer||Hammer (skill)}}
  • Manufacture is produced from {{skill icon|Manufacture}}
  • Fire Bolt is produced from {{skill icon|Fire Bolt}}
  • Fire Bolt is produced from {{skill icon|Fire Bolt||Fire Bolt (summoner)}}