Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Icon: Difference between revisions

Template page
mNo edit summary
Djavin novienta (talk | contribs)
Moved documentation to Template:Icon/doc
Line 1: Line 1:
<noinclude>
<includeonly>[[image:{{#switch: {{{1|}}}
<div style="float:right; margin-left:1em; margin-bottom:1em;">__TOC__</div>
</noinclude>[[image:{{#switch: {{{1|}}}
<!--  
<!--  


Line 539: Line 537:
<!-- Default -->
<!-- Default -->
  | #default = {{{1}}}
  | #default = {{{1}}}
}}|{{#switch: {{{2|}}} | = 32 | #default = {{{2}}}}}px|{{#switch: {{{3|}}} |  = link= | #default = {{{3}}}}}]]<noinclude>
}}|{{#switch: {{{2|}}} | = 32 | #default = {{{2}}}}}px|{{#switch: {{{3|}}} |  = link= | #default = {{{3}}}}}]]</includeonly><noinclude>
 
{{documentation}}
= Syntax =
The function takes up to three parameters. Each of the parameters are optional, while still allowing for some customization if need be.
{{code|<nowiki>{{ icon | type | size | hint }}</nowiki>}}
=== Parameters ===
;type
:This determines which icon to show and it will default back to the webifier icon if no parameters are given. Remember to use lower-case letters.
 
;size
:This determines the size of the image, in pure numbers. It defaults to 32 (the ''px'' part of the size is omitted from the parameter as it is included in the template).
 
;hint
:This is the mouse-over hint. Add this if you want custom text to be displayed when you hover over the icon. This parameter will accept codes like '''bold''' or ''italic'' or wiki-links, but will simply strip any link-coding or formatting from them and presents the unmodified plain text.
 
=== Examples ===
* <code><nowiki>{{icon|point}}</nowiki></code> &rarr; {{icon|point}} ''(it will use the default size and no mouse-over tooltip)''
* <code><nowiki>{{icon|||Stay put with a web!</nowiki></code> &rarr; {{icon|||Stay put with a web!}} ''(default icon and size was used since no first argument was given)''
* <code><nowiki>{{icon|warp scrambler|16|No MWD for you!}}</nowiki></code> &rarr; {{icon|warp scrambler|16|No MWD for you!}} ''(smaller icon, could be used inside a paragraph without breaking the line height)''
 
= List of icons =
For a full list of icons available through this template, see the [[icons]] page.
</noinclude>
</noinclude>