Difference between revisions of "Template:Icon link"

From Mine Blocks Wiki
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!

Line 1: Line 1:
{{#if: {{{1|}}}|<span class="icon-link">[[{{{1}}}|{{{2|{{{1}}}}}}|{{#switch: {{{1}}}|{{{2|{{{1}}}}}}
+
{{#if: {{{1|}}}|<span class="icon-link">[[{{{1}}}|{{{2|{{{1}}}}}}|{{#switch: {{{1}}}
 
| Bedrock = <span class="sprite-icon pixel" style="background-position: 0 0;"></span><span class="sprite-text">{{{1}}}|{{{2|{{{1}}}}}}</span>
 
| Bedrock = <span class="sprite-icon pixel" style="background-position: 0 0;"></span><span class="sprite-text">{{{1}}}|{{{2|{{{1}}}}}}</span>
 
| Stone = <span class="sprite-icon pixel" style="background-position: -16px 0;"></span><span class="sprite-text">{{{1}}}|{{{2|{{{1}}}}}}</span>
 
| Stone = <span class="sprite-icon pixel" style="background-position: -16px 0;"></span><span class="sprite-text">{{{1}}}|{{{2|{{{1}}}}}}</span>

Revision as of 09:20, 25 December 2021


About

This template serves as an easy method to add icon sprites along with their link into a page or anywhere else using a single, standarized format.

Usage

The syntax of the template is {{Icon link|<name>|<link>|<displayed-name>?|<tooltip-text>?|<class>?}}. All parameters default to the first one if those are not specified.

Examples