Template:Producer icon: Difference between revisions

From Corsair Cove Official Wiki
Swapped to use global css style class
removed caveat about extra small; it just sizes down a bit more now even though it's less clear. removed formatting category
Line 1: Line 1:
<includeonly><!--
<includeonly><!--
--><div {{#ifeq: {{{size|xs}}}|xs||class="cc-producer-icon"}}><!--
--><div class="cc-producer-icon"><!--
---->[[File:{{{1|}}}<!--
---->[[File:{{{1|}}}<!--
------>|x{{#switch: {{{size|xs}}}|xs=16|sm=20|md=40|lg=60|xl=80}}px<!--
------>|x{{#switch: {{{size|xs}}}|xs=12|sm=20|md=40|lg=60|xl=80}}px<!--
---->]]<!--
---->]]<!--
--></div></includeonly><noinclude>
--></div></includeonly><noinclude>
Line 10: Line 10:
== Usage ==
== Usage ==


This skips the shield on extra-small sizes; this means with just the resource icon it could be confusing, so it is recommended to use just the building name itself or rewrite to refer to the resource itself so you can use just the resource icon clearly.
It is recommended to not use this template for extra small sizes, because it's too small to be clear. For use inline in paragraphs, use just the building name itself or rewrite to refer to the resource itself so you can use just the resource icon clearly.


{|class=wikitable
{|class=wikitable
Line 67: Line 67:


[[Category: Icon templates]]
[[Category: Icon templates]]
[[Category: Formatting templates]]
</noinclude>
</noinclude>

Revision as of 17:35, 1 August 2026


Layers the "Producers" icon shown in the Production Chains overview, a plain wooden shield background, behind the icon with the specified filename. Applies the specified size to the whole stack, so the inner icon will be slightly smaller.

Usage

It is recommended to not use this template for extra small sizes, because it's too small to be clear. For use inline in paragraphs, use just the building name itself or rewrite to refer to the resource itself so you can use just the resource icon clearly.

Parameter Purpose
filename specify the filename only, no File: namespace
size= the size of the icon, or omit for an extra small default size appropriate for inline in paragraphs:
  • xs - default
  • sm
  • md
  • lg
  • xl

Examples

{{Producer icon|T ICO resource Hardwood.png}}
{{Producer icon|T ICO resource Hardwood.png|size=sm}}
{{Producer icon|T ICO resource Hardwood.png|size=md}}
{{Producer icon|T ICO resource Hardwood.png|size=lg}}
{{Producer icon|T ICO resource Hardwood.png|size=xl}}


And in table cells:

{|class=wikitable
! Icon !! Name
|-
| {{Producer icon|T ICO resource Hardwood.png}} || extra small
|-
| {{Producer icon|T ICO resource Hardwood.png|size=sm}} || small
|-
| {{Producer icon|T ICO resource Hardwood.png|size=md}} || medium
|-
| {{Producer icon|T ICO resource Hardwood.png|size=lg}} || large
|-
| {{Producer icon|T ICO resource Hardwood.png|size=xl}} || extra-large
|}
Icon Name
extra small
small
medium
large
extra-large