Difference between revisions of "Template:I"
Jump to navigation
Jump to search
If you find a typo, inconsistency, or error, please sign up and help out the wiki! We can't do it without your help! :D Thank you!
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | [[File:{{{1|Invisible-sprite}}}.png|16x16px|class=item-icon pixel {{{4}}}|link={{{2|{{{1}}}}}}|{{{3|{{{1}}}}}}]]<noinclude> | + | {{#switch: {{{animated}}} |
+ | | 1 | ||
+ | | true = <span class="ts-container ts-container-inline">{{#if: {{{name1|}}}|<span class="ts-slide">[[File:{{{name1|Invisible-sprite}}}.png|16x16px|class=item-icon pixel {{{class1}}}|link={{{link1{{{name1}}}}}}|{{{3|{{{name1}}}}}}]]</span>}}{{#if: {{{name2|}}}|<span class="ts-slide">[[File:{{{name2|Invisible-sprite}}}.png|16x16px|class=item-icon pixel {{{class1}}}|link={{{link2|{{{name2}}}}}}|{{{3|{{{name2}}}}}}]]</span>}}{{#if: {{{name3|}}}|<span class="ts-slide">[[File:{{{name3|Invisible-sprite}}}.png|16x16px|class=item-icon pixel {{{class1}}}|link={{{link3|{{{name3}}}}}}|{{{3|{{{name3}}}}}}]]</span>}}{{#if: {{{name4|}}}|<span class="ts-slide">[[File:{{{name4|Invisible-sprite}}}.png|16x16px|class=item-icon pixel {{{class1}}}|link={{{link4|{{{name4}}}}}}|{{{3|{{{name4}}}}}}]]</span>}}{{#if: {{{name5|}}}|<span class="ts-slide">[[File:{{{name5|Invisible-sprite}}}.png|16x16px|class=item-icon pixel {{{class1}}}|link={{{link5|{{{name5}}}}}}|{{{3|{{{name5}}}}}}]]</span>}}{{#if: {{{name6|}}}|<span class="ts-slide">[[File:{{{name6|Invisible-sprite}}}.png|16x16px|class=item-icon pixel {{{class1}}}|link={{{link6|{{{name6}}}}}}|{{{3|{{{name6}}}}}}]]</span>}}{{#if: {{{name7|}}}|<span class="ts-slide">[[File:{{{name7|Invisible-sprite}}}.png|16x16px|class=item-icon pixel {{{class1}}}|link={{{link7|{{{name7}}}}}}|{{{3|{{{name7}}}}}}]]</span>}}{{#if: {{{name8|}}}|<span class="ts-slide">[[File:{{{name8|Invisible-sprite}}}.png|16x16px|class=item-icon pixel {{{class1}}}|link={{{link8|{{{name8}}}}}}|{{{3|{{{name8}}}}}}]]</span>}}{{#if: {{{name9|}}}|<span class="ts-slide">[[File:{{{name9|Invisible-sprite}}}.png|16x16px|class=item-icon pixel {{{class1}}}|link={{{link9|{{{name9}}}}}}|{{{3|{{{name9}}}}}}]]</span>}}{{#if: {{{name10|}}}|<span class="ts-slide">[[File:{{{name10|Invisible-sprite}}}.png|16x16px|class=item-icon pixel {{{class1}}}|link={{{link10|{{{name10}}}}}}|{{{3|{{{name10}}}}}}]]</span>}}{{#if: {{{name11|}}}|<span class="ts-slide">[[File:{{{name11|Invisible-sprite}}}.png|16x16px|class=item-icon pixel {{{class1}}}|link={{{link11|{{{name11}}}}}}|{{{3|{{{name11}}}}}}]]</span>}}{{#if: {{{name12|}}}|<span class="ts-slide">[[File:{{{name12|Invisible-sprite}}}.png|16x16px|class=item-icon pixel {{{class1}}}|link={{{link12|{{{name12}}}}}}|{{{3|{{{name12}}}}}}]]</span>}}{{#if: {{{name13|}}}|<span class="ts-slide">[[File:{{{name13|Invisible-sprite}}}.png|16x16px|class=item-icon pixel {{{class1}}}|link={{{link13|{{{name13}}}}}}|{{{3|{{{name13}}}}}}]]</span>}}{{#if: {{{name14|}}}|<span class="ts-slide">[[File:{{{name14|Invisible-sprite}}}.png|16x16px|class=item-icon pixel {{{class1}}}|link={{{link14|{{{name14}}}}}}|{{{3|{{{name14}}}}}}]]</span>}}{{#if: {{{name15|}}}|<span class="ts-slide">[[File:{{{name15|Invisible-sprite}}}.png|16x16px|class=item-icon pixel {{{class1}}}|link={{{link15|{{{name15}}}}}}|{{{3|{{{name15}}}}}}]]</span>}}{{#if: {{{name16|}}}|<span class="ts-slide">[[File:{{{name16|Invisible-sprite}}}.png|16x16px|class=item-icon pixel {{{class1}}}|link={{{link16|{{{name16}}}}}}|{{{3|{{{name16}}}}}}]]</span>}}</span> | ||
+ | | #default = [[File:{{{1|Invisible-sprite}}}.png|16x16px|class=item-icon pixel {{{4|}}}|link={{{2|{{{1}}}}}}|{{{3|{{{1}}}}}}]] | ||
+ | }}<noinclude> | ||
== About == | == About == | ||
This templated (named '''I''' as a shortcut for '''icon''') serves as an easy method to add icon sprites into a page or anywhere else using a single, standarized format. | This templated (named '''I''' as a shortcut for '''icon''') serves as an easy method to add icon sprites into a page or anywhere else using a single, standarized format. | ||
Line 10: | Line 14: | ||
* <code><nowiki>{{I|Wooden Planks|Cow}}</nowiki></nowiki></code> → {{I|Wooden Planks|Cow}} | * <code><nowiki>{{I|Wooden Planks|Cow}}</nowiki></nowiki></code> → {{I|Wooden Planks|Cow}} | ||
* <code><nowiki>{{I|Wooden Planks|Cow|Tooltip text.}}</nowiki></nowiki></code> → {{I|Wooden Planks|Cow|Tooltip text.}} | * <code><nowiki>{{I|Wooden Planks|Cow|Tooltip text.}}</nowiki></nowiki></code> → {{I|Wooden Planks|Cow|Tooltip text.}} | ||
+ | |||
+ | <pre><nowiki> | ||
+ | {{I | ||
+ | | animated = true | ||
+ | | name1 = Wooden sword | ||
+ | | name2 = Stone sword | ||
+ | | name3 = Golden sword | ||
+ | | name4 = Iron sword | ||
+ | | name5 = Diamond sword | ||
+ | | name6 = Wooden axe | ||
+ | | name7 = Stone axe | ||
+ | | name8 = Golden axe | ||
+ | | name9 = Iron axe | ||
+ | | name10 = Diamond axe | ||
+ | | name11 = Wooden shovel | ||
+ | | name12 = Stone shovel | ||
+ | | name13 = Golden shovel | ||
+ | | name14 = Iron shovel | ||
+ | | name15 = Diamond shovel | ||
+ | | name16 = Diamond hoe | ||
+ | }} | ||
+ | </nowiki></pre> | ||
+ | |||
+ | {{I | ||
+ | | animated = true | ||
+ | | name1 = Wooden sword | ||
+ | | name2 = Stone sword | ||
+ | | name3 = Golden sword | ||
+ | | name4 = Iron sword | ||
+ | | name5 = Diamond sword | ||
+ | | name6 = Wooden axe | ||
+ | | name7 = Stone axe | ||
+ | | name8 = Golden axe | ||
+ | | name9 = Iron axe | ||
+ | | name10 = Diamond axe | ||
+ | | name11 = Wooden shovel | ||
+ | | name12 = Stone shovel | ||
+ | | name13 = Golden shovel | ||
+ | | name14 = Iron shovel | ||
+ | | name15 = Diamond shovel | ||
+ | | name16 = Diamond hoe | ||
+ | }} | ||
</noinclude> | </noinclude> |
Latest revision as of 11:44, 10 January 2024
About
This templated (named I as a shortcut for icon) serves as an easy method to add icon sprites into a page or anywhere else using a single, standarized format.
Usage
The syntax of the template is {{I|<file-name>|<item-link>?|<tooltip-text>?|<class>?}}</nowiki>
. All parameters default to the first one if those are not specified.
Examples
{{I|Wooden Planks}}</nowiki>
→{{I|Wooden Planks|Cow}}</nowiki>
→{{I|Wooden Planks|Cow|Tooltip text.}}</nowiki>
→
{{I | animated = true | name1 = Wooden sword | name2 = Stone sword | name3 = Golden sword | name4 = Iron sword | name5 = Diamond sword | name6 = Wooden axe | name7 = Stone axe | name8 = Golden axe | name9 = Iron axe | name10 = Diamond axe | name11 = Wooden shovel | name12 = Stone shovel | name13 = Golden shovel | name14 = Iron shovel | name15 = Diamond shovel | name16 = Diamond hoe }}