Template:Icon: Difference between revisions

From Pikmin Fanon
(Created page with "<includeonly><div style="position:absolute; z-index:100; right:{{#if:{{{1|}}}|{{{1}}}|30}}px; top:{{#if:{{{2|}}}|{{{2}}}|8}}px;" class="metadata topicon"> {| style="background-co...")
 
(I finally got it working!!)
Line 1: Line 1:
<includeonly><div style="position:absolute; z-index:100; right:{{#if:{{{1|}}}|{{{1}}}|30}}px; top:{{#if:{{{2|}}}|{{{2}}}|8}}px;" class="metadata topicon">
<includeonly>[[File:{{#if:{{{v|}}}|{{{v}}}&nbsp;}} {{{1}}} {{#if:{{{v2|}}}|{{{v2}}}&nbsp;}} icon.png|link={{{l|{{{1}}}}}}|{{#if:{{{nosize|}}}||{{{3|24x24px}}}}} {{#ifeq:{{{1}}}|Pikmin (game)|{{!}} Pikmin}}{{#if:{{{n|}}}|{{!}}{{{n}}}}}]]{{#if:{{{2|}}}|&nbsp;[[{{{l|{{{1}}}}}}|{{{n|{{{1}}}}}}]]}}</includeonly><noinclude>
{| style="background-color:transparent;border: 0px"
 
==Info==
This template shows the icon of a subject, with the icon linking to said subject. You can also have it quickly give a link to the subject in plain text, right after the icon.
 
All icons of canon enemies, plants, and Pikmin will have a game title in front of their filenames (i.e. P2 Pellet Posy), so specific appearances may be chosen. This may also apply to fanon icons of the same kind (i.e. PWW Green Pikmin).
 
==Parameters==
{| class = "wikitable"
! Parameter || Mandatory || Default || Purpose || Detailed description
|-
! 1
| '''Yes''' ||  || Subject || Name of the subject's article.
|-
! 2
| No ||  || Text link || If this has a value, like "y", the subject's name will also appear behind the icon, with a link to the subject's article.
|-
! 3
| No || 24x24px || Size || Use this to set the icon to a size of your liking.
|-
|-
|{{click|link={{{3}}}|image={{{1}}}|width={{{2}}}|title={{{4}}}}}
! v
| No || || Version || If there is more than one version of the subject, use this parameter to specify it. This is valid for icon filenames that follow the following pattern: "&lt;version&gt; &lt;subject&gt; icon.png".
|-
|-
! v2
| No ||  || Alt version || If the image you want has another modifier in its title, specify it here.
|-
! l
| No ||  || Link || If the link to the article is different from the icon's name, specify it here.
|-
! n
| No ||  || Display name || If you want a different display name for the text link, specify it here.
|-
! nosize
| No ||  || Ignore "size" || If this parameter has a value, the icon size will not be changed from the original.
|}
|}
</div></includeonly><noinclude>This template produces an image in the upper right hand corner of the page.


==Use==
The following special cases exist:
<nowiki>{{icon|image name|image size|image link|image mouse-over text}}</nowiki>
*If the subject is "Pikmin (game)", the mouse-over text for the image will show "Pikmin".
 
==Skeleton==
<pre>
{{icon|<subject>|<text link?>|<size>|v=<version>|l=<link>|n=<display name>|nosize=<no resize?>}}
</pre>
 
==Examples==
{| class = "wikitable"
! Code || Result
|-
| <pre>{{icon|Electric Bloyster}}</pre>
| {{icon|Electric Bloyster}}
|-
| <pre>{{icon|Mushroom Pikmin|v=P1}}</pre>
| {{icon|Mushroom Pikmin|v=P1}}
|-
| <pre>{{icon|Metal Shearwig|y|16px}}</pre>
| {{icon|Metal Shearwig|y|16px}}
|-
| <pre>{{icon|Dummy enemy|y|l=Falserage Snagret|n=Falserage Snagret}}</pre>
| {{icon|Dummy enemy|y|l=Falserage Snagret|n=Falserage Snagret}}
|-
| <pre>{{icon|Burgeoning Spiderwort|y|v=P3|v2=spicy|n=Spicy Burgeoning Spiderwort|nosize=y}}</pre>
| {{icon|Burgeoning Spiderwort|y|v=P3|v2=spicy|n=Spicy Burgeoning Spiderwort|nosize=y}}
|-
| <pre>{{icon|Zest Bomb|y|v=P3}}</pre>
| {{icon|Zest Bomb|y|v=P3}}
|-
| <pre>{{icon|Tin box|l=Box|n=Tin box}}</pre>
| {{icon|Tin box|l=Box|n=Tin box}}
|-
|}


[[Category:Templates]]</noinclude>
[[Category:Inline templates]]</noinclude>

Revision as of 07:22, 8 October 2020


Info

This template shows the icon of a subject, with the icon linking to said subject. You can also have it quickly give a link to the subject in plain text, right after the icon.

All icons of canon enemies, plants, and Pikmin will have a game title in front of their filenames (i.e. P2 Pellet Posy), so specific appearances may be chosen. This may also apply to fanon icons of the same kind (i.e. PWW Green Pikmin).

Parameters

Parameter Mandatory Default Purpose Detailed description
1 Yes Subject Name of the subject's article.
2 No Text link If this has a value, like "y", the subject's name will also appear behind the icon, with a link to the subject's article.
3 No 24x24px Size Use this to set the icon to a size of your liking.
v No Version If there is more than one version of the subject, use this parameter to specify it. This is valid for icon filenames that follow the following pattern: "<version> <subject> icon.png".
v2 No Alt version If the image you want has another modifier in its title, specify it here.
l No Link If the link to the article is different from the icon's name, specify it here.
n No Display name If you want a different display name for the text link, specify it here.
nosize No Ignore "size" If this parameter has a value, the icon size will not be changed from the original.

The following special cases exist:

  • If the subject is "Pikmin (game)", the mouse-over text for the image will show "Pikmin".

Skeleton

{{icon|<subject>|<text link?>|<size>|v=<version>|l=<link>|n=<display name>|nosize=<no resize?>}}

Examples

Code Result
{{icon|Electric Bloyster}}
Electric Bloyster icon.png
{{icon|Mushroom Pikmin|v=P1}}
P1 Mushroom Pikmin icon.png
{{icon|Metal Shearwig|y|16px}}
Metal Shearwig icon.png Metal Shearwig
{{icon|Dummy enemy|y|l=Falserage Snagret|n=Falserage Snagret}}
Falserage Snagret Falserage Snagret
{{icon|Burgeoning Spiderwort|y|v=P3|v2=spicy|n=Spicy Burgeoning Spiderwort|nosize=y}}
Spicy Burgeoning Spiderwort Spicy Burgeoning Spiderwort
{{icon|Zest Bomb|y|v=P3}}
P3 Zest Bomb icon.png Zest Bomb
{{icon|Tin box|l=Box|n=Tin box}}
Tin box