Difference between revisions of "Template:ShipBoxTooltip"

From EVE University Wiki
Jump to: navigation, search
m (.sbtt-attributes: Remove unneeded float:)
m (Increase width found an instance where the content did not fit.)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<includeonly><onlyinclude>{{#css:
 
<includeonly><onlyinclude>{{#css:
  
.sbtt table {
+
.sbtt {
 
   width: 100%;
 
   width: 100%;
 
  }
 
  }
Line 38: Line 38:
 
.sbtt .sbtt-ship-category {
 
.sbtt .sbtt-ship-category {
 
   font-size: 11px;
 
   font-size: 11px;
   line-height: 10px;
+
   line-height: 11px;
 
  }
 
  }
  
Line 64: Line 64:
 
/* *** Ship attributes *** */
 
/* *** Ship attributes *** */
 
.sbtt .sbtt-attributes {
 
.sbtt .sbtt-attributes {
   width: 170px;
+
   width: 180px;
 
  }
 
  }
  
Line 80: Line 80:
 
}}
 
}}
 
{{Tooltip
 
{{Tooltip
|1={{#if:{{{shipname}}}
+
| 1={{#if: {{{shipname|}}} |[[{{{shipname}}}]] |{{Co|red|! parameter shipname missing !}} }}
| [[{{{shipname}}}]]
+
| 2=<table class="sbtt">
| parameter shipname missing
+
  <tr>
}}
+
   <td class="sbtt-image">{{#if: {{{shipimg|}}}
 
+
    | [[Image:{{{shipimg}}}|128x128px|link=]]
|2=<div class="sbtt">
+
    |  {{#if: {{{shipid|}}}
  <table>
+
        | {{Imageserver|types|{{{shipid}}}|render|size=128}}
   <tr>
+
        | [[Image:No-image.png|128x128px|link=]]
  <td class="sbtt-image">[[Image:{{#if:{{{shipimg|}}}
+
        }}
      |{{{shipimg}}}
+
    }}
      |No-image.png
+
    {{#if:{{{tech|}}} |<div class="techcornersmall">[[Image:CornerT{{{tech}}}s.png|link=]]</div> }}
      }}|80x80px|{{{shipname}}}]]{{#if:{{{tech|}}}
+
  </td>
      |<div class="techcornersmall">[[Image:CornerT{{{tech|2}}}s.png|link=]]</div>
+
  <td>
      | <!-- do nothing -->
+
  <div class="sbtt-header">
      }}</td>
+
    <div class="sbtt-ship-name">{{{shipname}}}</div>
  <td>
+
    <div class="sbtt-ship-category"><span class="sbtt-ship-group">{{{grouping|}}}</span> <span class="sbtt-ship-hull">{{{hulltype|}}}</span></div>
    <div class="sbtt-header">
+
  </div>
    <div class="sbtt-ship-name">{{{shipname}}}</div>
+
  {{#if: {{{highlights1|}}} {{{highlights2|}}} {{{highlights3|}}} {{{highlights4|}}}
    <div class="sbtt-ship-category"><span class="sbtt-ship-group">{{{grouping|Unique Ships}}}</span> <span class="sbtt-ship-hull">{{{hulltype|Unknown Class}}}</span></div>
+
    |<div class="sbtt-highlights"><!--
 +
-->  {{#if: {{{highlights1|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights1|}}}</div>}}<!--
 +
-->  {{#if: {{{highlights2|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights2|}}}</div>}}<!--
 +
-->  {{#if: {{{highlights3|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights3|}}}</div>}}<!--
 +
-->  {{#if: {{{highlights4|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights4|}}}</div>}}
 
     </div>
 
     </div>
    {{#if: {{{highlights1|}}}
+
  }}
    |<div class="sbtt-highlights">
+
  <div class="sbtt-attributes">
      <div>[[Image:Icon_highlights.png|10x10px]]{{{highlights1|}}}</div><!--
+
    <div>[[Image:icon_hi_slot.png|15x15px|link=]]{{#if: {{{highs|}}}
-->  {{#if: {{{highlights2|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights2|}}}</div>}}<!--
+
        | {{{highs}}} ({{#if: {{{launchers|}}} |{{{launchers}}} |0 }}/{{#if: {{{turrets|}}} |{{{turrets}}} |0 }})
-->  {{#if: {{{highlights3|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights3|}}}</div>}}<!--
+
        | 0 }} [[Image:icon_mid_slot.png|15x15px|link=]]{{#if: {{{mediums|}}} |{{{mediums}}} |0 }} [[Image:icon_low_slot.png|15x15px|link=]]{{#if: {{{lows|}}} |{{{lows}}} |0 }}
-->  {{#if: {{{highlights4|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights4|}}}</div>}}
 
    </div>
 
    }}
 
    <div class="sbtt-attributes">
 
    <div>[[Image:icon_hi_slot.png|15x15px|high slots]]{{{highs|0}}}({{{launchers|0}}}/{{{turrets|0}}}) [[Image:icon_mid_slot.png|15x15px|middle slots]]{{{mediums|0}}} [[Image:icon_low_slot.png|15x15px|low slots]]{{{lows|0}}}</div>
 
    <div>[[Image:icon_powergrid.png|15x15px|powergrid]]{{{powergrid|0 MW}}} [[Image:icon_cpu.png|15x15px|cpu output]]{{{cpu|0 tf}}}</div>
 
    <div>[[Image:Icon_velocity.png|15x15px|max. velocity]]{{{maxvelocity|0 m/s}}}</div>
 
    <div>[[Image:Icon_capacity.png|15x15px|cargo capacity]]{{{cargohold|0 m&#179;}}}</div>
 
 
     </div>
 
     </div>
   </td>
+
    <div>[[Image:icon_powergrid.png|15x15px|link=]]{{#if: {{{powergrid|}}} |{{{powergrid}}} |0 MW }} [[Image:icon_cpu.png|15x15px|link=]]{{#if: {{{cpu|}}} |{{{cpu}}} |0 tf }}</div>
   </tr>
+
    <div>[[Image:Icon_velocity.png|15x15px|link=]]{{#if: {{{maxvelocity|}}} |{{{maxvelocity}}} |0 m/s }}</div>
  </table>
+
    <div>[[Image:Icon_capacity.png|15x15px|link=]]{{#if: {{{cargohold|}}} |{{{cargohold}}} |0 m&#179; }}</div>
</div>
+
   </div>
}}</onlyinclude></includeonly><noinclude>
+
   </td>
{{documentation}}
+
  </tr>
</noinclude>
+
</table>
 +
}}</onlyinclude></includeonly><noinclude>{{documentation}}</noinclude>

Latest revision as of 13:35, 27 March 2023

Template documentation (for the above template, sometimes hidden or invisible)
Description
Creates a tooltip with a subset of the ships stats.
This template is a part of the Ship Database template set and designed to be used in conjunction with the templates on that category and is not meant to be used or called directly!.
If you're looking on how to use the Ship template please see this page instead.

DO NOT EDIT THE CONTENTS OF THIS TEMPLATE IF YOU ARE NOT SURE ON WHAT YOU ARE DOING.
Dependencies
Uses
{{Tooltip}}
{{Imageserver}} When no local image of ship is available and shipid is known.
Part of the parameter set of {{ShipArticle}}
Syntax
ShipBoxTooltip is not to be used on its own. It is to be called by using the wrapper template {{Ship}}
Template set
{{ShipArticle}}
{{Ship}}
{{ShipBoxLarge}}
{{ShipBoxTooltip}}
Sample
Some text {{Ship|Megathron Navy Issue}} more text.
gives...
Some text Megathron Navy Issue
Megathron Navy Issue.jpg
CornerTFs.png
Megathron Navy Issue
Faction Battleships Megathron Class
Icon highlights.pngHigh Amount of High Slots
Icon highlights.pngHigh Amount of Low Slots
Icon hi slot.png8 (1/7) Icon mid slot.png4 Icon low slot.png8
Icon powergrid.png16,275 MW Icon cpu.png630 tf
Icon velocity.png130 m/sec
Icon capacity.png840 m³
more text.


Bug icon red.png Bug: There is a problem with the presentation of the result. See Template talk:ShipBoxTooltip

Visit Template:ShipBoxTooltip/doc to edit this text! (How does this work?) (Refresh this text - why?)