Template:Card/doc: Difference between revisions
Created Template:Card/doc |
Updated |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 7: | Line 7: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="wikitext" copy> | <syntaxhighlight lang="wikitext" copy> | ||
{{Card | {{Card}} | ||
</syntaxhighlight> | </syntaxhighlight> | ||
This template has 2 unnamed parameters: | This template has 2 unnamed parameters: | ||
| Line 15: | Line 15: | ||
* {{F|caption}} – Caption for the card. | * {{F|caption}} – Caption for the card. | ||
* {{F|show_caption}} – Set to {{F|1}} to show the caption. | * {{F|show_caption}} – Set to {{F|1}} to show the caption. | ||
* {{F|caption_width}} – Width of the caption. | * {{F|caption_width}} – Width of the caption {{Color|New|including}} the length unit. Default: {{F|76px}} (full), {{F|56px}} (mini). | ||
* {{F|image}} – Set another image for the card. | |||
* {{F|size}} – Size of the image {{Color|Old|excluding}} the length unit. Default: {{F|70}} (full), {{F|48}} (mini). | |||
* {{F|ext}} – Extension of the image. Default: {{F|png}}. | |||
* {{F|quality}} / {{F|rarity}} – Quality of the item. Default: see [[Module:CentralData]]. | * {{F|quality}} / {{F|rarity}} – Quality of the item. Default: see [[Module:CentralData]]. | ||
* {{F|type}} – Data type for the item. | * {{F|type}} – Data type for the item. | ||
* {{F|suffix}} – Special keyword to adjust the | * {{F|suffix}} – Special keyword to adjust the image's suffix. | ||
* {{F|link}} – Set another page to be linked. | * {{F|link}} – Set another page to be linked. | ||
* {{F|link_suffix}} – Append a suffix to the link. | * {{F|link_suffix}} – Append a suffix to the link. | ||
| Line 31: | Line 34: | ||
{{Example|no_copy=1|<nowiki> | {{Example|no_copy=1|<nowiki> | ||
{{Card|Mobai|show_text=1}} | {{Card|Mobai|size=128|show_text=1}} | ||
</nowiki>}} | </nowiki>}} | ||
{{Example|no_copy=1|<nowiki> | {{Example|no_copy=1|<nowiki> | ||
{{Card|Mobai|show_caption=1}} | {{Card|Mobai|image=Unknown Icon.png|show_caption=1}} | ||
</nowiki>}} | </nowiki>}} | ||
{{Example|no_copy=1|<nowiki> | {{Example|no_copy=1|<nowiki> | ||
{{Card|Mobai|text=Text|caption=Caption|show_caption=1|quality=purple}} | {{Card|Mobai|text=Text|caption=Caption|show_caption=1|quality=purple|link=Neighbor}} | ||
</nowiki>}} | </nowiki>}} | ||
| Line 81: | Line 84: | ||
], | ], | ||
"label": "Show text", | "label": "Show text", | ||
"description": "Set to 1 to show the | "description": "Set to 1 to show the text.", | ||
"example": "1", | "example": "1", | ||
"type": "boolean" | "type": "boolean" | ||
| Line 98: | Line 101: | ||
"caption_width": { | "caption_width": { | ||
"label": "Caption width", | "label": "Caption width", | ||
"description": "Width of the caption.", | "description": "Width of the caption including the unit length.", | ||
"example": " | "example": "100px, 3em", | ||
"type": "string" | "type": "string", | ||
"default": "74px (full), 56px (mini)" | |||
}, | }, | ||
"quality": { | "quality": { | ||
| Line 119: | Line 123: | ||
"suffix": { | "suffix": { | ||
"label": "Suffix", | "label": "Suffix", | ||
"description": "Special keyword to adjust the | "description": "Special keyword to adjust the image's suffix.", | ||
"type": "string" | "type": "string" | ||
}, | }, | ||
| Line 143: | Line 147: | ||
"example": "1", | "example": "1", | ||
"type": "boolean" | "type": "boolean" | ||
}, | |||
"image": { | |||
"label": "Image", | |||
"description": "Set another image for the card.", | |||
"example": "Unknown Icon.png", | |||
"type": "wiki-file-name", | |||
"default": "<name> Icon.png" | |||
}, | |||
"size": { | |||
"aliases": [ | |||
"image_size" | |||
], | |||
"label": "Size", | |||
"description": "Size of the image excluding the unit length.", | |||
"default": "70 (full), 48 (mini)", | |||
"type": "number", | |||
"example": "64, 128" | |||
}, | |||
"ext": { | |||
"aliases": [ | |||
"image_ext" | |||
], | |||
"label": "Extension", | |||
"description": "Extension of the image.", | |||
"type": "string", | |||
"default": "png" | |||
} | } | ||
}, | }, | ||
"description": "Template that creates an item-style card with an image, quality, label, caption, modifiers, and optional data-driven icons.", | "description": "Template that creates an item-style card with an image, quality, label, caption, modifiers, and optional data-driven icons.", | ||
"format": "inline" | "format": "inline", | ||
"paramOrder": [ | |||
"1", | |||
"2", | |||
"show_text", | |||
"caption", | |||
"show_caption", | |||
"caption_width", | |||
"image", | |||
"size", | |||
"ext", | |||
"quality", | |||
"type", | |||
"suffix", | |||
"link", | |||
"link_suffix", | |||
"no_link", | |||
"mini" | |||
] | |||
} | } | ||
</templatedata> | </templatedata> | ||
Latest revision as of 07:41, 5 May 2026
This is the documentation page for Card. It contains usage information, categories, and other content not part of the original template page. | ||
|---|---|---|
| Main | Documentation | Usage |
Template that creates an item-style card with an image, quality, label, caption, modifiers, and optional data-driven icons.
Syntax
[edit source]{{Card}}
This template has 2 unnamed parameters:
- 1 / name – Name of the item.
- 2 / text / label / x / count / amount – Text or quantity for the item.
- show_text / show_label – Set to 1 to show the text.
- caption – Caption for the card.
- show_caption – Set to 1 to show the caption.
- caption_width – Width of the caption including the length unit. Default: 76px (full), 56px (mini).
- image – Set another image for the card.
- size – Size of the image excluding the length unit. Default: 70 (full), 48 (mini).
- ext – Extension of the image. Default: png.
- quality / rarity – Quality of the item. Default: see Module:CentralData.
- type – Data type for the item.
- suffix – Special keyword to adjust the image's suffix.
- link – Set another page to be linked.
- link_suffix – Append a suffix to the link.
- no_link – Set to 1 to omit the link.
- mini – Set to 1 for a mini card.
Examples
[edit source]Default
[edit source]
{{Card|Mobai}}
{{Card|Mobai|size=128|show_text=1}}
{{Card|Mobai|image=Unknown Icon.png|show_caption=1}}
{{Card|Mobai|text=Text|caption=Caption|show_caption=1|quality=purple|link=Neighbor}}
Mini
[edit source]
{{Card|White Archiboo|mini=1}}
{{Card|White Archiboo|mini=1|x=5|caption=Really long caption|show_caption=1|caption_width=80px|no_link=1}}
Template Data
[edit source]Template that creates an item-style card with an image, quality, label, caption, modifiers, and optional data-driven icons.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Name | 1 name | Name of the item. | String | suggested |
| Text | 2 text label x count amount | Text or quantity for the item. | String | optional |
| Show text | show_text show_label | Set to 1 to show the text.
| Boolean | optional |
| Caption | caption | Caption for the card. | String | optional |
| Show caption | show_caption | Set to 1 to show the caption.
| Boolean | optional |
| Caption width | caption_width | Width of the caption including the unit length.
| String | optional |
| Image | image | Set another image for the card.
| File | optional |
| Size | size image_size | Size of the image excluding the unit length.
| Number | optional |
| Extension | ext image_ext | Extension of the image.
| String | optional |
| Quality | quality rarity | Quality of the item.
| String | optional |
| Type | type | Data type for the item. | String | optional |
| Suffix | suffix | Special keyword to adjust the image's suffix. | String | optional |
| Link | link | Set another page to be linked. | Page name | optional |
| Link suffix | link_suffix | Append a suffix to the link. | String | optional |
| No link | no_link | Set to 1 to omit the link.
| Boolean | optional |
| Mini | mini | Set to 1 for a mini card.
| Boolean | optional |