Difference between revisions of "Template:ShipBoxTooltip"

From EVE University Wiki
Jump to: navigation, search
m (fixed image bug)
m (Increase width found an instance where the content did not fit.)
 
(67 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{#css:
+
<includeonly><onlyinclude>{{#css:
.ship-tooltip
+
 
{
+
.sbtt {
font-size: 90%;
+
  width: 100%;
line-height: 110%;
+
}
width: 330px;
+
 
}
+
.sbtt td.sbtt-image {
.ship-tooltip span
+
  position: relative;
{
+
  padding-right: 5px;
display: block;
+
  vertical-align: top;
vertical-align: top;
+
}
}
+
 
.ship-tooltip .tt-left
+
.sbtt sbtt-image a img {
{
+
  border: 1px solid #272727;
display: inline-block;
+
}
margin-right: 5px;
+
 
width: 80px;
+
.sbtt .techcornersmall {
}
+
  position: absolute;
.ship-tooltip .tt-left img
+
  top: 0;
{
+
  left: 2px;
+
}
}
+
 
.ship-tooltip .tt-right
+
/* header */
{
+
.sbtt .sbtt-header {
display: inline-block;
+
  margin-bottom: 5px;
width: 240px;
+
  border-bottom: 1px solid #272727;
}
+
  padding-bottom: 5px;
.ship-tooltip .tt-right .tt-header
+
  text-align: center;
{
+
}
height: 20px;
+
 
overflow: hidden;
+
.sbtt .sbtt-ship-name {
width: 240px;
+
  height: 20px;
}
+
  white-space: nowrap;
.ship-tooltip .tt-right .tt-header span,
+
  color: white;
.ship-tooltip .tt-right .tt-subheader span
+
  font: small-caps 16px/15px trebuchet MS;
{
+
}
display: inline-block;
+
 
}
+
.sbtt .sbtt-ship-category {
.ship-tooltip .tt-right .tt-header .tt-shipname
+
  font-size: 11px;
{
+
  line-height: 11px;
color: white;
+
}
font-family: trebuchet MS;
+
 
font-size: 16px;
+
.sbtt .sbtt-ship-group {
font-variant: small-caps;
+
  white-space: nowrap;
height: 20px;
+
  color: orange;
line-height: 20px;
+
}
width: 180px;
+
 
}
+
.sbtt .sbtt-ship-hull {
.ship-tooltip .tt-right .tt-header .tt-race
+
  white-space: nowrap;
{
+
}
float: right;
+
 
height: 20px;
+
/* Highlights */
line-height: 25px;
+
.sbtt .sbtt-highlights {
}
+
  padding-bottom: 5px;
.ship-tooltip .tt-right .tt-subheader .tt-grouping,
+
}
.ship-tooltip .tt-right .tt-subheader .tt-hulltype
+
 
{
+
.sbtt .sbtt-highlights div {
font-size: 11px;
+
  height: 10px;
height: 10px;
+
  color: khaki;
line-height: 10px;
+
  font-size: 10px;
}
+
  line-height: 12px;
.ship-tooltip .tt-right .tt-contents
+
}
{
+
 
border-top: 1px solid #272727;
+
/* *** Ship attributes *** */
padding-top: 2px;
+
.sbtt .sbtt-attributes {
}
+
  width: 180px;
.ship-tooltip .tt-right .tt-contents .tt-contentsrow .tt-hl
+
}
{
+
 
color: khaki;
+
.sbtt .sbtt-attributes div {
display: inline-block;
+
  float: left;
font-size: 10px;
+
  margin-right: 3px;
height: 10px;
+
  padding-right: 3px;
line-height: 12px;
+
  height: 13px;
}
+
  white-space: nowrap;
.ship-tooltip .tt-right .tt-contents .tt-contentsrow .tt-hl a
+
  color: #9E8F75;
{
+
  font-size: 10px;
height: 10px;
+
  line-height: 15px;
line-height: 10px;
+
}
margin-right: 2px;
+
 
vertical-align: top;
 
}
 
.ship-tooltip .tt-right .tt-contents .tt-contentsrow .tt-att
 
{
 
color: #9E8F75;
 
display: inline-block;
 
font-size: 10px;
 
height: 13px;
 
line-height: 15px;
 
margin-right: 3px;
 
padding-right: 3px;
 
}
 
 
}}
 
}}
 
