Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:ShipArticle: Difference between revisions

Template page
m Reformat source to increase, at least to me, the readability. Add comments. In preparation of template maintenance.
m Swap position of armor and shields so armor shows between structure and shield. Remove test code.
Line 197: Line 197:


<!--* Breadcrumbs *-->
<!--* Breadcrumbs *-->
  <div class='breadcrumbs'>[[:Category:Ship Database|Ship Database]]<span class='separator'>&#9656;</span>[[:Category:{{{grouping|Unique Ships}}}|{{{grouping|Unique Ships}}}]]<span class='separator'>&#9656;</span>[[{{{shipname|Unknown}}}]]<!--{{#if: {{{shipname|}}}
  <div class='breadcrumbs'>[[:Category:Ship Database|Ship Database]]<span class='separator'>&#9656;</span>[[:Category:{{{grouping|Unique Ships}}}|{{{grouping|Unique Ships}}}]]<span class='separator'>&#9656;</span>[[{{{shipname|Unknown}}}]]
  | [[{{{shipname}}}]]
  | Unknown
  }} Test code for using #if: -->
  </div>
  </div>


Line 225: Line 222:
           }}]]
           }}]]
         |{{#if: {{{shipid}}}
         |{{#if: {{{shipid}}}
<!--          | {{Imageserver|types|{{{shipid}}}|render|size=256}} Test code for using the Imageserver template-->
           | https://images.evetech.net/types/{{{shipid}}}/render?size=256&.jpg
           | https://images.evetech.net/types/{{{shipid}}}/render?size=256&.jpg
           | [[Image:no-image.png|center|link= |256x256px|{{#if: {{{shipname}}}
           | [[Image:no-image.png|center|link= |256x256px|{{#if: {{{shipname}}}
Line 784: Line 780:
       <tr><td class='separator'></td></tr>
       <tr><td class='separator'></td></tr>


<!--** Ship attributes - Shield **-->
<!--** Ship attributes - Armor **-->
       <tr class='token'>
       <tr class='token'>
         <td class='line-label'><span class='label'>Shields</span></td>
         <td class='line-label'><span class='label'>Armor</span></td>
         <td class='att-line'>
         <td class='att-line'>


<!--*** hitpoints ***-->
<!--*** hitpoints ***-->
         <div class='att-item'>
         <div class='att-item'>
           <div class='item att-label'>Shield Capacity</div><div class='item att-img'>[[Image:icon_shield.png|20px|middle|shields]]</div><div class='item att-value'>{{{shieldhp|0 HP}}}</div>
           <div class='item att-label'>Armor Hitpoints</div><div class='item att-img'>[[Image:icon_armor.png|20px|middle|armor]]</div><div class='item att-value'>{{{armorhp|0 HP}}}</div>


<!--*** resistances ***-->
<!--*** resistances ***-->
           <div class='item att-label' style='margin-left: 5px;'>Shield Resistances</div>
           <div class='item att-label' style='margin-left: 5px;'>Armor Resistances</div>


           <div class='item'>
           <div class='item'>
Line 801: Line 797:
           <div style='display: inline-block;'>
           <div style='display: inline-block;'>
             <div class='box-resist bgr-em'>
             <div class='box-resist bgr-em'>
             <div class='resist-value val-em' style='width: {{#expr:  
             <div class='resist-value val-em' style='width: {{#expr:
                 {{#expr:  
                 {{#expr:
                   {{#if: {{{shieldem}}}
                   {{#if: {{{armorem}}}
                     | {{{shieldem|0}}}
                     | {{{armorem|0}}}
                     | 0
                     | 0
                   }}/2
                   }}/2
                 }} round 0
                 }} round 0
               }}px;'>
               }}px;'>
               <div class='value-text'>{{#if: {{{shieldem}}}
               <div class='value-text'>{{#if: {{{armorem}}}
                   | {{{shieldem|0}}}
                   | {{{armorem|0}}}
                   | 0
                   | 0
                 }}
                 }}
               </div>
               </div>
            </div>
             </div>
             </div>
           </div>
           </div>
           </div>
           </div>
        </div>


        <div class='item'>
          <div class='item'>
          <div class='item att-label' style='color: #9E8F75; margin-left: 5px; font-size: 80%;'>THR</div>
          <div class='item att-label' style='color:#9E8F75;margin-left: 5px;font-size: 80%;'>THR</div>
          <div class='item att-img'>[[Image:icon_resist_therm.png|20px|shield thermal resistance]]</div>
          <div class='item att-img'>[[Image:icon_resist_therm.png|20px|armor thermal resistance]]</div>
          <div style='display: inline-block;'>
          <div style='display: inline-block;'>
          <div class='box-resist bgr-thr'>
            <div class='box-resist bgr-thr'>
            <div class='resist-value val-thr' style='width: {{#expr:  
            <div class='resist-value val-thr' style='width: {{#expr:
                 {{#expr:
                 {{#expr:
                   {{#if: {{{shieldtherm}}}
                   {{#if: {{{armortherm}}}
                     | {{{shieldtherm|0}}}
                     | {{{armortherm|0}}}
                     | 0
                     | 0
                   }}/2
                   }}/2
                 }} round 0
                 }} round 0}}px;'>
                }}px;'>  
              <div class='value-text'>{{#if: {{{armortherm}}}
            <div class='value-text'>{{#if: {{{shieldtherm}}}
                  | {{{armortherm|0}}}
                | {{{shieldtherm|0}}}
                  | 0
                | 0
                }}
                }}
               </div>
               </div>
             </div>
             </div>
Line 844: Line 839:
           <div class='item'>
           <div class='item'>
           <div class='item att-label' style='color:#9E8F75;margin-left: 5px;font-size: 80%;'>KIN</div>
           <div class='item att-label' style='color:#9E8F75;margin-left: 5px;font-size: 80%;'>KIN</div>
           <div class='item att-img'>[[Image:icon_resist_kin.png|20px|shield kinetic resistance]]</div>
           <div class='item att-img'>[[Image:icon_resist_kin.png|20px|armor kinetic resistance]]</div>
           <div style='display: inline-block;'>
           <div style='display: inline-block;'>
             <div class='box-resist bgr-kin'>
             <div class='box-resist bgr-kin'>
             <div class='resist-value val-kin' style='width: {{#expr:  
             <div class='resist-value val-kin' style='width: {{#expr:
                 {{#expr:
                 {{#expr:
                   {{#if: {{{shieldkin}}}
                   {{#if: {{{armorkin}}}
                     | {{{shieldkin|0}}}
                     | {{{armorkin|0}}}
                     | 0
                     | 0
                   }}/2
                   }}/2
                 }} round 0
                 }}round0}}px;'>
              }}px;'>
               <div class='value-text'>{{#if: {{{armorkin}}}
               <div class='value-text'>{{#if: {{{shieldkin}}}
                   | {{{armorkin|0}}}
                   | {{{shieldkin|0}}}
                   | 0
                   | 0
                 }}
                 }}
