Template:Icon: Difference between revisions
From BonziPEDIA, the Official BonziWORLD Encyclopedia of varied quality.
Jump to navigationJump to search
No edit summary |
m Protected "Template:Icon" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><span style="width: 16px; height: 16px; display: inline-block; padding: 0px; overflow: hidden; vertical-align: middle;"><span style="position: relative; left: -{{#expr: {{{1}}} * 16}}px; top: -{{#expr: {{{2}}} * 16}}px;">[[File:SiteIcons.png|link=]]</span></span> </includeonly> | <includeonly><span style="width: 16px; height: 16px; display: inline-block; padding: 0px; overflow: hidden; vertical-align: middle;"><span style="position: relative; left: -{{#expr: {{{1}}} * 16}}px; top: -{{#expr: {{{2}}} * 16}}px;">[[File:SiteIcons.png|link={{{3}}}]]</span></span></includeonly><noinclude> | ||
<noinclude> | |||
== Usage == | == Usage == | ||
Generates an icon for use in link templates | Generates an icon for use in link templates | ||
These icons are stored in the image below. The origin is at the top left corner, and the range for coordinates is 0-7 in both directions. | These icons are stored in the image below. The origin is at the top left corner, and the range for coordinates is 0-7 in both directions. Parameters 1 and 2 take in the X and Y coordinates respectively, while the third parameter is used to link the image elsewhere (this one is optional). | ||
<div style="border: 1px solid; width: 128px;">[[File:SiteIcons.png]]</div> | <div style="border: 1px solid; width: 128px;">[[File:SiteIcons.png]]</div> | ||
=== Example === | === Example === | ||
<pre>Reddit: {{icon|2|0}}</pre> | <pre>Reddit: {{icon|2|0|https://reddit.com/}}</pre> | ||
Reddit: {{icon|2|0}} | Reddit: {{icon|2|0|https://reddit.com/}} | ||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude> | </noinclude> |
Latest revision as of 09:53, 12 May 2024
Usage
Generates an icon for use in link templates
These icons are stored in the image below. The origin is at the top left corner, and the range for coordinates is 0-7 in both directions. Parameters 1 and 2 take in the X and Y coordinates respectively, while the third parameter is used to link the image elsewhere (this one is optional).
Example
Reddit: {{icon|2|0|https://reddit.com/}}
Reddit: