Editing Template:Icon/doc
From Eco - English Wiki
Template/file changes in this version are pending review.
The stable version was checked on 19 June 2024.
Your changes will be displayed to readers once an authorized user accepts them. (help)
Template/file changes in this version are pending review.
The stable version was checked on 19 June 2024.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
== Description == | == Description == | ||
Use to create tiny icons (and captions). By default, the icon size is 28px but it can be re-defined. | Use to create tiny icons (and captions). By default, the icon size is 28px but it can be re-defined. | ||
== Syntax == | == Syntax == | ||
<syntaxhighlight lang="mediawiki">{{Icon|name|style|link| | <syntaxhighlight lang="mediawiki">{{Icon|name|style|link|iconsize}}</syntaxhighlight> | ||
{| class="ecotable mw-half" | {| class="ecotable mw-half" | ||
Line 15: | Line 12: | ||
|- | |- | ||
| <code>name</code> | | <code>name</code> | ||
| | | file name | ||
| | | Cooking | ||
| | | No file extension needed (assumes .png). | ||
|- | |- | ||
| <code>style</code> | | <code>style</code> | ||
Line 23: | Line 20: | ||
| 1 | | 1 | ||
| Defines the (caption) style. Default is a small icon that is unlinkable with no caption. | | Defines the (caption) style. Default is a small icon that is unlinkable with no caption. | ||
* <code>1 | * <code>1</code> = outputs the icon name as plain text next to the icon | ||
* <code>2</code> = outputs the icon name as a small caption below the icon | |||
* <code> | * <code>3</code> = outputs no caption, but links the icon itself to its page of the same name. Recommended to use with <code>size</code> parameter | ||
* <code> | |||
|- | |- | ||
| <code>link</code> | | <code>link</code> | ||
| Page Name | | Page Name | ||
| | | Skills | ||
| Optional. Use if you want the icon to also link to a page. | | Optional. Use if you want the icon to also link to a page. | ||
* When set to the default of 1, it will link to the same name as the | * When set to the default of 1, it will link to the same name as the icon, but you can overwrite by writing in the designated page name in this field. If you are using this, you must write out <code>link=</code> | ||
|- | |- | ||
| <code>size</code> | | <code>size</code> | ||
| any px size | | any px size | ||
| 50 | | {{formatnum: 50}} | ||
| If you are using this, you must write out <code>size=</code> and assumes <code>px</code>. | | If you are using this, you must write out <code>size=</code> and assumes <code>px</code>. | ||
|} | |} | ||
Line 51: | Line 42: | ||
! Result | ! Result | ||
|- | |- | ||
| Style | | No Style, Size 100px | ||
| <syntaxhighlight lang="mediawiki">{{Icon| | | <syntaxhighlight lang="mediawiki">{{Icon|ChefSkill|size=100}}</syntaxhighlight> | ||
| {{Icon| | | {{Icon|ChefSkill|size=100}} | ||
|- | |||
| Style 1 | |||
| <syntaxhighlight lang="mediawiki">{{Icon|ChefSkill|1}}</syntaxhighlight> | |||
| {{Icon|ChefSkill|1}} | |||
|- | |||
| Style 1 with link to its page | |||
| <syntaxhighlight lang="mediawiki">{{Icon|ChefSkill|1|1}}</syntaxhighlight> | |||
| {{Icon|ChefSkill|1|1}} | |||
|- | |- | ||
| Style | | Style 2 | ||
| <syntaxhighlight lang="mediawiki">{{Icon| | | <syntaxhighlight lang="mediawiki">{{Icon|ChefSkill|2}}</syntaxhighlight> | ||
| {{Icon| | | {{Icon|ChefSkill|2}} | ||
|- | |- | ||
| Style 2 | | Style 2 with link to Skills page | ||
| <syntaxhighlight lang="mediawiki">{{Icon| | | <syntaxhighlight lang="mediawiki">{{Icon|ChefSkill|2|Skills}}</syntaxhighlight> | ||
| {{Icon| | | {{Icon|ChefSkill|2|Skills}} | ||
|- | |- | ||
| Style | | Style 2, Size 100px | ||
| <syntaxhighlight lang="mediawiki">{{Icon| | | <syntaxhighlight lang="mediawiki">{{Icon|ChefSkill|2|size=100}}</syntaxhighlight> | ||
| {{Icon| | | {{Icon|ChefSkill|2|size=100}} | ||
|- | |- | ||
| Style | | Style 3, different link, Size 80px | ||
| <syntaxhighlight lang="mediawiki">{{Icon| | | <syntaxhighlight lang="mediawiki">{{Icon|ChefSkill|3|Skills|size=80}}</syntaxhighlight> | ||
| {{Icon| | | {{Icon|ChefSkill|3|link=Skills|size=80}} | ||
|} | |} | ||
<noinclude>[[Category:Template Docs]]</noinclude> | <noinclude>[[Category:Template Docs]]</noinclude> |