Information: If you want to test this template, please use Sandbox.
This documentation is transcluded from Template:ForceRarity/doc.
Template:ForceRarity: Difference between revisions
From Elwiki
IceSoulMOG (talk | contribs) mNo edit summary |
IceSoulMOG (talk | contribs) mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#vardefine:icon_size|{{#switch:{{{size|}}}|1=20|2=32|#default=64}}}}<div style="{{#if:{{{float|}}}|float: {{{float|}}};}}position: relative; width:{{#var:icon_size}}px; height:{{#var:icon_size}}px; display: inline-block; vertical-align: {{#if:{{{valign|}}}|{{{valign|}}}|middle}}"><div style="position: absolute; top:{{#switch:{{{size|}}}|1|2=-5|#default=0}}px; left: 0; z-index: 1; pointer-events: none;">[[File:Force Rarity - {{#switch:{{{rarity|}}}|Elite|elite=Elite|Unique|unique=Unique|Legend|legend=Legend|#default=Rare}}.png|{{#switch:{{{size|}}}|1=11|2=18|#default=36}}px]]</div> <div style="position: absolute;">[[File:{{{1|}}}|{{#var:icon_size}}px|link={{#if:{{{link|}}}|{{{link|}}}|File:{{{1|}}}}}|{{{name|}}}]]</div></div></includeonly><noinclude>{{Doc}}</noinclude> | <includeonly>{{#vardefine:icon_size|{{#switch:{{{size|}}}|1=20|2=32|#default=64}}}}<div style="{{#if:{{{float|}}}|float: {{{float|}}};}}position: relative; width:{{#var:icon_size}}px; height:{{#var:icon_size}}px; display: inline-block; vertical-align: {{#if:{{{valign|}}}|{{{valign|}}}|middle}}"><div style="position: absolute; top:{{#switch:{{{size|}}}|1|2=-5|#default=0}}px; left: 0; z-index: 1; pointer-events: none;">[[File:Force Rarity - {{#switch:{{{rarity|}}}|Elite|elite=Elite|Unique|unique=Unique|Legend|legend=Legend|#default=Rare}}.png|{{#switch:{{{size|}}}|1=11|2=18|#default=36}}px]]</div> <div style="position: absolute;">[[File:{{{1|}}}|{{#var:icon_size}}px|link={{#if:{{{link|}}}|{{{link|}}}|File:{{{1|}}}}}{{#if: {{{name|}}}|{{!}}{{{name|}}}]]|]]}}</div></div></includeonly><noinclude>{{Doc}}</noinclude> |
Latest revision as of 09:33, 22 March 2022
What is it used for?
This is an overlay template for Force Skill items.
How to use
Code
{{ForceRarity|file|link=skillname|rarity=itemrarity|size=1|float=position|valign=position}}
Parameters
- {{ForceRarity|file}} - name of the image (without the "File:" prefix)
- rarity - rarity of the item (Rare, Elite, Unique, or Legend)
- link - optional link to the item
- name - optional name to the item
- size - if 1, displays a 20px icon, if 2 - 32px, no value - 64px
- float - if right or left specified, pushes the picture to the right or the left of the page
- valign - vertical align of the picture, useful if inserted in the middle of a text block or so, can equal to top/bottom/baseline/middle
Examples
{{ForceRarity|HQ Shop Item 295757.png|rarity=Legend}}
result:
{{ForceRarity|HQ Shop Item 295757.png|rarity=Legend|link=Remaining El's Aspiration|name=Hello El}}
result:
{{ForceRarity|HQ Shop Item 295757.png|rarity=Legend|size=1}}
result: