Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:ShipBoxTooltip: Difference between revisions

Template page
No edit summary
m Increase width found an instance where the content did not fit.
 
(128 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{#css:
<includeonly><onlyinclude>{{#css:
.tooltip-frame{
    position:relative; /*this is the key*/
    z-index:24; background-color:transparent;
    color:orange;
    text-decoration:none}


.tooltip-frame:hover{z-index:25; color:white; text-decoration: underline;}
.sbtt {
  width: 100%;
}


.tooltip-frame .inner-snippet{display: none}
.sbtt td.sbtt-image {
  position: relative;
.tooltip-frame .inner-snippet,.tooltip-frame .inner-snippet
  padding-right: 5px;
{
  vertical-align: top;
background-color: transparent;
}
border: medium none;
 
display: block;
.sbtt sbtt-image a img {
left: 1em;
  border: 1px solid #272727;
position: absolute;
}
top: 1.2em;
 
}
.sbtt .techcornersmall {
  position: absolute;
.tooltip-frame:hover .inner-snippet,.tooltip-frame.hover .inner-snippet
  top: 0;
{
  left: 2px;
background-color: transparent;
}
border: medium none;
 
display: block;
/* header */
left: 1em;
.sbtt .sbtt-header {
position: absolute;
  margin-bottom: 5px;
top: 1.2em;
  border-bottom: 1px solid #272727;
}
  padding-bottom: 5px;
  text-align: center;
.tooltip-frame .inner-snippet span
}
{
 
display: block;
.sbtt .sbtt-ship-name {
}
  height: 20px;
  white-space: nowrap;
.tooltip-frame .inner-snippet .left, .tooltip-frame .inner-snippet .right
  color: white;
{
  font: small-caps 16px/15px trebuchet MS;
float:left;
}
}
 
.tooltip-frame .inner-snippet .l1
.sbtt .sbtt-ship-category {
{
  font-size: 11px;
float: left;
  line-height: 11px;
font-family: trebuchet MS;
}
line-height: 20px;
 
margin-bottom: 3px;
.sbtt .sbtt-ship-group {
width: 325px;
  white-space: nowrap;
}
  color: orange;
.tooltip-frame .inner-snippet .l2
}
{
 
border: 1px solid #525751;
.sbtt .sbtt-ship-hull {
color: #CCCCCC;
  white-space: nowrap;
float: left;
}
font-family: trebuchet MS;
 
font-size: 11px;
/* Highlights */
line-height: 20px;
.sbtt .sbtt-highlights {
padding: 2px;
  padding-bottom: 5px;
width: 321px;
}
}
 
.tooltip-frame .inner-snippet .l2 span
.sbtt .sbtt-highlights div {
{
  height: 10px;
float:left;
  color: khaki;
}
  font-size: 10px;
.tooltip-frame .inner-snippet .l2 .att-line
  line-height: 12px;
{
}
background-color: #1D1C23;
 
width: 100%;
/* *** Ship attributes *** */
}
.sbtt .sbtt-attributes {
.tooltip-frame .inner-snippet .l2 .att-line .att-item
  width: 180px;
{
}
border-right: 2px solid black;
 
margin-right: 2px;
.sbtt .sbtt-attributes div {
padding: 0 3px 0 2px;
  float: left;
}
  margin-right: 3px;
  padding-right: 3px;
.tooltip-frame .inner-snippet .att-value
  height: 13px;
{
  white-space: nowrap;
color: white;
  color: #9E8F75;
}
  font-size: 10px;
  line-height: 15px;
.tooltip-frame .suppresslink
}
{
 
height: 73px;
}}
left: 4px;
{{Tooltip
position: absolute;
| 1={{#if: {{{shipname|}}} |[[{{{shipname}}}]] |{{Co|red|! parameter shipname missing !}} }}
top: 4px;
| 2=<table class="sbtt">
width: 73px;
<tr>
z-index: 100;
  <td class="sbtt-image">{{#if: {{{shipimg|}}}
}
    | [[Image:{{{shipimg}}}|128x128px|link=]]
}}<span class='tooltip-frame'>{{{shipname}}}<span style='margin-left: 3px; font-size: 60%; color: yellow;'>&#8595;</span>
    |  {{#if: {{{shipid|}}}
<span class='inner-snippet ship-info' style='width: 410px;'>
        | {{Imageserver|types|{{{shipid}}}|render|size=128}}
<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 class='suppresslink'>&nbsp;</span></span>
        | [[Image:No-image.png|128x128px|link=]]
<span class='right' style='margin-right: 4px; width: 327px;'>
        }}
<span style='background-color: black; float: left; padding: 4px; width: 100%;'>
    }}
<span class='l1'>
    {{#if:{{{tech|}}} |<div class="techcornersmall">[[Image:CornerT{{{tech}}}s.png|link=]]</div> }}
<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.{{{shipname}}}|goto article &#8250;]]</span></span>
  </td>
<span style='color: #CCCCCC;float: right;font-size: 11px;'>{{{roles}}}</span>
  <td>
</span>
  <div class="sbtt-header">
<span class='l2'>
    <div class="sbtt-ship-name">{{{shipname}}}</div>
<span class='att-line' style='margin-bottom:2px;'>
    <div class="sbtt-ship-category"><span class="sbtt-ship-group">{{{grouping|}}}</span> <span class="sbtt-ship-hull">{{{hulltype|}}}</span></div>
<span class='att-item' style='border-right:medium none;'>
  </div>
<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>
  {{#if: {{{highlights1|}}} {{{highlights2|}}} {{{highlights3|}}} {{{highlights4|}}}
</span>
    |<div class="sbtt-highlights"><!--
<span class='att-item' style='border-right:medium none;'>
--> {{#if: {{{highlights1|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights1|}}}</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>
--> {{#if: {{{highlights2|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights2|}}}</div>}}<!--  
</span>
--> {{#if: {{{highlights3|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights3|}}}</div>}}<!--
<span class='att-item'>
--> {{#if: {{{highlights4|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights4|}}}</div>}}
<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>
</span>
  }}
<span class='att-item'>
  <div class="sbtt-attributes">
<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>
    <div>[[Image:icon_hi_slot.png|15x15px|link=]]{{#if: {{{highs|}}}
</span>
        | {{{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'>{{{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>
    </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>
    <div>[[Image:Icon_velocity.png|15x15px|link=]]{{#if: {{{maxvelocity|}}} |{{{maxvelocity}}} |0 m/s }}</div>
<span class='att-line'>
    <div>[[Image:Icon_capacity.png|15x15px|link=]]{{#if: {{{cargohold|}}} |{{{cargohold}}} |0 m&#179; }}</div>
<span class='att-item'>
  </div>
<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>
  </td>
</span>
</tr>
<span class='att-item'>
</table>
<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>
}}</onlyinclude></includeonly><noinclude>{{documentation}}</noinclude>
</span>
<span class='att-item' style='border-right:medium none;'>
<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>
</span>
</span>
</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
Faction Battleships Megathron Class
High Amount of High Slots
High Amount of Low Slots
8 (1/7) 4 8
16,275 MW 630 tf
135 m/sec
840 m³
more text.


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