Template:MoveDisplay: Difference between revisions

Template page
(Redirected page to Template:MoveDisplay7)
Tag: New redirect
 
(add lazy to videos)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
#REDIRECT [[Template:MoveDisplay7]]
<includeonly><templatestyles src="MoveData/style4.css"/><div class="movedata hover-bg-grey-03 {{#if:{{{image|{{{video|}}}}}}|mw-collapsible mw-collapsed}}" {{#if:{{{id|}}}|id="{{{id}}}"}}>
{{#if:{{{id|}}}|<div class="movedata-id">[[#{{{id}}}]]</div>
}}{{#if:{{{clonedFrom|}}}|<div class="movedata-clonedFrom">{{{clonedFrom}}}</div>
}}<div class="movedata-labels">
  <div class="movedata-name {{#if:{{{alt|}}}|has-alt}}">{{{name|}}}</div>{{#if:{{{alt|}}}|
  <div class="movedata-alt">{{{alt|}}}</div>}}
  <div class="movedata-input-ctn">
<span class="movedata-inputLead">{{#replace:{{{inputLead|}}}|,|,&#8203;}}</span><span class="movedata-input">{{#replace:{{{input|}}}|([,:])|&#8203;%1|regex=yes}}</span>
  </div>
</div>
<div class="movedata-threat">
  <div class="movedata-target-ctn"><span class="movedata-targetLead">{{#replace:{{{targetLead|}}}|,|,&#8203;}}</span><span class="movedata-target">{{#replace:{{{target|}}}|,|,&#8203;}}</span></div>
  <div class="movedata-damage-ctn"><span class="movedata-damageLead">{{#replace:{{{damageLead|}}}|,|,&#8203;}}</span><span class="movedata-damage">{{#replace:{{{damage|}}}|,|,&#8203;}}</span></div>
  <div class="movedata-range">{{{range|}}}</div>
</div>
<div class="movedata-frames">{{#if:{{{tracksLeft|}}}|
  <div class="movedata-tracks left">{{#iferror:{{#ifexpr:{{{tracksLeft}}}<0 or {{{tracksLeft}}}>99|{{Error}}}}|
    <div class="movedata-tracks-label">{{{tracksLeft}}}</div>|
    <div class="movedata-tracks-bar bg-blue-30" style="width: {{#expr: floor(100*{{{tracksLeft}}}/30) }}% "></div>
    <div class="movedata-tracks-score">{{{tracksLeft}}}</div>}}
  </div>}}{{#if:{{{tracksRight|}}}|
  <div class="movedata-tracks right">{{#iferror:{{#ifexpr:{{{tracksRight}}}<0 or {{{tracksRight}}}>99|{{Error}}}}|
    <div class="movedata-tracks-label">{{{tracksRight}}}</div>|
    <div class="movedata-tracks-score">{{{tracksRight}}}</div>
    <div class="movedata-tracks-bar bg-blue-30" style="width: {{#expr: floor(100*{{{tracksRight}}}/30) }}% "></div>}}
  </div>}}
  <div class="movedata-block">{{{block|}}}</div>
  <div class="movedata-hit">{{{hit|}}}</div>
  <div class="movedata-ch">{{{ch|}}}</div>
  <div class="movedata-startupRoot">{{{startupRoot|}}}</div>
  <div class="movedata-startup">{{{startup|}}}</div>
  <div class="movedata-crush">{{{crush|}}}</div>
  <div class="movedata-recv-ctn">{{#if:{{{tot|}}}|
    <span class="movedata-tot">t{{{tot|}}}</span>}} <span class="movedata-recv">{{{recv|}}}</span></div>
</div>
<div class="movedata-notes">{{{notes|}}}{{#if:{{{alias|}}}|
<div class="movedata-alias">Sometimes written {{{alias}}}</div>
}}{{#if:{{{image|{{{video|}}}}}}|
<div class="movedata-toggle"><span class="mw-collapsible-toggle-placeholder"></span></div>
}}
</div>
{{#if:{{{image|{{{video|}}}}}}|
<div class="movedata-visuals mw-collapsible-content mw-collapsed">{{#if:{{{image|}}}|
[[{{{image}}}]]
}}{{#if:{{{video|}}}|
[[{{{video}}}|loop|lazy]]
}}</div>
}}
{{#if:{{{error|}}}|
<div class="movedata-error fg-error">
{{{error}}}
</div>
}}</div></includeonly><noinclude>{{documentation}}</noinclude>

Latest revision as of 00:20, 26 April 2024

This template renders the HTML for {{Move}} and similar templates. It for the most part shouldn't be used directly, but it can be if you want to render a move without involving the database.

Usage

{{MoveDisplay
|id=Generic-1,2
|inputLead=1
|input=,2
|...
}}

Parameters

Parameters are largely the same as {{Move}}. However, instead of parent, the following parameters must be explicitly defined:

  • inputLead – all the parents' inputs joined together
  • targetLead – all the parents' targets joined together
  • damageLead – all the parents' damages joined together
  • clonedFrom – a link to the move which this one is cloned from

Example