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|sm}}}|xs=16|sm=32|md=64}}px; line-height: 0;"><!--
<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|sm}}}|xs=16|sm=32|md=64}}px]]<!--
-->[[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|sm}}}|xs=12|sm=20|md=42}}px;">{{{1|1}}}</span><!--
--><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>


{{Ship tier icon|1|size=xs}}
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=md}}
<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:
  • Notoriety
  • Empire
  • Seafaring
  • Wealth
size= A size for the icon, or omit for size appropriate for inline in paragraphs:
  • xs - default
  • sm
  • md

Example

{{Ship tier icon|1}}

1

{{Ship tier icon|2|path=Notoriety}}

2

{{Ship tier icon|4|path=Empire|size=sm}}

4

{{Ship tier icon|3|path=Seafaring|size=md}}

3

{{Ship tier icon|5|path=Wealth|size=md}}

5