{{Tooltip
 
{{Tooltip
|1=[[Drake|Drake]]
+
| 1={{#if: {{{shipname|}}} |[[{{{shipname}}}]] |{{Co|red|! parameter shipname missing !}} }}
|2=<span class='ship-tooltip'>
+
| 2=<table class="sbtt">
<span class='tt-left'>[[Image:{{{shipimg|no-image.png}}}|80x80px|middle|{{#if:{{{shipname}}}|{{{shipname}}}|Unknown Ship}}]]</span>
+
<tr>
<span class='tt-right'>
+
  <td class="sbtt-image">{{#if: {{{shipimg|}}}
<span class='tt-header'>
+
    | [[Image:{{{shipimg}}}|128x128px|link=]]
<span class='tt-shipname'>{{#if:{{{shipname}}}|{{{shipname|Unknown Ship}}}|Unknown Ship}}</span>
+
    | {{#if: {{{shipid|}}}
<span class='tt-race'>[[Image:{{#switch:{{{faction}}}|Amarr Empire=Logo_faction_amarr_empire.png |Caldari State=Logo_faction_caldari_state.png |Gallente Federation=Logo_faction_gallente_federation.png |Minmatar Republic=Logo_faction_minmatar_republic.png |Outer Ring Excavations=Logo_faction_outer_ring_excavations.png |#default=no-image.png}}|30x30px|middle|{{#if:{{{faction}}}|{{{faction|Unknown}}}|Unknown}}]]</span>
+
        | {{Imageserver|types|{{{shipid}}}|render|size=128}}
</span>
+
        | [[Image:No-image.png|128x128px|link=]]
<span class='tt-subheader'>
+
        }}
<span class='tt-grouping'>[[:Category:{{{grouping|Unique Ships}}}|{{{grouping|Unique Ships}}}]]</span>
+
    }}
<span class='tt-hulltype'>{{{hulltype|Unknown Class}}}</span>
+
    {{#if:{{{tech|}}} |<div class="techcornersmall">[[Image:CornerT{{{tech}}}s.png|link=]]</div> }}
</span>
+
  </td>
<span class='tt-contents'>
+
  <td>
<span class='tt-contentsrow' style='border-bottom: 1px solid #272727;padding-bottom: 2px;display:{{#if:{{{highlights1|}}}|block|none}}'>
+
  <div class="sbtt-header">
<span class='tt-hl'>[[Image:Icon_highlights.png|10x10px|middle|highlights]]{{{highlights1|}}}</span>
+
    <div class="sbtt-ship-name">{{{shipname}}}</div>
</span>
+
    <div class="sbtt-ship-category"><span class="sbtt-ship-group">{{{grouping|}}}</span> <span class="sbtt-ship-hull">{{{hulltype|}}}</span></div>
<span class='tt-contentsrow'>
+
  </div>
<span class='tt-att'>[[Image:icon_hi_slot.png|15x15px|middle|high slots]]{{{highs|0}}}<span class='label'>({{{launchers|0}}}/{{{turrets|0}}})</span></span>
+
  {{#if: {{{highlights1|}}} {{{highlights2|}}} {{{highlights3|}}} {{{highlights4|}}}
<span class='tt-att'>[[Image:icon_mid_slot.png|15x15px|middle|middle slots]]{{{mediums|0}}}</span>
+
    |<div class="sbtt-highlights"><!--
<span class='tt-att'>[[Image:icon_low_slot.png|15x15px|middle|low slots]]{{{lows|0}}}</span>
+
--{{#if: {{{highlights1|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights1|}}}</div>}}<!--
<span class='tt-att'>[[Image:icon_powergrid.png|15x15px|middle|powergrid]]{{{powergrid|0 MW}}}</span>
+
--> {{#if: {{{highlights2|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights2|}}}</div>}}<!--
<span class='tt-att'>[[Image:icon_cpu.png|15x15px|middle|cpu output]]{{{cpu|0 tf}}}</span>
+
--> {{#if: {{{highlights3|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights3|}}}</div>}}<!--
<span class='tt-att'>[[Image:Icon_velocity.png|15x15px|middle|max. velocity]]{{{maxvelocity|0 m/s}}}</span>
+
--{{#if: {{{highlights4|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights4|}}}</div>}}
<span class='tt-att'>[[Image:Icon_capacity.png|15x15px|middle|cargo capacity]]{{{cargohold|0 m&#179;}}}</span>
+
    </div>
</span>
+
  }}
</span>
+
  <div class="sbtt-attributes">
</span>
+
    <div>[[Image:icon_hi_slot.png|15x15px|link=]]{{#if: {{{highs|}}}
</span>
+
        | {{{highs}}} ({{#if: {{{launchers|}}} |{{{launchers}}} |0 }}/{{#if: {{{turrets|}}} |{{{turrets}}} |0 }})
|3=auto
+
        | 0 }} [[Image:icon_mid_slot.png|15x15px|link=]]{{#if: {{{mediums|}}} |{{{mediums}}} |0 }} [[Image:icon_low_slot.png|15x15px|link=]]{{#if: {{{lows|}}} |{{{lows}}} |0 }}
|4=auto
+
    </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&#179; }}</div>
 +
  </div>
 +
  </td>
 +
</tr>
 +
</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?)