Template:Click: Difference between revisions

From Yogstation-13
Jump to navigation Jump to search
mNo edit summary
(Updated documentation of template)
Line 5: Line 5:
-->[[File:{{{img|Empty.png}}}|middle|{{{size|32px}}}|link={{{link|{{FULLPAGENAME}}}}}]]}}</span></includeonly><!--
-->[[File:{{{img|Empty.png}}}|middle|{{{size|32px}}}|link={{{link|{{FULLPAGENAME}}}}}]]}}</span></includeonly><!--
--><noinclude>
--><noinclude>
Creates a clickable image
== About ==
Inserted images normally refer to the corresponding ''File:''-page, which is not intuitive for some cases. This template provides a method to make an image a direct link to a target instead.


==Usage==
== Parameter-Usage ==
Example: "{{click|img=Sun.png|link=Sunglasses}}"
{| class="wikitable"
!Parameter
!Example
!Description
|-
!link
|Sunglasses
|Linktarget
|-
!img
|Sun.png
|Image to be displayed, default Empty.png
|-
!size
|32px
|Size of the image, default 32px
|}


<center>Centered example: "{{click|img=Sun.png|link=Sunglasses}}"</center>
== Examples ==
=== Minimal ===
<pre>{{click
|img=Sun.png
|link=Sunglasses
}}</pre>
{{click|img=Sun.png|link=Sunglasses}}


"{{click|img=Sun.png|link=Sunglasses|size=64px}}"
=== Missing image ===
[[Category:Templates]]</noinclude>
<pre>{{click
|link=Sunglasses
}}</pre>
{{click|link=Sunglasses}}
 
=== Full with adjusted size ===
<pre>{{click
|img=Sun.png
|link=Sunglasses
|size=64px
}}</pre>
{{click|img=Sun.png|link=Sunglasses|size=64px}}
 
[[Category:Templates]]
</noinclude>

Revision as of 07:38, 20 April 2020

About

Inserted images normally refer to the corresponding File:-page, which is not intuitive for some cases. This template provides a method to make an image a direct link to a target instead.

Parameter-Usage

Parameter Example Description
link Sunglasses Linktarget
img Sun.png Image to be displayed, default Empty.png
size 32px Size of the image, default 32px

Examples

Minimal

{{click
|img=Sun.png
|link=Sunglasses
}}

File:Sun.png

Missing image

{{click
|link=Sunglasses
}}

Empty.png

Full with adjusted size

{{click
|img=Sun.png
|link=Sunglasses
|size=64px
}}

File:Sun.png