No edit summary
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><div style="{{#if:{{{float|}}}|float: {{{float|}}};}}position: relative; width:{{#ifeq:{{{size|}}}|1|20|54}}px; height:{{#ifeq:{{{size|}}}|1|20|54}}px; display: inline-block; vertical-align: {{#if:{{{valign|}}}|{{{valign|}}}|middle}}"><div style="position: absolute; top:{{#ifeq:{{{size|}}}|1|-5|-2}}px; left: 0; z-index: 2; pointer-events: none;">[[File:ForceIcon.png|{{#ifeq:{{{size|}}}|1|10|24}}px]]</div> <div style="position: absolute;">[[File:{{{1|}}}|{{#ifeq:{{{size|}}}|1|20|54}}px|link={{#if:{{{link|}}}|{{{link|}}}/ModA{{!}}[Mod] {{{link|}}}|File:{{{1|}}}}}]]</div></div></includeonly><noinclude>{{Doc}}</noinclude>
<includeonly>{{#vardefine:icon_size|{{#switch:{{{size|}}}|1=20|2=27|3=30|#default=54}}}}<div class="force-skill-icon" 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=-5|2=-7|3=-9|#default=-2}}px; left: 0; z-index: 1; pointer-events: none;">[[File:ForceIcon.png|{{#switch:{{{size|}}}|1=10|2|3=13|#default=24}}px]]</div> <div style="position: absolute;">[[File:{{{1|}}}|{{#var:icon_size}}px|link={{#if:{{{link|}}}|{{{link|}}}/ModA{{#if:{{{language|}}}|/{{{language|}}}|}}{{!}}[Mod] {{{link|}}}|File:{{{1|}}}}}|{{#if: {{{name|}}}|{{!}}{{{name|}}}]]|]]}}</div></div></includeonly><noinclude>{{Doc}}</noinclude>

Latest revision as of 22:40, 15 June 2022

Information: If you want to test this template, please use Sandbox.
This documentation is transcluded from Template:Force/doc.

What is it used for?

This is an overlay template for Force Skill icons.

How to use

Code

{{Force|file|link=skillname|size=1|float=position|valign=position}}

Parameters

  • {{Force|file}} - name of the image (without the "File:" prefix)
  • link - optional link to the skill (provide only skill name, redirects to [Mod] automatically)
  • language - the language of the page
  • name - optional name for the skill in other languages
  • size - if 1, displays a 20px icon, if 2 - 27px, if 3 - 30px
  • 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

{{Force|MariciSkill4.png}}

result:

{{Force|MariciSkill4.png|link=Iceberg}}

result:

{{Force|MariciSkill4.png|link=Iceberg|language=zh-hans|name=[变化]冰山}}

result:

[变化]冰山
{{Force|MariciSkill4.png|size=1}}

result: