Difference between revisions of "Template:Top icon"
Rupert Havok (talk | contribs) |
Rupert Havok (talk | contribs) |
||
Line 1: | Line 1: | ||
− | <includeonly><div style="display: block !important; margin-left: 95%; position: absolute; top: | + | <includeonly><div style="display: block !important; margin-left: 95%; position: absolute; top: -2em; right:{{#expr: {{{number|{{{icon_nr|0}}}}}}*(2+{{{width|15}}})+10+{{{offset|{{{extra_offset|0}}}}}} }}px; {{{style|}}}" class="metadata topicon nopopups {{{class|}}}" {{#if:{{{id|}}}|id="{{{id}}}"}}>[[File:{{{image|{{{imagename}}}}}}|{{{width|15}}}px|{{#if:{{{link|}}}{{{wikilink|}}}|link={{{link|{{{wikilink|}}}}}}}}|{{{text|{{{description}}}}}}]]</div></includeonly><noinclude>This is a Holocron template used to automatically generate small contextual icons (15x15) in the top-right corner of various articles and pages. |
==Usage== | ==Usage== |
Latest revision as of 13:13, 8 June 2018
This is a Holocron template used to automatically generate small contextual icons (15x15) in the top-right corner of various articles and pages.
Usage
{{Top icon | imagename = Crystal Clear action run.svg | wikilink = The pagename of a wikipage. This is where you will be taken when clicking the icon. | description = This will show in the tooltip when hovering over the icon. | id = a page-unique id (used for CSS styling) | class = one or more custom class names (used for CSS styling) | icon_nr = the icon number determines the offset of the topicon (has to be used if you have more than one top icon) | extra_offset = an additional offset that you can use to force or adapt (in case you have non-20px wide elements in your topicon row) }}