Template:Move Infobox: Difference between revisions

From I-Pixelmon
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:
<templatestyles src="Template:Move_Infobox/styles.css"/>
<templatestyles src="Template:Move_Infobox/styles.css"/>


<!-- ── derive colours from the move type ───────────────────────── -->
<!--
{{#vardefine:type          | {{{type|Normal}}} }}
* `{{lc:...}}` lowers the move type (e.g. Grass → grass)
{{#vardefine:colordark    | {{ {{lc:{{#var:type}}}} color dark }} }}
* `{{{{lc:...}} color dark}}` transcludes template “grass color dark”
{{#vardefine:colornormal   | {{ {{lc:{{#var:type}}}} color }} }}
   which returns the dark hex code.  Same idea for normal/light.
{{#vardefine:colorlight    | {{ {{lc:{{#var:type}}}} color light }} }}
-->


<table class="pkmn-infobox move-infobox"
<table class="pkmn-infobox move-infobox"
       style="
       style="
         border-color:#{{#var:colordark}};
        /* outer dark border */
         box-shadow:0 0 0 3px #{{#var:colornormal}} inset;
         border-color:#{{{{lc:{{{type|Normal}}}}} color dark}};
         background-color:#{{#var:colorlight}};
        /* inner normal border */
         box-shadow:0 0 0 3px #{{{{lc:{{{type|Normal}}}}} color}} inset;
        /* light background */
         background-color:#{{{{lc:{{{type|Normal}}}}} color light}};
       ">
       ">


   <!-- title bar (uses *normal* colour) -->
   <!-- title bar: uses the *normal* shade -->
   <tr>
   <tr>
     <th colspan="2" class="header-main"
     <th colspan="2" class="header-main"
         style="background-color:#{{#var:colornormal}};">
         style="background-color:#{{{{lc:{{{type|Normal}}}}} color}};">
       {{{name}}}
       {{{name}}}
     </th>
     </th>
Line 29: Line 32:
   <tr><th scope="row">Accuracy</th>  <td>{{{accuracy|—}}}</td></tr>
   <tr><th scope="row">Accuracy</th>  <td>{{{accuracy|—}}}</td></tr>
   <tr><th scope="row">PP</th>        <td>{{{pp|—}}}</td></tr>
   <tr><th scope="row">PP</th>        <td>{{{pp|—}}}</td></tr>
</table>
</table>
</includeonly>
</includeonly>
<noinclude>{{documentation}}</noinclude>
<noinclude>{{documentation}}</noinclude>

Revision as of 04:35, 25 May 2025