Difference between revisions of "Template:Infoicon/doc"

From Captain of Industry Wiki
Jump to: navigation, search
(Lets make this a little more colorful and lively. Added a gotcha to pluralization and a description for images which are too large to use properly.)
(+ui param documentation)
Line 6: Line 6:


;Usage
;Usage
:The template accepts up to three parameters:
:The template accepts the following parameters:
::<code>{{{1}}}</code> = image name</code>
::<code>{{{1}}}</code> = image name</code>
::<code>symbolonly = yes</code> (optional)(rare)
::<code>symbolonly = yes</code> (optional)(rare)
Line 12: Line 12:
::<code>plural = s</code> (optional). Generally "s" or "es" as a plural suffix.
::<code>plural = s</code> (optional). Generally "s" or "es" as a plural suffix.
:::For irregular plural suffixes like "knife" → "knives", instead use <code>symbolonly</code> and manually provide the link.
:::For irregular plural suffixes like "knife" → "knives", instead use <code>symbolonly</code> and manually provide the link.
::<code>ui = yes</code> (optional). Prevents the white glow which improves accessibility from being applied (useful for white UI elements)


;Examples
;Examples
Line 21: Line 22:
* {{t|infoicon|PCB|3=link=yes|4=plural=s}} → {{infoicon|PCB|plural=s|link=yes}}
* {{t|infoicon|PCB|3=link=yes|4=plural=s}} → {{infoicon|PCB|plural=s|link=yes}}
* {{t|infoicon|PCB|3=symbol_only=yes}} → {{infoicon|PCB|symbol_only=yes}}
* {{t|infoicon|PCB|3=symbol_only=yes}} → {{infoicon|PCB|symbol_only=yes}}
* {{t|infoicon|Worker}} → {{infoicon|Worker}}
* {{t|infoicon|Worker|3=ui=yes}} → {{infoicon|Worker|ui=yes}}
* {{t|infoicon|Worker|3=plural=s}} → {{infoicon|Worker|plural=s}}
* {{t|infoicon|Worker|3=plural=s|4=ui=yes}} → {{infoicon|Worker|plural=s|ui=yes}}
* {{t|infoicon|Workers}} → {{infoicon|Workers}}
* {{t|infoicon|Workers|3=ui=yes}} → {{infoicon|Workers|ui=yes}}
* {{t|infoicon|Unity}} → {{infoicon|Unity}}
* {{t|infoicon|Unity|3=ui=yes}} → {{infoicon|Unity|ui=yes}}
* {{t|infoicon|Unity Large}} → {{infoicon|Unity Large}}
* {{t|infoicon|Unity Large|3=ui=yes}} → {{infoicon|Unity Large|ui=yes}}
** This is an example of an image which is too large and busy to display properly as an infoicon (see [[:File:Unity Large.png]]).
** This is an example of an image which is too large and busy to display properly as an infoicon (see [[:File:Unity Large.png]]).


<includeonly>[[Category:Formatting templates]]</includeonly><!--
<includeonly>[[Category:Formatting templates]]</includeonly><!--
--><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
--><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>

Revision as of 00:26, 22 January 2022

Purpose
This template provides a method to rapidly include an icon and link inline with text, such as inside of a paragraph or in a bulleted list.
Automations
Automatically detects and corrects a handful of mismatches between image filenames and desired article names.
Usage
The template accepts the following parameters:
{{{1}}} = image name
symbolonly = yes (optional)(rare)
link = yes (optional). Adds a text hyperlink to the article name. However, please do not overuse this.
plural = s (optional). Generally "s" or "es" as a plural suffix.
For irregular plural suffixes like "knife" → "knives", instead use symbolonly and manually provide the link.
ui = yes (optional). Prevents the white glow which improves accessibility from being applied (useful for white UI elements)
Examples