Template:Main Page/Highlight: Difference between revisions
Appearance
Created Template:Main Page/Highlight |
SteviumBot (talk | contribs) m Changed template data format |
||
| (4 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
<includeonly><!-- | <includeonly><!-- | ||
--><div class="mp-section mp-highlight"><!-- | --><div class="mp-section mp-highlight"><!-- | ||
--><div class="mp-highlight-image">[[File:{{{image|}}}|640px|link=|alt=]]</div><!-- | --><div class="mp-highlight-image">[[File:{{{image|}}}.{{{ext|png}}}|640px|link=|alt=]]</div><!-- | ||
--><div class="mp-highlight-top"><!-- | --><div class="mp-highlight-top"><!-- | ||
--><div class="mp-highlight-title"><h3 class="mp-title">{{{title|}}}</h3></div><!-- | --><div class="mp-highlight-title"><h3 class="mp-title">{{{title|}}}</h3></div><!-- | ||
| Line 12: | Line 12: | ||
==Syntax== | ==Syntax== | ||
< | <syntaxhighlight lang="wikitext" copy> | ||
{{Main Page/Highlight | {{Main Page/Highlight | ||
|image = | |image = | ||
| Line 20: | Line 20: | ||
|tag_text = | |tag_text = | ||
}} | }} | ||
</ | </syntaxhighlight> | ||
* {{F|image}} – Destination filename ( | * {{F|image}} – Destination filename ('''excluding''' the file extension). | ||
* {{F|ext}} – Extension for filename. Default: {{F|png}}. | |||
* {{F|title}} – Title of the highlight card. | * {{F|title}} – Title of the highlight card. | ||
* {{F|link}} – Link of the highlight card. | * {{F|link}} – Link of the highlight card. | ||
* {{F|tag}} – Type of tag that will be displayed on the highlight card. Default: {{F|Update}} | * {{F|tag}} – Type of tag that will be displayed on the highlight card. Default: {{F|Update}}. | ||
* {{F|tag_text}} – Text displayed in the tag on the highlight card. Default: {{F|tag|v=1}} | * {{F|tag_text}} – Text displayed in the tag on the highlight card. Default: {{F|tag|v=1}}. | ||
==Example== | ==Example== | ||
{{Example|<nowiki> | |||
{{ | |||
| | |||
< | |||
<div class="mp-highlight-wrapper"> | <div class="mp-highlight-wrapper"> | ||
{{Main Page/Highlight | {{Main Page/Highlight | ||
|image = Stardrift Test Splashscreen | |image = Stardrift Test Splashscreen | ||
|title = Stardrift Test | |title = Stardrift Test | ||
|link = Version/Stardrift Test | |link = Version/Stardrift Test | ||
| Line 51: | Line 38: | ||
}} | }} | ||
{{Main Page/Highlight | {{Main Page/Highlight | ||
|image = Coziness Test Splashscreen | |image = Coziness Test Splashscreen | ||
|title = Coziness Test | |title = Coziness Test | ||
|link = Version/Coziness Test | |link = Version/Coziness Test | ||
| Line 57: | Line 44: | ||
}} | }} | ||
</div> | </div> | ||
</nowiki>}} | |||
==Template Data== | ==Template Data== | ||
| Line 64: | Line 52: | ||
"image": { | "image": { | ||
"label": "Image", | "label": "Image", | ||
"description": "Destination filename ( | "description": "Destination filename (excluding the extension).", | ||
"example": "Coziness Test Splashscreen | "example": "Coziness Test Splashscreen", | ||
"type": "wiki-file-name", | "type": "wiki-file-name", | ||
"required": true | "required": true | ||
}, | |||
"ext": { | |||
"label": "Extension", | |||
"description": "Extension for filename.", | |||
"default": "png", | |||
"type": "string" | |||
}, | }, | ||
"title": { | "title": { | ||
| Line 95: | Line 89: | ||
"description": "Link of the highlight card.", | "description": "Link of the highlight card.", | ||
"example": "Version/Coziness Test", | "example": "Version/Coziness Test", | ||
"type": " | "type": "wiki-page-name", | ||
"required": true | "required": true | ||
} | } | ||
| Line 102: | Line 96: | ||
"paramOrder": [ | "paramOrder": [ | ||
"image", | "image", | ||
"ext", | |||
"title", | "title", | ||
"link", | "link", | ||
| Line 107: | Line 102: | ||
"tag_text" | "tag_text" | ||
], | ], | ||
"format": " | "format": "{{_\n|_______________ = _\n}}\n" | ||
} | } | ||
</templatedata> | </templatedata> | ||
<templatestyles src="Template:Main Page/styles.css" /> | |||
}}</noinclude> | }}</noinclude> | ||
Latest revision as of 12:32, 18 May 2026
Template documentation
Note: parts of or the entire template might not be visible without values provided.
Note: parts of or the entire template might not be visible without values provided.
| Main | Usage |
This template uses CSS found at Template:Main Page/styles.css.
Template that creates highlight cards for {{Main Page}}.
Syntax
{{Main Page/Highlight
|image =
|title =
|link =
|tag =
|tag_text =
}}
- image – Destination filename (excluding the file extension).
- ext – Extension for filename. Default: png.
- title – Title of the highlight card.
- link – Link of the highlight card.
- tag – Type of tag that will be displayed on the highlight card. Default: Update.
- tag_text – Text displayed in the tag on the highlight card. Default: tag.
Example
<div class="mp-highlight-wrapper">
{{Main Page/Highlight
|image = Stardrift Test Splashscreen
|title = Stardrift Test
|link = Version/Stardrift Test
|tag_text = Beta
}}
{{Main Page/Highlight
|image = Coziness Test Splashscreen
|title = Coziness Test
|link = Version/Coziness Test
|tag_text = Beta
}}
</div>
Template Data
Template that creates highlight cards for the Main Page.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Image | image | Destination filename (excluding the extension).
| File | required |
| Extension | ext | Extension for filename.
| String | optional |
| Title | title | Title of the highlight card.
| String | required |
| Link | link | Link of the highlight card.
| Page name | required |
| Tag | tag | Type of tag that will be displayed on the highlight card.
| String | suggested |
| Tag text | tag_text | Text displayed in the tag on the highlight card.
| String | optional |