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
m Undo revision 185986 by Evon R'al (talk) The escape did not work. It actually made it worse. It broke the link for existing shipimg parameter.
Tag: Undo
m Increase width found an instance where the content did not fit.
 
(37 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><onlyinclude>{{#css:
<includeonly><onlyinclude>{{#css:


.uniwiki-ship-tooltip table,
.sbtt {
.uniwiki-ship-tooltip tr,
  width: 100%;
.uniwiki-ship-tooltip td {
}
   background-color: transparent;
 
  margin: 0;
.sbtt td.sbtt-image {
   padding: 0;  
   position: relative;
   padding-right: 5px;
   vertical-align: top;
   vertical-align: top;
  }
  }


.uniwiki-ship-tooltip .left a img {
.sbtt sbtt-image a img {
   border: 1px solid #272727;
   border: 1px solid #272727;
  }
  }


.uniwiki-ship-tooltip-header {
.sbtt .techcornersmall {
  position: absolute;
  top: 0;
  left: 2px;
}
 
/* header */
.sbtt .sbtt-header {
  margin-bottom: 5px;
   border-bottom: 1px solid #272727;
   border-bottom: 1px solid #272727;
  margin-bottom: 5px;
   padding-bottom: 5px;
   padding-bottom: 5px;
   text-align: center;
   text-align: center;
  }
  }


.uniwiki-ship-tooltip-header .tooltip-header-shipname {
.sbtt .sbtt-ship-name {
  height: 20px;
  white-space: nowrap;
   color: white;
   color: white;
   font-family: trebuchet MS;
   font: small-caps 16px/15px trebuchet MS;
  font-size: 16px;
  font-variant: small-caps;
  height: 20px;
  line-height: 15px;
  }
  }


.uniwiki-ship-tooltip-header .tooltip-header-category {
.sbtt .sbtt-ship-category {
   font-size: 11px;
   font-size: 11px;
   height: 10px;
   line-height: 11px;
   line-height: 10px;
}
 
.sbtt .sbtt-ship-group {
   white-space: nowrap;
  color: orange;
}
 
.sbtt .sbtt-ship-hull {
  white-space: nowrap;
}
 
/* Highlights */
.sbtt .sbtt-highlights {
  padding-bottom: 5px;
  }
  }


.uniwiki-ship-tooltip-middle .tt-hl {
.sbtt .sbtt-highlights div {
  height: 10px;
   color: khaki;
   color: khaki;
   font-size: 10px;
   font-size: 10px;
  height: 10px;
   line-height: 12px;
   line-height: 12px;
  }
  }


.uniwiki-ship-tooltip-bottom {
/* *** Ship attributes *** */
  float: left;
.sbtt .sbtt-attributes {
   width: 170px;
   width: 180px;
  }
  }


.uniwiki-ship-tooltip-bottom .tt-att {
.sbtt .sbtt-attributes div {
  float: left;
  margin-right: 3px;
  padding-right: 3px;
  height: 13px;
  white-space: nowrap;
   color: #9E8F75;
   color: #9E8F75;
  display: inline-block;
   font-size: 10px;
   font-size: 10px;
  float:left;
  height: 13px;
   line-height: 15px;
   line-height: 15px;
  margin-right: 3px;
  padding-right: 3px;
}
.techcornersmall {
  width: 64px;
  height: 64px;
  position: absolute;
  top: 0px;
  left: 0px;
  margin-left: 2px;
  margin-top: 0px;
  }
  }


}}
}}
{{Tooltip
{{Tooltip
|1={{#if:{{{shipname}}}
| 1={{#if: {{{shipname|}}} |[[{{{shipname}}}]] |{{Co|red|! parameter shipname missing !}} }}
| [[{{{shipname}}}]]
| 2=<table class="sbtt">
| parameter shipname missing
  <tr>
}}
   <td class="sbtt-image">{{#if: {{{shipimg|}}}
 
    | [[Image:{{{shipimg}}}|128x128px|link=]]
|2=<div class='uniwiki-ship-tooltip'>
    |  {{#if: {{{shipid|}}}
  <table cellspacing='0' cellpadding='0' style='width:100%;'>
        | {{Imageserver|types|{{{shipid}}}|render|size=128}}
   <tr>
        | [[Image:No-image.png|128x128px|link=]]
  <td class='left' style='padding: 0 5px 0 0;width: 80px; position: relative;'>[[Image:{{{shipimg|no-image.png}}}|80x80px|{{{shipname}}}]]{{#if:{{{tech|}}}|<div class='techcornersmall'>[[Image:CornerT{{{tech|2}}}s.png|link=]]</div>|}}</td>
        }}
  <td>
    }}
    <div class='uniwiki-ship-tooltip-header'>
    {{#if:{{{tech|}}} |<div class="techcornersmall">[[Image:CornerT{{{tech}}}s.png|link=]]</div> }}
    <div class='tooltip-header-shipname'>{{#if:{{{shipname}}}|{{{shipname|Unknown Ship}}}|Unknown Ship}}</div>
  </td>
    <div class='tooltip-header-category'><span style='color:orange;margin-right: 5px;'>{{{grouping|Unique Ships}}}</span><span>{{{hulltype|Unknown Class}}}</span></div>
  <td>
    </div>
  <div class="sbtt-header">
     <div class='uniwiki-ship-tooltip-middle' style='padding-bottom: 5px;display:{{#if:{{{highlights1|}}}|block|none}}'>
    <div class="sbtt-ship-name">{{{shipname}}}</div>
    <div class='tt-hl'>[[Image:Icon_highlights.png|10x10px|middle|highlights]]{{{highlights1|}}}</div>
    <div class="sbtt-ship-category"><span class="sbtt-ship-group">{{{grouping|}}}</span> <span class="sbtt-ship-hull">{{{hulltype|}}}</span></div>
    <div class='tt-hl' style='display:{{#if:{{{highlights2|}}}|block|none}}'>[[Image:Icon_highlights.png|10x10px|middle|highlights]]{{{highlights2|}}}</div>
  </div>
    <div class='tt-hl' style='display:{{#if:{{{highlights3|}}}|block|none}}'>[[Image:Icon_highlights.png|10x10px|middle|highlights]]{{{highlights3|}}}</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>
    <div class='uniwiki-ship-tooltip-bottom'>
  }}
    <div class='tt-att'>[[Image:icon_hi_slot.png|15x15px|middle|high slots]]{{{highs|0}}}<div style='display:inline;'>({{{launchers|0}}}/{{{turrets|0}}})</div></div>
  <div class="sbtt-attributes">
    <div class='tt-att'>[[Image:icon_mid_slot.png|15x15px|middle|middle slots]]{{{mediums|0}}}</div>
    <div>[[Image:icon_hi_slot.png|15x15px|link=]]{{#if: {{{highs|}}}
    <div class='tt-att'>[[Image:icon_low_slot.png|15x15px|middle|low slots]]{{{lows|0}}}</div>
        | {{{highs}}} ({{#if: {{{launchers|}}} |{{{launchers}}} |0 }}/{{#if: {{{turrets|}}} |{{{turrets}}} |0 }})
    <div class='tt-att'>[[Image:icon_powergrid.png|15x15px|middle|powergrid]]{{{powergrid|0 MW}}}</div>
        | 0 }} [[Image:icon_mid_slot.png|15x15px|link=]]{{#if: {{{mediums|}}} |{{{mediums}}} |0 }} [[Image:icon_low_slot.png|15x15px|link=]]{{#if: {{{lows|}}} |{{{lows}}} |0 }}
    <div class='tt-att'>[[Image:icon_cpu.png|15x15px|middle|cpu output]]{{{cpu|0 tf}}}</div>
    <div class='tt-att'>[[Image:Icon_velocity.png|15x15px|middle|max. velocity]]{{{maxvelocity|0 m/s}}}</div>
    <div class='tt-att'>[[Image:Icon_capacity.png|15x15px|middle|cargo capacity]]{{{cargohold|0 m&#179;}}}</div>
     </div>
     </div>
   </td>
    <div>[[Image:icon_powergrid.png|15x15px|link=]]{{#if: {{{powergrid|}}} |{{{powergrid}}} |0 MW }} [[Image:icon_cpu.png|15x15px|link=]]{{#if: {{{cpu|}}} |{{{cpu}}} |0 tf }}</div>
   </tr>
    <div>[[Image:Icon_velocity.png|15x15px|link=]]{{#if: {{{maxvelocity|}}} |{{{maxvelocity}}} |0 m/s }}</div>
  </table>
    <div>[[Image:Icon_capacity.png|15x15px|link=]]{{#if: {{{cargohold|}}} |{{{cargohold}}} |0 m&#179; }}</div>
</div>
   </div>
}}</onlyinclude></includeonly><noinclude>
   </td>
{{documentation}}
  </tr>
</noinclude>
</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
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?)