Template:Item/doc: Difference between revisions
Created Template:Item/doc |
No edit summary |
||
| (7 intermediate revisions by the same user not shown) | |||
| Line 6: | Line 6: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="wikitext" copy> | <syntaxhighlight lang="wikitext" copy> | ||
{{Item | {{Item}} | ||
</syntaxhighlight> | </syntaxhighlight> | ||
This template has 2 unnamed parameters: | This template has 2 unnamed parameters: | ||
* {{F|1}} / {{F|name}} – Name of the item. | * {{F|1}} / {{F|name}} – Name of the item. | ||
* {{F|2}} / {{F|size}} – Size of the icon. Default: {{F|30}}. | * {{F|2}} / {{F|size}} – Size of the icon {{Color|Old|excluding}} the length unit. Default: {{F|30}}. | ||
* {{F|x}} / {{F|count}} – Quantity of the item | * {{F|x}} / {{F|count}} – Quantity of the item. | ||
* {{F|type}} – Special keyword to adjust the file's suffix and prefix. | * {{F|type}} – Special keyword to adjust the file's suffix and prefix. | ||
* {{F|link}} – Set another page to be linked. | * {{F|link}} – Set another page to be linked. | ||
* {{F|text}} – Display another text instead of the name of the item. | * {{F|text}} – Display another text instead of the name of the item. | ||
* {{F| | * {{F|no_text}} – Set to {{F|1}} to omit the complete text. | ||
* {{F|invert}} – Set to apply a filter to the image for either day/light or night/dark mode. Available values: | |||
** Default – See: [[Module:Item/Invert]]. | |||
** {{F|Day}} – Invert the image in day/light mode. Will invert light-colored icons to gray in day/light mode. | |||
** {{F|Night}} – Invert the image in night/dark mode. Will invert dark-colored icons to white in night/dark mode. | |||
* {{F|note}} – Append a note after the item text and count. | * {{F|note}} – Append a note after the item text and count. | ||
* {{F|ref}} – Append a reference to the item text. | * {{F|ref}} – Append a reference to the item text. | ||
* {{F|comma}} – Set to {{F|1}} to append a comma to the item text following AmE rules. | * {{F|comma}} – Set to {{F|1}} to append a comma to the item text following AmE rules. | ||
* {{F|dot}} – Set to {{F|1}} to append a dot to the item text following AmE rules. | * {{F|dot}} – Set to {{F|1}} to append a dot to the item text following AmE rules. | ||
* {{F| | * {{F|comma_spc}} – Set to {{F|1}} to append a comma and a space to the item text following AmE rules. | ||
* {{F| | * {{F|dot_spc}} – Set to {{F|1}} to append a dot and a space to the item text following AmE rules. | ||
==Examples== | ==Examples== | ||
{{ | {{Example|no_copy=1|<nowiki>{{Item}}</nowiki>}} | ||
{{ | {{Example|no_copy=1|<nowiki>{{Item|Kabuto Beetle}}</nowiki>}} | ||
{{ | {{Example|no_copy=1|<nowiki>{{Item|Kabuto Beetle|size=64}}</nowiki>}} | ||
{{ | {{Example|no_copy=1|<nowiki>{{Item|Kabuto Beetle|link=Insect|text=Custom text}}</nowiki>}} | ||
{{ | {{Example|no_copy=1|<nowiki>{{Item|Dough|x=15|no_text=1}}</nowiki>}} | ||
{{ | {{Example|no_copy=1|<nowiki>{{Item|Hexia|note=Galaxy}}</nowiki>}} | ||
{{ | {{Example|no_copy=1|<nowiki>{{Item|Elsasani|text="Sani"|dot=1}}</nowiki>}} | ||
{{ | |||
==Template Data== | ==Template Data== | ||
| Line 52: | Line 55: | ||
], | ], | ||
"label": "Size", | "label": "Size", | ||
"description": "Size of the icon.", | "description": "Size of the icon excluding the length unit.", | ||
"example": "40", | "example": "20, 40", | ||
"type": "number", | "type": "number", | ||
"default": "30" | "default": "30" | ||
| Line 63: | Line 66: | ||
"label": "Quantity", | "label": "Quantity", | ||
"description": "Quantity of the item.", | "description": "Quantity of the item.", | ||
"example": "1", | "example": "1, 5, 10", | ||
"type": "number" | "type": "number" | ||
}, | }, | ||
| Line 77: | Line 80: | ||
"type": "wiki-page-name", | "type": "wiki-page-name", | ||
"default": "<1>, <name>" | "default": "<1>, <name>" | ||
}, | }, | ||
"note": { | "note": { | ||
| Line 92: | Line 89: | ||
"label": "Reference", | "label": "Reference", | ||
"description": "Append a reference to the item text.", | "description": "Append a reference to the item text.", | ||
"type": " | "type": "string" | ||
}, | }, | ||
"comma": { | "comma": { | ||
| Line 106: | Line 103: | ||
"type": "boolean" | "type": "boolean" | ||
}, | }, | ||
" | "comma_spc": { | ||
"label": "Comma and space", | "label": "Comma and space", | ||
"description": "Set to 1 to append a comma and a space to the item text following AmE rules.", | "description": "Set to 1 to append a comma and a space to the item text following AmE rules.", | ||
| Line 112: | Line 109: | ||
"type": "boolean" | "type": "boolean" | ||
}, | }, | ||
" | "dot_spc": { | ||
"label": "Dot and space", | "label": "Dot and space", | ||
"description": "Set to 1 to append a dot and a space to the item text following AmE rules.", | "description": "Set to 1 to append a dot and a space to the item text following AmE rules.", | ||
"example": "1", | "example": "1", | ||
"type": "boolean" | "type": "boolean" | ||
}, | |||
"no_text": { | |||
"label": "No text", | |||
"description": "Set to 1 to omit the complete text.", | |||
"example": "1", | |||
"type": "boolean" | |||
}, | |||
"invert": { | |||
"label": "Invert", | |||
"description": "Set to apply a filter to the image for either day/light or night/dark mode.", | |||
"example": "Day, Night", | |||
"type": "string" | |||
} | } | ||
}, | }, | ||
"description": "Template that adds a link to icons.", | "description": "Template that adds a link to icons.", | ||
"format": "inline" | "format": "inline", | ||
"paramOrder": [ | |||
"1", | |||
"2", | |||
"x", | |||
"type", | |||
"link", | |||
"no_text", | |||
"invert", | |||
"note", | |||
"ref", | |||
"comma", | |||
"dot", | |||
"comma_spc", | |||
"dot_spc" | |||
] | |||
} | } | ||
</templatedata> | </templatedata> | ||