Difference between revisions of "Template:ShipBoxTooltip"

From EVE University Wiki
Jump to: navigation, search
m (Increase width found an instance where the content did not fit.)
 
(137 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{#css:
+
<includeonly><onlyinclude>{{#css:
.test-snippet{
 
    position:relative; /*this is the key*/
 
    z-index:24; background-color:transparent;
 
    color:orange;
 
    text-decoration:none}
 
  
.test-snippet:hover{z-index:25; background-color:#ff0}
+
.sbtt {
 +
  width: 100%;
 +
}
 +
 
 +
.sbtt td.sbtt-image {
 +
  position: relative;
 +
  padding-right: 5px;
 +
  vertical-align: top;
 +
}
 +
 
 +
.sbtt sbtt-image a img {
 +
  border: 1px solid #272727;
 +
}
 +
 
 +
.sbtt .techcornersmall {
 +
  position: absolute;
 +
  top: 0;
 +
  left: 2px;
 +
}
 +
 
 +
/* header */
 +
.sbtt .sbtt-header {
 +
  margin-bottom: 5px;
 +
  border-bottom: 1px solid #272727;
 +
  padding-bottom: 5px;
 +
  text-align: center;
 +
}
 +
 
 +
.sbtt .sbtt-ship-name {
 +
  height: 20px;
 +
  white-space: nowrap;
 +
  color: white;
 +
  font: small-caps 16px/15px trebuchet MS;
 +
}
 +
 
 +
.sbtt .sbtt-ship-category {
 +
  font-size: 11px;
 +
  line-height: 11px;
 +
}
 +
 
 +
.sbtt .sbtt-ship-group {
 +
  white-space: nowrap;
 +
  color: orange;
 +
}
 +
 
 +
.sbtt .sbtt-ship-hull {
 +
  white-space: nowrap;
 +
}
 +
 
 +
/* 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;
 +
}
  
.test-snippet .inner-snippet{display: none}
 
 
.test-snippet:hover .inner-snippet,.test-snippet.hover .inner-snippet
 
{
 
background-color: transparent;
 
border: medium none;
 
display: block;
 
left: 1em;
 
position: absolute;
 
top: 1.2em;
 
}
 
 
.test-snippet .inner-snippet span
 
{
 
display: block;
 
}
 
 
.test-snippet .inner-snippet .left, .test-snippet .inner-snippet .right
 
{
 
float:left;
 
}
 
.test-snippet .inner-snippet .l1
 
{
 
float: left;
 
font-family: trebuchet MS;
 
line-height: 20px;
 
margin-bottom: 3px;
 
width: 325px;
 
}
 
.test-snippet .inner-snippet .l2
 
{
 
border: 1px solid #525751;
 
color: #CCCCCC;
 
float: left;
 
font-family: trebuchet MS;
 
font-size: 11px;
 
line-height: 20px;
 
padding: 2px;
 
width: 321px;
 
}
 
.test-snippet .inner-snippet .l2 span
 
{
 
float:left;
 
}
 
.test-snippet .inner-snippet .l2 .att-line
 
{
 
background-color: #1D1C23;
 
width: 100%;
 
}
 
.test-snippet .inner-snippet .l2 .att-line .att-item
 
{
 
border-right: 2px solid black;
 
margin-right: 2px;
 
padding: 0 3px 0 2px;
 
}
 
.test-snippet .inner-snippet .l3
 
{
 
background-color: #1D1C23;
 
border-color: black;
 
border-right: 1px solid black;
 
border-style: none solid solid;
 
border-width: medium 1px 1px;
 
color: white;
 
float: left;
 
font-size: 10px;
 
line-height: 110%;
 
margin-left: -50px;
 
padding: 5px;
 
width: 350px;
 
}
 
 
}}
 
}}
 
+
{{Tooltip
<span class='test-snippet'>{{{shipname}}}<span style='margin-left: 3px; font-size: 60%; color: yellow;'>&#8595;</span>
+
| 1={{#if: {{{shipname|}}} |[[{{{shipname}}}]] |{{Co|red|! parameter shipname missing !}} }}
<span class='inner-snippet ship-info' style='width: 410px;'>
+
| 2=<table class="sbtt">
<span class='left' style='background-color: black; padding: 4px 0pt 4px 4px; width: 73px;'><span class='att-img'>[[Image:{{{shipimg}}}|73px|middle|{{{shipname}}}]]</span></span>
+
<tr>
<span class='right' style='margin-right: 4px; width: 327px;'>
+
  <td class="sbtt-image">{{#if: {{{shipimg|}}}
<span style='background-color: black; float: left; padding: 4px; width: 100%;'>
+
    | [[Image:{{{shipimg}}}|128x128px|link=]]
<span class='l1'>
+
    |  {{#if: {{{shipid|}}}
<span style='color: #F1EFCA;float: left;font-size: 18px;font-weight: bold;'>{{{shipname}}}<span style='display: {{#ifexist: Template:Ship.{{{shipname}}} | inline | none }}; font-size: 10px; line-height: 10px; padding-left: 3px;'>[[Template:Ship.Drake|goto article &#8250;]]</span></span>
+
        | {{Imageserver|types|{{{shipid}}}|render|size=128}}
<span style='color: #CCCCCC;float: right;font-size: 11px;'>{{{roles}}}</span>
+
        | [[Image:No-image.png|128x128px|link=]]
</span>
+
        }}
<span class='l2'>
+
    }}
<span class='att-line' style='margin-bottom:2px;'>
+
    {{#if:{{{tech|}}} |<div class="techcornersmall">[[Image:CornerT{{{tech}}}s.png|link=]]</div> }}
<span class='att-item' style='border-right:medium none;'>
+
  </td>
<span class='att-value'>{{{highs}}}</span><span class='att-img'>[[Image:icon_hi_slot.png|20px|middle|high slots]]</span><span class='att-label' style='color: #9A7535;'>high</span>
+
  <td>
</span>
+
  <div class="sbtt-header">
<span class='att-item' style='border-right:medium none;'>
+
    <div class="sbtt-ship-name">{{{shipname}}}</div>
<span class='att-value'>{{{launchers}}}</span><span class='att-img'>[[Image:icon_launcher_hp.png|20px|middle|launcher slots]]</span><span class='att-label'>launchers</span>
+
    <div class="sbtt-ship-category"><span class="sbtt-ship-group">{{{grouping|}}}</span> <span class="sbtt-ship-hull">{{{hulltype|}}}</span></div>
</span>
+
  </div>
<span class='att-item'>
+
  {{#if: {{{highlights1|}}} {{{highlights2|}}} {{{highlights3|}}} {{{highlights4|}}}
<span class='att-value'>{{{turrets}}}</span><span class='att-img'>[[Image:icon_turret_hp.png|20px|middle|turret slots]]</span><span class='att-label'>turrets</span>
+
    |<div class="sbtt-highlights"><!--
</span>
+
--> {{#if: {{{highlights1|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights1|}}}</div>}}<!--
<span class='att-item'>
+
--> {{#if: {{{highlights2|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights2|}}}</div>}}<!--  
<span class='att-value'>{{{mediums}}}</span><span class='att-img'>[[Image:icon_mid_slot.png|20px|middle|middle slots]]</span><span class='att-label' style='color: #9A7535;'>mid</span>
+
--> {{#if: {{{highlights3|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights3|}}}</div>}}<!--
</span>
+
--> {{#if: {{{highlights4|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights4|}}}</div>}}
<span class='att-item'>
+
    </div>
<span class='att-value'>{{{lows}}}</span><span class='att-img'>[[Image:icon_low_slot.png|20px|middle|low slots]]</span><span class='att-label' style='color: #9A7535;'>low</span>
+
  }}
</span>
+
  <div class="sbtt-attributes">
</span>
+
    <div>[[Image:icon_hi_slot.png|15x15px|link=]]{{#if: {{{highs|}}}
<span class='att-line'>
+
        | {{{highs}}} ({{#if: {{{launchers|}}} |{{{launchers}}} |0 }}/{{#if: {{{turrets|}}} |{{{turrets}}} |0 }})
<span class='att-item'>
+
        | 0 }} [[Image:icon_mid_slot.png|15x15px|link=]]{{#if: {{{mediums|}}} |{{{mediums}}} |0 }} [[Image:icon_low_slot.png|15x15px|link=]]{{#if: {{{lows|}}} |{{{lows}}} |0 }}
<span class='att-value' style='width:40px'>{{{dronebay}}}</span><span class='att-img'>[[Image:icon_drone_capacity.png|20px|middle|drone capacity]]</span><span class='att-label'>drones</span>
+
    </div>
</span>
+
    <div>[[Image:icon_powergrid.png|15x15px|link=]]{{#if: {{{powergrid|}}} |{{{powergrid}}} |0 MW }} [[Image:icon_cpu.png|15x15px|link=]]{{#if: {{{cpu|}}} |{{{cpu}}} |0 tf }}</div>
<span class='att-item'>
+
    <div>[[Image:Icon_velocity.png|15x15px|link=]]{{#if: {{{maxvelocity|}}} |{{{maxvelocity}}} |0 m/s }}</div>
<span class='att-value' style='width:70px'>{{{bandwidth}}}</span><span class='att-img'>[[Image:icon_drone_bandwith.png|20px|middle|drone bandwith]]</span><span class='att-label'>b/w</span>
+
    <div>[[Image:Icon_capacity.png|15x15px|link=]]{{#if: {{{cargohold|}}} |{{{cargohold}}} |0 m&#179; }}</div>
</span>
+
  </div>
<span class='att-item' style='border-right:medium none;'>
+
  </td>
<span class='att-value' style='width:40px'>{{{cargohold}}}</span><span class='att-img'>[[Image:Icon_capacity.png|20px|middle|cargo capacity]]</span><span class='att-label'>cargo</span>
+
</tr>
</span>
+
</table>
</span>
+
}}</onlyinclude></includeonly><noinclude>{{documentation}}</noinclude>
</span>
 
</span>
 
<span class='l3'>
 
<span style='text-align:left;'>{{{bonuses}}}</span>
 
</span>
 
</span>
 
</span>
 
</span>
 

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?)