Template:UserSplashtag: Difference between revisions
From Inkipedia, the Splatoon wiki
GuyPerfect (talk | contribs) mNo edit summary |
GuyPerfect (talk | contribs) (Supporting multiple sizes, adding documentation) |
||
Line 1: | Line 1: | ||
<includeonly><templatestyles src="UserSplashtag/styles.css" /><div class="user-splashtag">[[File:S3_Banner_{{{1|}}}.png| | <includeonly><templatestyles src="UserSplashtag/styles.css" /><div class="user-splashtag">[[File:S3_Banner_{{{1|}}}.png|x{{#expr:{{{size|24}}} * 4 / 3 round 0}}px|link=]]<div style="column-gap: calc((100% - {{{size|24}}}px * 3) / 4);">{{#ifeq:{{{2|}}}|empty|<div style="width:{{{size|24}}}px;height:{{{size|24}}}px;"></div>|{{#if:{{{2|}}}|[[File:S3_Badge_{{{2|}}}.png|x{{{size|24}}}px|link=]]}}}}{{#ifeq:{{{3|}}}|empty|<div style="width:{{{size|24}}}px;height:{{{size|24}}}px;"></div>|{{#if:{{{3|}}}|[[File:S3_Badge_{{{3|}}}.png|x{{{size|24}}}px|link=]]}}}}{{#ifeq:{{{4|}}}|empty|<div style="width:{{{size|24}}}px;height:{{{size|24}}}px;"></div>|{{#if:{{{4|}}}|[[File:S3_Badge_{{{4|}}}.png|x{{{size|24}}}px|link=]]}}}}</div></div> | ||
<div>{{#ifeq:{{{2|}}}|empty|<div></div>|{{#if:{{{2|}}}|[[File:S3_Badge_{{{2|}}}.png| | </includeonly><noinclude> | ||
Displays a friendly splashtag graphic for a user context. | |||
{{UserSplashtag|11027| | == Parameters == | ||
{| | |||
|- style="vertical-align: top;" | |||
|<code>banner</code>||Required.||The numeric ID of the banner image. | |||
|- style="vertical-align: top;" | |||
|<code>badge1</code>||Optional.||The name of the first badge, or <code>empty</code> | |||
|- style="vertical-align: top;" | |||
|<code>badge2</code>||Optional.||The name of the second badge, or <code>empty</code> | |||
|- style="vertical-align: top;" | |||
|<code>badge3</code>||Optional.||The name of the third badge, or <code>empty</code> | |||
|- style="vertical-align: top;" | |||
|<code>size</code>||Named, Optional.||The number of pixels for the height of the badge images. The default is 24. | |||
|} | |||
If badges are omitted, they are simply not added to the output. If an empty space is desired, use <code>empty</code> for the badge name. | |||
== Example == | |||
Markup: | |||
<nowiki>{{UserSplashtag|11027|N-ZAP '85 4|Stinger 100|Catalog 50|size=32}}</nowiki> | |||
Output: | |||
{{UserSplashtag|11027|N-ZAP '85 4|Stinger 100|Catalog 50|size=32}} | |||
</noinclude> | </noinclude> |
Revision as of 16:16, 27 September 2022
Displays a friendly splashtag graphic for a user context.
Parameters
banner |
Required. | The numeric ID of the banner image. |
badge1 |
Optional. | The name of the first badge, or empty
|
badge2 |
Optional. | The name of the second badge, or empty
|
badge3 |
Optional. | The name of the third badge, or empty
|
size |
Named, Optional. | The number of pixels for the height of the badge images. The default is 24. |
If badges are omitted, they are simply not added to the output. If an empty space is desired, use empty
for the badge name.
Example
Markup:
{{UserSplashtag|11027|N-ZAP '85 4|Stinger 100|Catalog 50|size=32}}
Output: