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.
 
(133 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{#css: .test-snippet{ position:relative; /*this is the key*/ z-index:24; background-color:transparent; color:orange; text-decoration:none}
<includeonly><onlyinclude>{{#css:


.test-snippet:hover{z-index:25; background-color:#ff0}  
.sbtt {
  width: 100%;
}


.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; } }}
.sbtt td.sbtt-image {
<span class='test-snippet'>{{{shipname}}}<span style='margin-left: 3px; font-size: 60%; color: yellow;'>&#8595;</span><span class='inner-snippet ship-info' style='width: 410px;'><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><span class='right' style='margin-right: 4px; width: 327px;'><span style='background-color: black; float: left; padding: 4px; width: 100%;'><span class='l1'><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><span style='color: #CCCCCC;float: right;font-size: 11px;'>{{{roles}}}</span></span><span class='l2'><span class='att-line' style='margin-bottom:2px;'><span class='att-item' style='border-right:medium none;'><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></span><span class='att-item' style='border-right:medium none;'><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></span><span class='att-item'><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></span><span class='att-item'><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></span><span class='att-item'><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></span><span class='att-line'><span class='att-item'><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></span><span class='att-item'><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></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 class='l3'><span style='text-align:left;'>{{{bonuses}}}</span></span></span></span></span>
  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;
}
 
}}
{{Tooltip
| 1={{#if: {{{shipname|}}} |[[{{{shipname}}}]] |{{Co|red|! parameter shipname missing !}} }}
| 2=<table class="sbtt">
<tr>
  <td class="sbtt-image">{{#if: {{{shipimg|}}}
    | [[Image:{{{shipimg}}}|128x128px|link=]]
    |  {{#if: {{{shipid|}}}
        | {{Imageserver|types|{{{shipid}}}|render|size=128}}
        | [[Image:No-image.png|128x128px|link=]]
        }}
    }}
    {{#if:{{{tech|}}} |<div class="techcornersmall">[[Image:CornerT{{{tech}}}s.png|link=]]</div> }}
  </td>
  <td>
  <div class="sbtt-header">
    <div class="sbtt-ship-name">{{{shipname}}}</div>
    <div class="sbtt-ship-category"><span class="sbtt-ship-group">{{{grouping|}}}</span> <span class="sbtt-ship-hull">{{{hulltype|}}}</span></div>
  </div>
  {{#if: {{{highlights1|}}} {{{highlights2|}}} {{{highlights3|}}} {{{highlights4|}}}
    |<div class="sbtt-highlights"><!--
--> {{#if: {{{highlights1|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights1|}}}</div>}}<!--
--> {{#if: {{{highlights2|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights2|}}}</div>}}<!--  
--> {{#if: {{{highlights3|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights3|}}}</div>}}<!--
--> {{#if: {{{highlights4|}}}|<div>[[Image:Icon_highlights.png|10x10px]]{{{highlights4|}}}</div>}}
    </div>
  }}
  <div class="sbtt-attributes">
    <div>[[Image:icon_hi_slot.png|15x15px|link=]]{{#if: {{{highs|}}}
        | {{{highs}}} ({{#if: {{{launchers|}}} |{{{launchers}}} |0 }}/{{#if: {{{turrets|}}} |{{{turrets}}} |0 }})
        | 0 }} [[Image:icon_mid_slot.png|15x15px|link=]]{{#if: {{{mediums|}}} |{{{mediums}}} |0 }} [[Image:icon_low_slot.png|15x15px|link=]]{{#if: {{{lows|}}} |{{{lows}}} |0 }}
    </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>