Line 865: Line 859:
           </div>
           </div>


           <div class='item'><!--  open div 2  -->
           <div class='item'>
           <div class='item att-label' style='color:#9E8F75;margin-left: 5px;font-size: 80%;'>EXP</div>
           <div class='item att-label' style='color:#9E8F75;margin-left: 5px;font-size: 80%;'>EXP</div>
           <div class='item att-img'>[[Image:icon_resist_exp.png|20px|shield explosive resistance]]</div>
           <div class='item att-img'>[[Image:icon_resist_exp.png|20px|armor explosive resistance]]</div>
           <div style='display: inline-block;'>
           <div style='display: inline-block;'>
             <div class='box-resist bgr-exp'>
             <div class='box-resist bgr-exp'>
             <div class='resist-value val-exp' style='width: {{#expr:  
             <div class='resist-value val-exp' style='width: {{#expr:
                 {{#expr:
                 {{#expr:
                   {{#if: {{{shieldexp}}}
                   {{#if: {{{armorexp}}}
                     | {{{shieldexp|0}}}
                     | {{{armorexp|0}}}
                     | 0
                     | 0
                   }}/2
                   }}/2
                 }} round 0
                 }}round0}}px;'>
              }}px;'>
               <div class='value-text'>{{#if: {{{armorexp}}}
               <div class='value-text'>{{#if: {{{shieldexp}}}
                   | {{{armorexp|0}}}
                   | {{{shieldexp|0}}}
                   | 0
                   | 0
                 }}
                 }}
Line 893: Line 886:
       <tr><td class='separator'></td></tr>
       <tr><td class='separator'></td></tr>


<!--** Ship attributes - Armor **-->
<!--** Ship attributes - Shield **-->
       <tr class='token'>
       <tr class='token'>
         <td class='line-label'><span class='label'>Armor</span></td>
         <td class='line-label'><span class='label'>Shields</span></td>
         <td class='att-line' style='border-bottom: medium none;'>
         <td class='att-line' style='border-bottom: medium none;'>


<!--*** hitpoints ***-->
<!--*** hitpoints ***-->
         <div class='att-item'>
         <div class='att-item'>
           <div class='item att-label'>Armor Hitpoints</div><div class='item att-img'>[[Image:icon_armor.png|20px|middle|armor]]</div><div class='item att-value'>{{{armorhp|0 HP}}}</div>
           <div class='item att-label'>Shield Capacity</div><div class='item att-img'>[[Image:icon_shield.png|20px|middle|shields]]</div><div class='item att-value'>{{{shieldhp|0 HP}}}</div>


<!--*** resistances ***-->
<!--*** resistances ***-->
           <div class='item att-label' style='margin-left: 5px;'>Armor Resistances</div>
           <div class='item att-label' style='margin-left: 5px;'>Shield Resistances</div>


           <div class='item'>
           <div class='item'>
