Template:Sigil: Difference between revisions

From The Talos Principle Wiki
Ta da!
 
m auto-category for using this template without a shape
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[File:{{{1}}}-{{{2}}}-tetromino.png|{{#ifeq:{{{2}}}|L|9}}{{#ifeq:{{{2}}}|J|9}}{{#ifeq:{{{2}}}|O|9}}{{#ifeq:{{{2}}}|S|15}}{{#ifeq:{{{2}}}|Z|15}}{{#ifeq:{{{2}}}|T|14}}{{#ifeq:{{{2}}}|I|18}}px|link={{{link|}}}]]
{{#switch:{{{color|{{{1}}}}}}
<noinclude>== Usage ==
|Red|Green|Yellow|Gray={{#switch:{{{shape|{{{2}}}}}}
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.  
|L=[[File:{{{color|{{{1}}}}}}-L-tetromino.png|9px|link={{{link|}}}]]
|J=[[File:{{{color|{{{1}}}}}}-J-tetromino.png|9px|link={{{link|}}}]]
|O=[[File:{{{color|{{{1}}}}}}-O-tetromino.png|9px|link={{{link|}}}]]
|S=[[File:{{{color|{{{1}}}}}}-S-tetromino.png|15px|link={{{link|}}}]]
|Z=[[File:{{{color|{{{1}}}}}}-Z-tetromino.png|15px|link={{{link|}}}]]
|T=[[File:{{{color|{{{1}}}}}}-T-tetromino.png|14px|link={{{link|}}}]]
|I=[[File:{{{color|{{{1}}}}}}-I-tetromino.png|18px|link={{{link|}}}]]
|#default=''[<span style="color:{{lc:{{{color|{{{1}}}}}}}}">{{{color|{{{1}}}}}} sigil</span>]''[[Category:Pages with unspecified sigil shapes]]
}}
|''[Sigil of unrecognized color]''
}}<noinclude>
== Usage ==
This produces a small tetromino 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|color=Yellow|shape=L}}</nowiki></code> or <code><nowiki>{{Sigil|Yellow|L}}</nowiki></code> produces {{Sigil|color=Yellow|shape=L}}.


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


Example with link: <code><nowiki>{{Sigil|Red|Z|link=Ascension Awaits}}</nowiki></code> produces {{Sigil|Red|Z|link=Ascension Awaits}}.
Example with link: <code><nowiki>{{Sigil|Red|Z|link=Ascension Awaits}}</nowiki></code> produces {{Sigil|Red|Z|link=Ascension Awaits}}.
<templatedata>
{
"params": {
"color": {
"aliases": [
"1"
],
"label": "Color",
"description": "The color of the icon.",
"example": "Red",
"type": "string",
"suggestedvalues": [
"Red",
"Green",
"Yellow",
"Gray"
],
"required": true
},
"shape": {
"aliases": [
"2"
],
"label": "Shape",
"description": "The shape of the sigil. This must be a capital letter: L, J, S, Z, O (for square), T, or I.",
"example": "T",
"type": "string",
"suggestedvalues": [
"L",
"J",
"S",
"Z",
"O",
"T",
"I"
],
"required": true
},
"link": {
"label": "Link",
"description": "The name of another wiki article. If included, the sigil icon will become a link to that page.",
"type": "wiki-page-name"
}
},
"description": "This produces a small tetromino icon.",
"format": "inline"
}
</templatedata>
</noinclude>
</noinclude>

Latest revision as of 04:48, 17 June 2024

[Sigil of unrecognized color]

Usage

This produces a small tetromino 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=Yellow|shape=L}} or {{Sigil|Yellow|L}} produces .

Example: {{Sigil|Green}} produces [Green sigil].

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

This produces a small tetromino icon.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Colorcolor 1

The color of the icon.

Suggested values
Red Green Yellow Gray
Example
Red
Stringrequired
Shapeshape 2

The shape of the sigil. This must be a capital letter: L, J, S, Z, O (for square), T, or I.

Suggested values
L J S Z O T I
Example
T
Stringrequired
Linklink

The name of another wiki article. If included, the sigil icon will become a link to that page.

Page nameoptional