Template:Sigil: Difference between revisions

From The Talos Principle Wiki
m Uses #switch: for sizing instead of lots of #if:s.
Named parameters (color, shape) but defaults to unnamed
Line 1: Line 1:
[[File:{{{1}}}-{{{2}}}-tetromino.png|{{#switch:{{{2}}}|L=9|J=9|O=9|S=15|Z=15|T=14|I=18|10}}px|link={{{link|}}}]]
[[File:{{{color|{{{1}}}}}}-{{{shape|{{{2}}}}}}-tetromino.png|{{#switch:{{{shape|{{{2}}}}}}|L=9|J=9|O=9|S=15|Z=15|T=14|I=18|10}}px|link={{{link|}}}]]
<noinclude>== Usage ==
<noinclude>== Usage ==
This produces a small tetronomio icon. The possible colors are Red, Green, Yellow, and Gray. The possible "shapes" are <code>L</code>, <code>J</code>, <code>O</code>, <code>S</code>, <code>Z</code>, <code>T</code>, and <code>I</code>. A link can optionally be included.  
This produces a small tetronomio icon. The possible colors are Red, Green, Yellow, and Gray. The possible "shapes" are <code>L</code>, <code>J</code>, <code>O</code>, <code>S</code>, <code>Z</code>, <code>T</code>, and <code>I</code>. A link can optionally be included.  




Example: <code><nowiki>{{Sigil|Green|L}}</nowiki></code> produces {{Sigil|Green|L}}.
Example: <code><nowiki>{{Sigil|color=Green|shape=L}}</nowiki></code> or <code><nowiki>{{Sigil|Green|L}}</nowiki></code> produces {{Sigil|color=Green|shape=L}}.


Example: <code><nowiki>{{Sigil|Red|Z}}</nowiki></code> produces {{Sigil|Red|Z}}.
Example: <code><nowiki>{{Sigil|Red|Z}}</nowiki></code> produces {{Sigil|Red|Z}}.

Revision as of 04:24, 19 November 2023

[[File:{{{1}}}-{{{2}}}-tetromino.png|10px|link=]]

Usage

This produces a small tetronomio icon. The possible colors are Red, Green, Yellow, and Gray. The possible "shapes" are L, J, O, S, Z, T, and I. A link can optionally be included.


Example: {{Sigil|color=Green|shape=L}} or {{Sigil|Green|L}} produces .

Example: {{Sigil|Red|Z}} produces .

Example with link: {{Sigil|Red|Z|link=Ascension Awaits}} produces .