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/doc: Difference between revisions

Template page
m Add usage pointer from the template page.
m Replace hard-coded color with design-token.
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Cleanup|Documentation need some more work}}
; Description
 
: Creates a tooltip with a subset of the ships stats.
For usage guide please see [[Template:Ship|Ship Template]]
: {{Color box
| color= var(--background-color-error-subtle)
| border= #2F8F2F
| 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!.<br>If you're looking on how to use the '''Ship''' template please see [[Template:Ship|this page]] instead.<br><br>DO NOT EDIT THE CONTENTS OF THIS TEMPLATE IF YOU ARE NOT SURE ON WHAT YOU ARE DOING.
}}


; Description
: This template is a sub-template used to produce a link to a ship which on mouse over shows a tool-tip whit some ship info.
; Dependencies:
; Dependencies:
: Uses:
:; Uses:
:: {{T|Tooltip}}
:: {{T|Tooltip}}
:: Ship information in ship database articles.
:: {{T|Imageserver}} When no local image of ship is available and <kbd>shipid</kbd> is known.
: Called by:
:: Part of the parameter set of {{Tl|ShipArticle}}
:: {{T|Ship}} through [[:Category:Ship Database|ship database]] articles


; Syntax
; Syntax
: Can <em>not</em> be used on its own.
: ShipBoxTooltip is not to be used on its own. It is to be called by using the wrapper template {{Tl|Ship}}
: {{T|ShipBoxTooltip}} is called when a ship article is called with mode= tooltip. e.g. <nowiki>{{:Vexor|mode= tooltip}}</nowiki> gives {{:Vexor|mode= tooltip}}
 
; Template set
: {{T|ShipArticle}}
: {{T|Ship}}
:: {{T|ShipBoxLarge}}
:: {{T|ShipBoxTooltip}}


; Sample
; Sample
Line 23: Line 28:




{{Note
|The template does testing for unknown shipname(wel it is actually testing if the parameter contains anything beside white-space), if there is an article about the called ship the shipname should have something in it. If there is no article then ShipBoxTooltip is not called anyway.}}
{{Bug
{{Bug
|There is a problem with the presentation of the result. See [[Template talk:ShipBoxTooltip]]}}
|There is a problem with the presentation of the result. See [[Template talk:ShipBoxTooltip]]}}


<includeonly>[[Category:Template]]<!-- Any categories for the template itself --></includeonly>
<includeonly>[[Category:Formatting templates]] [[Category:Data templates]]<!-- Any categories for the template itself --></includeonly>
<noinclude>[[Category:Template documentation]]</noinclude>
<noinclude>[[Category:Template documentation]]</noinclude>

Latest revision as of 09:10, 9 June 2025

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