Difference between revisions of "Template:ShipBoxTooltip"

From EVE University Wiki
Jump to: navigation, search
m (Ship name: remove test for empty parameter, parameter is tested before so simply use it. Besides error is incorrect because of the way this template is used if there really was an unknown ship the template would not be called at all.)
m (Highlights: rewrite to not construct div's when there are no highlights instead of constructing empty div's whit display none.)
Line 85: Line 85:
 
     <div class='tooltip-header-category'><span style='color:orange;margin-right: 5px;'>{{{grouping|Unique Ships}}}</span><span>{{{hulltype|Unknown Class}}}</span></div>
 
     <div class='tooltip-header-category'><span style='color:orange;margin-right: 5px;'>{{{grouping|Unique Ships}}}</span><span>{{{hulltype|Unknown Class}}}</span></div>
 
     </div>
 
     </div>
    <div class='uniwiki-ship-tooltip-middle' style='padding-bottom: 5px;display:{{#if:{{{highlights1|}}}|block|none}}'>
+
<!--    <div class='uniwiki-ship-tooltip-middle' style='padding-bottom: 5px;display:{{#if:{{{highlights1|}}}|block|none}}'>
 
     <div class='tt-hl'>[[Image:Icon_highlights.png|10x10px|middle|highlights]]{{{highlights1|}}}</div>
 
     <div class='tt-hl'>[[Image:Icon_highlights.png|10x10px|middle|highlights]]{{{highlights1|}}}</div>
 
     <div class='tt-hl' style='display:{{#if:{{{highlights2|}}}|block|none}}'>[[Image:Icon_highlights.png|10x10px|middle|highlights]]{{{highlights2|}}}</div>
 
     <div class='tt-hl' style='display:{{#if:{{{highlights2|}}}|block|none}}'>[[Image:Icon_highlights.png|10x10px|middle|highlights]]{{{highlights2|}}}</div>
 
     <div class='tt-hl' style='display:{{#if:{{{highlights3|}}}|block|none}}'>[[Image:Icon_highlights.png|10x10px|middle|highlights]]{{{highlights3|}}}</div>
 
     <div class='tt-hl' style='display:{{#if:{{{highlights3|}}}|block|none}}'>[[Image:Icon_highlights.png|10x10px|middle|highlights]]{{{highlights3|}}}</div>
     </div>
+
     </div> -->
 +
    {{#if: {{{highlights1|}}}
 +
    |<div class='uniwiki-ship-tooltip-middle' style='padding-bottom: 5px;>
 +
      <div class='tt-hl'>[[Image:Icon_highlights.png|10x10px]]{{{highlights1|}}}</div><!--
 +
-->  {{#if: {{{highlights2|}}}|<div class='tt-hl'>[[Image:Icon_highlights.png|10x10px]]{{{highlights2|}}}</div>}}<!--
 +
-->  {{#if: {{{highlights3|}}}|<div class='tt-hl'>[[Image:Icon_highlights.png|10x10px]]{{{highlights3|}}}</div>}}<!--
 +
-->  {{#if: {{{highlights4|}}}|<div class='tt-hl'>[[Image:Icon_highlights.png|10x10px]]{{{highlights4|}}}</div>}}
 +
    </div>
 +
    }}
 
     <div class='uniwiki-ship-tooltip-bottom'>
 
     <div class='uniwiki-ship-tooltip-bottom'>
 
     <div class='tt-att'>[[Image:icon_hi_slot.png|15x15px|middle|high slots]]{{{highs|0}}}<div style='display:inline;'>({{{launchers|0}}}/{{{turrets|0}}})</div></div>
 
     <div class='tt-att'>[[Image:icon_hi_slot.png|15x15px|middle|high slots]]{{{highs|0}}}<div style='display:inline;'>({{{launchers|0}}}/{{{turrets|0}}})</div></div>

Revision as of 15:09, 14 May 2022

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
CornerTFs.png
Megathron Navy Issue
Faction BattleshipsMegathron Class
Icon highlights.pngHigh Amount of High Slots
Icon highlights.pngHigh Amount of Low Slots
high slots8
(1/7)
middle slots4
low slots8
powergrid16,275 MW
cpu output630 tf
max. velocity130 m/sec
cargo capacity840 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?)