More actions
Create template |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly>{{icon/{{padleft:|1|{{lc:{{{1}}}}}}}|{{lc:{{{1}}}}}|w{{#if:{{{2|}}}||NULL}}={{{2}}}}}</includeonly><noinclude | <!-- Copied from https://stellaris.paradoxwikis.com/Template:Icon under CC BY-SA 3.0 --> | ||
<includeonly>{{icon/{{padleft:|1|{{lc:{{{1}}}}}}}|{{lc:{{{1}}}}}|w{{#if:{{{2|}}}||NULL}}={{{2}}}}}</includeonly><noinclude> | |||
{{Icon/doc}}<!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> | {{Icon/doc}}<!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> |
Revision as of 21:51, 17 July 2024
Template:Template doc page transcluded
This template can be used to add icons as generated by Template:Icon in front of words.
Use this template to standardise the order of elements in bonuses. It also suppresses alt text for improved accessibility.
Parameters
Parameter | Description | Required | Default | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | The icon to use. For a list of icons see Template:Icon/doc. | required | none | ||||||||||||||||||
2 | Width of the icon
|
optional | As defined by Template:Icon.
Typically either 24px or 52px. | ||||||||||||||||||
3 | String to insert between the icon and text | optional | none | ||||||||||||||||||
4 | Name of template to apply to parameter 3 (e.g. {{green}}) | optional | none | ||||||||||||||||||
5 / text | Text to display | optional | parameter 1 | ||||||||||||||||||
prefix / pre | Text added to the front of parameter 1 for the purpose of determining the icon, but excluded from the displayed icon text. (e.g. ap) | optional | none | ||||||||||||||||||
suffix / suf | Text added to the end of parameter 1 for the purpose of determining the icon, but excluded from the displayed icon text. (e.g. tech) | optional | none | ||||||||||||||||||
icon2 | Inserts an additional icon image between the icon and text. | optional | none | ||||||||||||||||||
icon3 | |||||||||||||||||||||
icon4 | |||||||||||||||||||||
icon5 | |||||||||||||||||||||
tech | Formats the icon text using Template:Tech with this parameter as the style.
|
optional | none | ||||||||||||||||||
link | Sets the link of the icon. Usable only with supported icons. | optional | none | ||||||||||||||||||
hover | Sets the hover text of the icon. Usable only with supported icons. | optional | none | ||||||||||||||||||
nowrap | If set to yes , keeps the icon and the text in the same line.
|
optional | no | ||||||||||||||||||
sort | If the icon is at the front of a cell in a sortable table, makes the cell sortable.
|
optional | none | ||||||||||||||||||
cellstyle | Requires sort. Adds cell styles in style=""
|
optional | none | ||||||||||||||||||
rowspan / row | Requires sort. Sets cell rowspan. | optional | 1 | ||||||||||||||||||
colpan / col | Requires sort. Sets cell colspan. | optional | 1 |
Examples
Wiki text | Produces |
---|---|
{{iconify|Militarist}} |
|
{{iconify|Militarist|36px|<br>}} |
|
{{iconify|Militarist|icon2=Fanatic Militarist||Some degree of}} |
|
{{iconify|Fanatic Purifiers|icon2=Devouring Swarm|icon3=Determined Exterminator|text=Genocidal}} |
Genocidal |
{{iconify|Minerals||+4}} |
|
{{iconify|Minerals||−4|red}} |
|
{{iconify|World Shaper}} |
Template:Icon/w World Shaper |
{{iconify|World Shaper|pre=ap}} |
World Shaper |
{{iconify|monthly influence|suf=add||+1|green}} |
+1 monthly influence |
{{iconify|Juggernaut|24px|suf=tech|tech=rare}} |
|
{{iconify|admiral|24px}} |
admiral |
{{iconify|admiral|x24px}} |
admiral |
{{iconify|Militarist|sort=yes|cellstyle=text-align:center; background-color:green}} |