Information: If you want to test this template, please use Sandbox.
This documentation is transcluded from Template:Face/doc.
Template:Face: Difference between revisions
From Elwiki
No edit summary |
No edit summary |
||
Line 19: | Line 19: | ||
|4x3=1, 5 | |4x3=1, 5 | ||
}} | }} | ||
}} | }}{{#vardefine: scale | {{#if:{{{scale|}}}|{{{scale|}}}|1}} }} | ||
<div class="image-cropped" style="width: | <div class="image-cropped" style="width: {{#expr:108*{{#var:scale}}}}px; height: {{#expr:61*{{#var:scale}}}}px; position: relative; overflow: hidden; display: inline-block;"> | ||
<div class="image-wrap" style="position: absolute; | <div class="image-wrap" style="position: absolute; | ||
left: -{{#expr: (( {{#arrayindex:coords|0}} -1)*118)+1 }}px; | left: -{{#expr: ((( {{#arrayindex:coords|0}} -1)*118)+1)*{{#var:scale}} }}px; | ||
top: -{{#expr: (( {{#arrayindex:coords|1}} -1)*62)+1 }}px;" | top: -{{#expr: ((( {{#arrayindex:coords|1}} -1)*62)+1)*{{#var:scale}} }}px;" | ||
">[[File:Face - {{{1|Elsword}}}.png| | ">[[File:Face - {{{1|Elsword}}}.png|{{#expr:512*{{#var:scale}}}}px{{#if:{{{link|}}}|{{!}}link={{#ifeq:{{{link|}}}|base|{{{1|Elsword}}}|{{{link|}}}}}}}]]</div> | ||
</div></includeonly><noinclude>{{Doc}}</noinclude> | </div></includeonly><noinclude> | ||
{{Doc}}</noinclude> |
Revision as of 17:38, 15 June 2022
Examples
Code
{{Face|char_name|path_noxjob_no}}
Transcendence:
{{Face|char_name|path_not}}
Other
The size can also be altered (values between 0 and 1):
{{Face|Rose|scale=0.45}}
Output: