Difference between revisions of "Template:ShipBoxTooltip"

From EVE University Wiki
Jump to: navigation, search
(rebuild tooltip to accomodate the new tooltip tool)
m (Increase width found an instance where the content did not fit.)
 
(60 intermediate revisions by 4 users not shown)
Line 1: Line 1:
For usage guide please see [[Template:Ship|Ship Template]]
 
 
<includeonly><onlyinclude>{{#css:
 
<includeonly><onlyinclude>{{#css:
.uniwiki-ship-tooltip
+
 
{
+
.sbtt {
+
  width: 100%;
}
+
}
.uniwiki-ship-tooltip table, .uniwiki-ship-tooltip tr, .uniwiki-ship-tooltip td
+
 
{
+
.sbtt td.sbtt-image {
padding: 0; margin : 0;
+
  position: relative;
}
+
  padding-right: 5px;
.uniwiki-ship-tooltip-header
+
  vertical-align: top;
{
+
}
+
 
}
+
.sbtt sbtt-image a img {
.uniwiki-ship-tooltip-header .tooltip-header-shipname
+
  border: 1px solid #272727;
{
+
}
color: white;
+
 
font-family: trebuchet MS;
+
.sbtt .techcornersmall {
font-size: 16px;
+
  position: absolute;
font-variant: small-caps;
+
  top: 0;
height: 20px;
+
  left: 2px;
line-height: 20px;
+
}
}
+
 
.uniwiki-ship-tooltip-header .tooltip-header-category
+
/* header */
{
+
.sbtt .sbtt-header {
font-size: 11px;
+
  margin-bottom: 5px;
height: 10px;
+
  border-bottom: 1px solid #272727;
line-height: 10px;
+
  padding-bottom: 5px;
}
+
  text-align: center;
.uniwiki-ship-tooltip-middle
+
}
{
+
 
+
.sbtt .sbtt-ship-name {
}
+
  height: 20px;
.uniwiki-ship-tooltip-middle .tt-hl
+
  white-space: nowrap;
{
+
  color: white;
color: khaki;
+
  font: small-caps 16px/15px trebuchet MS;
font-size: 10px;
+
}
height: 10px;
+
 
line-height: 12px;
+
.sbtt .sbtt-ship-category {
}
+
  font-size: 11px;
.uniwiki-ship-tooltip-bottom
+
  line-height: 11px;
{
+
}
+
 
}
+
.sbtt .sbtt-ship-group {
.uniwiki-ship-tooltip-bottom .tt-att
+
  white-space: nowrap;
{
+
  color: orange;
color: #9E8F75;
+
}
display: inline-block;
+
 
font-size: 10px;
+
.sbtt .sbtt-ship-hull {
height: 13px;
+
  white-space: nowrap;
line-height: 15px;
+
}
margin-right: 3px;
+
 
padding-right: 3px;
+
/* Highlights */
}
+
.sbtt .sbtt-highlights {
 +
  padding-bottom: 5px;
 +
}
 +
 
 +
.sbtt .sbtt-highlights div {
 +
  height: 10px;
 +
  color: khaki;
 +
  font-size: 10px;
 +
  line-height: 12px;
 +
}
 +
 
 +
/* *** Ship attributes *** */
 +
.sbtt .sbtt-attributes {
 +
  width: 180px;
 +
}
 +
 
 +
.sbtt .sbtt-attributes div {
 +
  float: left;
 +
  margin-right: 3px;
 +
  padding-right: 3px;
 +
  height: 13px;
 +
  white-space: nowrap;
 +
  color: #9E8F75;
 +
  font-size: 10px;
 +
  line-height: 15px;
 +
}
 +
 
 
}}
 
}}
 
{{Tooltip
 
{{Tooltip
|1=[[{{{shipname}}}|{{#if:{{{shipname}}}|{{{shipname|Unknown Ship}}}|Unknown Ship}}]]
+
| 1={{#if: {{{shipname|}}} |[[{{{shipname}}}]] |{{Co|red|! parameter shipname missing !}} }}
|2=<div class='uniwiki-ship-tooltip'>
+
| 2=<table class="sbtt">
<table cellspacing='0' cellpadding='0'>
+
<tr>
<tr>
+
  <td class="sbtt-image">{{#if: {{{shipimg|}}}
<td>[[Image:Falcon.jpg|80x80px|middle|Falcon]]</td>
+
    | [[Image:{{{shipimg}}}|128x128px|link=]]
<td>
+
    |  {{#if: {{{shipid|}}}
<div class='uniwiki-ship-tooltip-header'>
+
        | {{Imageserver|types|{{{shipid}}}|render|size=128}}
<div class='tooltip-header-shipname'>Falcon</div>
+
        | [[Image:No-image.png|128x128px|link=]]
<div class='tooltip-header-category'><span style='color:orange;'>Recon Ships</span><span>Blackbird Class</span></div>
+
        }}
</div>
+
    }}
<div class='uniwiki-ship-tooltip-middle' style='border-bottom: 1px solid #272727;padding-bottom: 2px;display:{{#if:{{{highlights1|}}}|block|none}}'>
+
    {{#if:{{{tech|}}} |<div class="techcornersmall">[[Image:CornerT{{{tech}}}s.png|link=]]</div> }}
<div class='tt-hl'>[[Image:Icon_highlights.png|10x10px|middle|highlights]]{{{highlights1|}}}</div>
+
  </td>
<div class='tt-hl'>[[Image:Icon_highlights.png|10x10px|middle|highlights]]{{{highlights2|}}}</div>
+
  <td>
<div class='tt-hl'>[[Image:Icon_highlights.png|10x10px|middle|highlights]]{{{highlights3|}}}</div>
+
  <div class="sbtt-header">
</div>
+
    <div class="sbtt-ship-name">{{{shipname}}}</div>
<div class='uniwiki-ship-tooltip-bottom'>
+
    <div class="sbtt-ship-category"><span class="sbtt-ship-group">{{{grouping|}}}</span> <span class="sbtt-ship-hull">{{{hulltype|}}}</span></div>
<span class='tt-att'>[[Image:icon_hi_slot.png|15x15px|middle|high slots]]{{{highs|0}}}<span style='display:inline;'>({{{launchers|0}}}/{{{turrets|0}}})</span></span>
+
  </div>
<span class='tt-att'>[[Image:icon_mid_slot.png|15x15px|middle|middle slots]]{{{mediums|0}}}</span>
+
  {{#if: {{{highlights1|}}} {{{highlights2|}}} {{{highlights3|}}} {{{highlights4|}}}
<span class='tt-att'>[[Image:icon_low_slot.png|15x15px|middle|low slots]]{{{lows|0}}}</span>
+
    |<div class="sbtt-highlights"><!--
<span class='tt-att'>[[Image:icon_powergrid.png|15x15px|middle|powergrid]]{{{powergrid|0 MW}}}</span>
+
--{{#if: {{{highlights1|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights1|}}}</div>}}<!--
<span class='tt-att'>[[Image:icon_cpu.png|15x15px|middle|cpu output]]{{{cpu|0 tf}}}</span>
+
-->  {{#if: {{{highlights2|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights2|}}}</div>}}<!--
<span class='tt-att'>[[Image:Icon_velocity.png|15x15px|middle|max. velocity]]{{{maxvelocity|0 m/s}}}</span>
+
-->  {{#if: {{{highlights3|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights3|}}}</div>}}<!--
<span class='tt-att'>[[Image:Icon_capacity.png|15x15px|middle|cargo capacity]]{{{cargohold|0 m&#179;}}}</span>
+
-->  {{#if: {{{highlights4|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights4|}}}</div>}}
</div>
+
    </div>
</span>
+
  }}
</td>
+
  <div class="sbtt-attributes">
</tr>
+
    <div>[[Image:icon_hi_slot.png|15x15px|link=]]{{#if: {{{highs|}}}
</table>
+
        | {{{highs}}} ({{#if: {{{launchers|}}} |{{{launchers}}} |0 }}/{{#if: {{{turrets|}}} |{{{turrets}}} |0 }})
</div>
+
        | 0 }} [[Image:icon_mid_slot.png|15x15px|link=]]{{#if: {{{mediums|}}} |{{{mediums}}} |0 }} [[Image:icon_low_slot.png|15x15px|link=]]{{#if: {{{lows|}}} |{{{lows}}} |0 }}
}}</onlyinclude></includeonly>[[Category:Template]]
+
    </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?)