Line 910: Line 903:
           <div style='display: inline-block;'>
           <div style='display: inline-block;'>
             <div class='box-resist bgr-em'>
             <div class='box-resist bgr-em'>
             <div class='resist-value val-em' style='width: {{#expr:
             <div class='resist-value val-em' style='width: {{#expr:  
                 {{#expr:
                 {{#expr:  
                   {{#if: {{{armorem}}}
                   {{#if: {{{shieldem}}}
                     | {{{armorem|0}}}
                     | {{{shieldem|0}}}
                     | 0
                     | 0
                   }}/2
                   }}/2
                 }} round 0
                 }} round 0
               }}px;'>
               }}px;'>
               <div class='value-text'>{{#if: {{{armorem}}}
               <div class='value-text'>{{#if: {{{shieldem}}}
                   | {{{armorem|0}}}
                   | {{{shieldem|0}}}
                   | 0
                   | 0
                 }}
                 }}
               </div>
               </div>
            </div>
             </div>
             </div>
           </div>
           </div>
           </div>
           </div>
        </div>


          <div class='item'>
        <div class='item'>
          <div class='item att-label' style='color:#9E8F75;margin-left: 5px;font-size: 80%;'>THR</div>
          <div class='item att-label' style='color: #9E8F75; margin-left: 5px; font-size: 80%;'>THR</div>
          <div class='item att-img'>[[Image:icon_resist_therm.png|20px|armor thermal resistance]]</div>
          <div class='item att-img'>[[Image:icon_resist_therm.png|20px|shield thermal resistance]]</div>
          <div style='display: inline-block;'>
          <div style='display: inline-block;'>
            <div class='box-resist bgr-thr'>
          <div class='box-resist bgr-thr'>
            <div class='resist-value val-thr' style='width: {{#expr:
            <div class='resist-value val-thr' style='width: {{#expr:  
                 {{#expr:
                 {{#expr:
                   {{#if: {{{armortherm}}}
                   {{#if: {{{shieldtherm}}}
                     | {{{armortherm|0}}}
                     | {{{shieldtherm|0}}}
                     | 0
                     | 0
                   }}/2
                   }}/2
                 }} round 0}}px;'>
                 }} round 0
              <div class='value-text'>{{#if: {{{armortherm}}}
                }}px;'>  
                  | {{{armortherm|0}}}
            <div class='value-text'>{{#if: {{{shieldtherm}}}
                  | 0
                | {{{shieldtherm|0}}}
                }}
                | 0
                }}
               </div>
               </div>
             </div>
             </div>
Line 952: Line 946:
           <div class='item'>
           <div class='item'>
           <div class='item att-label' style='color:#9E8F75;margin-left: 5px;font-size: 80%;'>KIN</div>
           <div class='item att-label' style='color:#9E8F75;margin-left: 5px;font-size: 80%;'>KIN</div>
           <div class='item att-img'>[[Image:icon_resist_kin.png|20px|armor kinetic resistance]]</div>
           <div class='item att-img'>[[Image:icon_resist_kin.png|20px|shield kinetic resistance]]</div>
           <div style='display: inline-block;'>
           <div style='display: inline-block;'>
             <div class='box-resist bgr-kin'>
             <div class='box-resist bgr-kin'>
             <div class='resist-value val-kin' style='width: {{#expr:
             <div class='resist-value val-kin' style='width: {{#expr:  
                 {{#expr:
                 {{#expr:
                   {{#if: {{{armorkin}}}
                   {{#if: {{{shieldkin}}}
                     | {{{armorkin|0}}}
                     | {{{shieldkin|0}}}
                     | 0
                     | 0
                   }}/2
                   }}/2
                 }}round0}}px;'>
                 }} round 0
               <div class='value-text'>{{#if: {{{armorkin}}}
              }}px;'>
                   | {{{armorkin|0}}}
               <div class='value-text'>{{#if: {{{shieldkin}}}
                   | {{{shieldkin|0}}}
                   | 0
                   | 0
                 }}
                 }}
Line 974: Line 969:
           <div class='item'>
           <div class='item'>
           <div class='item att-label' style='color:#9E8F75;margin-left: 5px;font-size: 80%;'>EXP</div>
           <div class='item att-label' style='color:#9E8F75;margin-left: 5px;font-size: 80%;'>EXP</div>
           <div class='item att-img'>[[Image:icon_resist_exp.png|20px|armor explosive resistance]]</div>
           <div class='item att-img'>[[Image:icon_resist_exp.png|20px|shield explosive resistance]]</div>
           <div style='display: inline-block;'>
           <div style='display: inline-block;'>
             <div class='box-resist bgr-exp'>
             <div class='box-resist bgr-exp'>
             <div class='resist-value val-exp' style='width: {{#expr:
             <div class='resist-value val-exp' style='width: {{#expr:  
                 {{#expr:
                 {{#expr:
                   {{#if: {{{armorexp}}}
                   {{#if: {{{shieldexp}}}
                     | {{{armorexp|0}}}
                     | {{{shieldexp|0}}}
                     | 0
                     | 0
                   }}/2
                   }}/2
                 }}round0}}px;'>
                 }} round 0
               <div class='value-text'>{{#if: {{{armorexp}}}
              }}px;'>
                   | {{{armorexp|0}}}
               <div class='value-text'>{{#if: {{{shieldexp}}}
                   | {{{shieldexp|0}}}
                   | 0
                   | 0
                 }}
                 }}