Template:Main Page/Button: Difference between revisions
Appearance
Added SyntaxHighlight and Template:Example |
SteviumBot (talk | contribs) mNo edit summary |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 17: | Line 17: | ||
==Example== | ==Example== | ||
{{Example|<nowiki> | {{Example|<nowiki> | ||
<div class="mp-button-wrapper"> | |||
<div class="mp-button-wrapper | |||
{{Main Page/Button|icon = HoYoverse|link = https://planet.hoyoverse.com|text = Official Website}} | {{Main Page/Button|icon = HoYoverse|link = https://planet.hoyoverse.com|text = Official Website}} | ||
{{Main Page/Button|icon = HoYoLAB|link = https://www.hoyolab.com/circles/10/100002/official|text = Official HoYoLAB}} | {{Main Page/Button|icon = HoYoLAB|link = https://www.hoyolab.com/circles/10/100002/official|text = Official HoYoLAB}} | ||
| Line 39: | Line 38: | ||
"description": "External link of the button.", | "description": "External link of the button.", | ||
"example": "https://planet.hoyoverse.com", | "example": "https://planet.hoyoverse.com", | ||
"type": " | "type": "url", | ||
"required": true | "required": true | ||
}, | }, | ||
| Line 60: | Line 59: | ||
} | } | ||
</templatedata> | </templatedata> | ||
<templatestyles src="Template:Main Page/styles.css" /> | |||
}}</noinclude> | }}</noinclude> | ||
Latest revision as of 19:49, 4 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 buttons for {{Main Page}}.
Syntax
{{Main Page/Button|icon = |link = |text = }}
- icon – Icon for the button. Available icons:
- Discord, Facebook, HoYoLAB, HoYoverse, Instagram, Reddit, TikTok, X, YouTube
- link – External link of the button.
- text – Text of the external link. Default: icon.
Example
<div class="mp-button-wrapper">
{{Main Page/Button|icon = HoYoverse|link = https://planet.hoyoverse.com|text = Official Website}}
{{Main Page/Button|icon = HoYoLAB|link = https://www.hoyolab.com/circles/10/100002/official|text = Official HoYoLAB}}
</div>
Template Data
Template that creates buttons for the Main Page.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Icon | icon | Icon for the button. See documentation for list of available icons.
| String | required |
| Link | link | External link of the button.
| URL | required |
| Text | text | Text of the external link.
| String | suggested |