Template:Main Page/Button: Difference between revisions

Created Template:Main Page/Button
 
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 7: Line 7:


==Syntax==
==Syntax==
<pre>
<syntaxhighlight lang="wikitext" copy>
{{Main Page/Button|icon = |link = |text = }}
{{Main Page/Button|icon = |link = |text = }}
</pre>
</syntaxhighlight>
* {{F|icon}} &ndash; Icon for the button. Available icons:
* {{F|icon}} &ndash; Icon for the button. Available icons:
** {{F|Discord}}, {{F|Facebook}}, {{F|HoYoLAB}}, {{F|HoYoverse}}, {{F|Instagram}}, {{F|Reddit}}, {{F|TikTok}}, {{F|X}}, {{F|YouTube}}
** {{F|Discord}}, {{F|Facebook}}, {{F|HoYoLAB}}, {{F|HoYoverse}}, {{F|Instagram}}, {{F|Reddit}}, {{F|TikTok}}, {{F|X}}, {{F|YouTube}}
Line 16: Line 16:


==Example==
==Example==
<pre>
{{Example|<nowiki>
{{Main Page/Button|icon = HoYoverse|link = https://planet.hoyoverse.com|text = Official Website}}
<div class="mp-button-wrapper">
{{Main Page/Button|icon = HoYoLAB|link = https://www.hoyolab.com/circles/10/100002/official|text = Official HoYoLAB}}
</pre>
<templatestyles src="Template:Main Page/styles.css" />
<div class="mp-button-wrapper" style="margin-top:8px;">
{{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}}
</div>
</div>
</nowiki>}}


==Template Data==
==Template Data==
Line 41: 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": "string",
"type": "url",
"required": true
"required": true
},
},
Line 62: Line 59:
}
}
</templatedata>
</templatedata>
 
<templatestyles src="Template:Main Page/styles.css" />
}}</noinclude>
}}</noinclude>