Template:Ship tier icon: Difference between revisions
From Corsair Cove Official Wiki
changed span to inline-block to help restore positioning |
Updated documentation; outstanding alignment issue in xs paragraph size to solve with CSS |
||
| Line 1: | Line 1: | ||
<includeonly><span style="position: relative; display: inline-block; width: {{#switch: {{{size|sm}}}|xs=16|sm=32|md=64}}px; height: {{#switch: {{{size| | <includeonly><span class="cc-ship-tier-icon" style="position: relative; display: inline-block; width: {{#switch: {{{size|sm}}}|xs=16|sm=32|md=64}}px; height: {{#switch: {{{size|xs}}}|xs=16|sm=32|md=64}}px; line-height: 0;"><!-- | ||
-->[[File: {{#if: {{{path|}}} | Ship tier icon {{{path}}}.png | T_SevenSeas_TierNumber.png }}|x{{#switch: {{{size| | -->[[File: {{#if: {{{path|}}} | Ship tier icon {{{path}}}.png | T_SevenSeas_TierNumber.png }}|x{{#switch: {{{size|xs}}}|xs=16|sm=32|md=64}}px]]<!-- | ||
--><span style="position: absolute; top: 46%; left: 30%; width: 50%; height: 60%; font-size: {{#switch: {{{size| | --><span style="position: absolute; top: 46%; left: 30%; width: 50%; height: 60%; font-size: {{#switch: {{{size|xs}}}|xs=12|sm=20|md=42}}px;">{{{1|1}}}</span><!-- | ||
--></span></includeonly><noinclude> | --></span></includeonly><noinclude> | ||
Generates a diamond-shaped colored icon with a number, indicating the tier of a ship, similar to as seen in-game. Uses standard sizes extra small through medium. | |||
== Usage == | |||
{|class="wikitable sortable" | |||
! Parameter !! Purpose | |||
|- | |||
| tier number || <code>1</code> through <code>6</code> | |||
|- | |||
| <code>path=<code> || One of the Principle Path names, or omit for a plain black diamond: | |||
* <code>Notoriety</code> | |||
* <code>Empire</code> | |||
* <code>Seafaring</code> | |||
* <code>Wealth</code> | |||
|- | |||
| <code>size=</code> || A size for the icon, or omit for size appropriate for inline in paragraphs: | |||
* <code>xs</code> - default | |||
* <code>sm</code> | |||
* <code>md</code> | |||
|} | |||
=== Example === | |||
<pre>{{Ship tier icon|1}}</pre> | |||
{{Ship tier icon|1}} | |||
<pre>{{Ship tier icon|2|path=Notoriety}}</pre> | |||
{{Ship tier icon|2|path=Notoriety}} | {{Ship tier icon|2|path=Notoriety}} | ||
{{Ship tier icon|4|path=Empire|size= | <pre>{{Ship tier icon|4|path=Empire|size=sm}}</pre> | ||
{{Ship tier icon|4|path=Empire|size=sm}} | |||
{{Ship tier icon|3|path=Seafaring}} | <pre>{{Ship tier icon|3|path=Seafaring|size=md}}</pre> | ||
{{Ship tier icon|3|path=Seafaring|size=md}} | |||
<pre>{{Ship tier icon|5|path=Wealth|size=md}}</pre> | |||
{{Ship tier icon|5|path=Wealth|size=md}} | {{Ship tier icon|5|path=Wealth|size=md}} | ||
[[Category: Icon templates]] | [[Category: Icon templates]] | ||
</noinclude> | </noinclude> | ||
Revision as of 02:03, 24 July 2026
Generates a diamond-shaped colored icon with a number, indicating the tier of a ship, similar to as seen in-game. Uses standard sizes extra small through medium.
Usage
| Parameter | Purpose |
|---|---|
| tier number | 1 through 6
|
path= |
One of the Principle Path names, or omit for a plain black diamond:
|
size= |
A size for the icon, or omit for size appropriate for inline in paragraphs:
|
Example
{{Ship tier icon|1}}
{{Ship tier icon|2|path=Notoriety}}
{{Ship tier icon|4|path=Empire|size=sm}}
{{Ship tier icon|3|path=Seafaring|size=md}}
{{Ship tier icon|5|path=Wealth|size=md}}


