Difference between revisions of "Template:ShipBoxTooltip"
From EVE University Wiki
m (Remove div around table, appears to have no function.) |
m (Add code to use CCP image service when no local(wiki) image, only works when shipid is known. Replace {{{parameter|default}}} with {{#if:}}, inconsistent behavior. Rewrite highlights logic to work even if a "lower" highlight is left out.) |
||
Line 38: | Line 38: | ||
.sbtt .sbtt-ship-category { | .sbtt .sbtt-ship-category { | ||
font-size: 11px; | font-size: 11px; | ||
− | line-height: | + | line-height: 11px; |
} | } | ||
Line 80: | Line 80: | ||
}} | }} | ||
{{Tooltip | {{Tooltip | ||
− | |1={{#if:{{{shipname}}} | + | | 1={{#if: {{{shipname|}}} |[[{{{shipname}}}]] |{{Co|red|! parameter shipname missing !}} }} |
− | + | | 2=<table class="sbtt"> | |
− | |||
− | }} | ||
− | |||
− | |2=<table class="sbtt"> | ||
<tr> | <tr> | ||
− | <td class="sbtt-image"> | + | <td class="sbtt-image">{{#if: {{{shipimg|}}} |
− | + | | [[Image:{{{shipimg}}}|128x128px|link=]] | |
− | + | | {{#if: {{{shipid|}}} | |
− | }}| | + | | {{Imageserver|types|{{{shipid}}}|render|size=128}} |
− | + | | [[Image:No-image.png|128x128px|link=]] | |
− | + | }} | |
− | + | }} | |
+ | {{#if:{{{tech|}}} |<div class="techcornersmall">[[Image:CornerT{{{tech}}}s.png|link=]]</div> }} | ||
+ | </td> | ||
<td> | <td> | ||
<div class="sbtt-header"> | <div class="sbtt-header"> | ||
<div class="sbtt-ship-name">{{{shipname}}}</div> | <div class="sbtt-ship-name">{{{shipname}}}</div> | ||
− | <div class="sbtt-ship-category"><span class="sbtt-ship-group">{{{grouping| | + | <div class="sbtt-ship-category"><span class="sbtt-ship-group">{{{grouping|}}}</span> <span class="sbtt-ship-hull">{{{hulltype|}}}</span></div> |
</div> | </div> | ||
− | {{#if: {{{highlights1|}}} | + | {{#if: {{{highlights1|}}} {{{highlights2|}}} {{{highlights3|}}} {{{highlights4|}}} |
− | |<div class="sbtt-highlights"> | + | |<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: {{{highlights2|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights2|}}}</div>}}<!-- | ||
--> {{#if: {{{highlights3|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights3|}}}</div>}}<!-- | --> {{#if: {{{highlights3|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights3|}}}</div>}}<!-- | ||
Line 108: | Line 106: | ||
}} | }} | ||
<div class="sbtt-attributes"> | <div class="sbtt-attributes"> | ||
− | <div>[[Image:icon_hi_slot.png|15x15px| | + | <div>[[Image:icon_hi_slot.png|15x15px|link=]]{{#if: {{{highs|}}} |
− | <div>[[Image:icon_powergrid.png|15x15px| | + | | {{{highs}}} ({{#if: {{{launchers|}}} |{{{launchers}}} |0 }}/{{#if: {{{turrets|}}} |{{{turrets}}} |0 }}) |
− | <div>[[Image:Icon_velocity.png|15x15px| | + | | 0 }} [[Image:icon_mid_slot.png|15x15px|link=]]{{#if: {{{mediums|}}} |{{{mediums}}} |0 }} [[Image:icon_low_slot.png|15x15px|link=]]{{#if: {{{lows|}}} |{{{lows}}} |0 }} |
− | <div>[[Image:Icon_capacity.png|15x15px| | + | </div> |
+ | <div>[[Image:icon_powergrid.png|15x15px|link=]]{{#if: {{{powergrid|}}} |{{{powergrid}}} |0 MW }} [[Image:icon_cpu.png|15x15px|link=]]{{#if: {{{cpu|}}} |{{{cpu}}} |0 tf }}</div> | ||
+ | <div>[[Image:Icon_velocity.png|15x15px|link=]]{{#if: {{{maxvelocity|}}} |{{{maxvelocity}}} |0 m/s }}</div> | ||
+ | <div>[[Image:Icon_capacity.png|15x15px|link=]]{{#if: {{{cargohold|}}} |{{{cargohold}}} |0 m³ }}</div> | ||
</div> | </div> | ||
</td> | </td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
− | }}</onlyinclude></includeonly><noinclude> | + | }}</onlyinclude></includeonly><noinclude>{{documentation}}</noinclude> |
− | {{documentation}} | ||
− | </noinclude> |
Revision as of 14:20, 11 February 2023
Template documentation (for the above template, sometimes hidden or invisible)
- Description
- Creates a tooltip with a subset of the ships stats.
- 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
gives...Some text {{Ship|Megathron Navy Issue}} more text.
Megathron Navy Issue
Faction Battleships Megathron Class
8 (1/7) 4 8
16,275 MW 630 tf
130 m/sec
840 m³
|
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?)