Template:Sigil: Difference between revisions

From The Talos Principle Wiki
m Attempt at visual editor documentation.
Tag: Reverted
m auto-category for using this template without a shape
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[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|}}}]]
{{#switch:{{{color|{{{1}}}}}}
<noinclude>== Usage ==
|Red|Green|Yellow|Gray={{#switch:{{{shape|{{{2}}}}}}
|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.  
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|color=Green|shape=L}}</nowiki></code> or <code><nowiki>{{Sigil|Green|L}}</nowiki></code> produces {{Sigil|color=Green|shape=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>
<templatedata>
{
{
    "description": "Inserts an sigil with specified color and shape.",
"params": {
    "params": {
"color": {
        "1": {
"aliases": [
            "label": "color",
"1"
            "type": "enum",
],
            "description": "The color of the sigil.",
"label": "Color",
            "enum": ["Red", "Green", "Yellow", "Gray"],
"description": "The color of the icon.",
            "required": true
"example": "Red",
        },
"type": "string",
        "2": {
"suggestedvalues": [
            "label": "shape",
"Red",
            "type": "enum",
"Green",
            "description": "The shape of the sigil, using common Tetris notation.",
"Yellow",
            "enum": ["L", "J", "S", "Z", "T", "I", "O"],
"Gray"
            "required": true
],
        }
"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>
</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