Template:MasterOverlay: Difference between revisions

From Elwiki
No edit summary
(nvm)
Tag: Undo
 
(18 intermediate revisions by 4 users not shown)
Line 3: Line 3:
   display: inline-flex;
   display: inline-flex;
  }
  }
}}{{#vardefine: suffix|{{#if: {{{suffix|}}}|&nbsp;({{{suffix|}}})}}}}<div style="position: relative; width:54px; height:54px; display: inline-block; vertical-align: middle" class="mc-overlay"><div style="position: absolute; top: 0; display: inline-flex; left: 0; z-index: 2; pointer-events: none;">[[File:Overlay - {{#switch:{{{2|}}}|Gaia=Gaia|Solace=Solace|Denif=Denif|Ventus=Ventus|Adrian=Adrian|Rosso=Rosso|Hernia=Hernia|Ebalon=Hernia|OAdrian=Adrian (Old)|#default=Solace}} Sigil.png|20px]]</div> <div style="position: absolute;">[[File:{{#ifeq:{{{1|}}}|Dunno|Dunno.png|Icon - {{{1|}}}{{#var: suffix}}.png{{!}}54px{{!}}link={{#if: {{{link|}}} | {{#ifeq:{{{link|}}}|1|{{{1|}}}#Master Class{{!}}{{{1|}}} (Master Class)|{{{link|}}}{{!}}{{{1|}}} (Master Class)}}|File:Icon - {{{1|}}}{{#var: suffix}}.png}} }}]]</div></div></includeonly><noinclude>{{Doc}}</noinclude>
}}{{#vardefine: suffix|{{#if: {{{suffix|}}}|&nbsp;({{{suffix|}}})}}}}<div style="position: relative; width:54px; height:54px; display: inline-block; vertical-align: middle" class="mc-overlay"><div style="position: absolute; top: 0; display: inline-flex; left: 0; z-index: 1; pointer-events: none;">[[File:Overlay - {{#switch:{{{2|}}}|Gaia|Solace|Denif|Ventus|Adrian|Rosso={{{2|}}}|Hernia|Ebalon=Hernia|OAdrian=Adrian (Old)|#default=Solace}} Sigil.png|20px]]</div> <div style="position: absolute;">[[File:{{#ifeq:{{{1|}}}|Dunno|Dunno.png|Icon - {{{1|}}}{{#var: suffix}}.png{{!}}54px{{!}}link={{#if: {{{link|}}} | {{#ifeq:{{{link|}}}|1|{{#replace:{{{1|}}}|Code |Code: }}#Master Class{{!}}{{{1|}}} (Master Class)|{{{link|}}}{{!}}{{{1|}}} (Master Class)}}|File:Icon - {{{1|}}}{{#var: suffix}}.png}} }}{{#if: {{{name|}}}|{{!}}{{{name|}}}]]|]]}}</div></div></includeonly><noinclude>{{Doc}}</noinclude>

Latest revision as of 09:26, 1 February 2023

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

What is it used for?

This is an overlay template for Master Class icons.

How to use

Code

{{MasterOverlay|file|master|suffix=text|link=1}}

Parameters

  • {{MasterOverlay|file}} - class name or "Dunno" if there is no icon
  • {{MasterOverlay|file|master}} - Master name that the class belongs to
  • link - if 1, creates link to the character's Master Class section; otherwise creates a custom local link
  • name - optional name for the icon
  • suffix - you can pass additional text for the icon URL if it's different than class name alone (Lu/Ciel case)
    • If you don't do it via this parameter, the link will break.

Examples

{{MasterOverlay|Surya|Gaia}}

result:


{{MasterOverlay|Surya|Gaia|link=1}}

result:

Surya (Master Class)


{{MasterOverlay|Dunno|Ventus}}

result:


{{MasterOverlay|Innocent|Rosso|suffix=Ishtar}}

result:


{{MasterOverlay|Catastrophe|Rosso|suffix=Timoria|link=Catastrophe/zh-hans#领导者转职|name=灾厄魔君(领导者)}}

result:

灾厄魔君(领导者)