Template
Avatar
From Dogcraft Wiki
imported>Domino No edit summary |
m (Added category: Annotation templates) |
||
(25 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude>[[Category:Annotation templates]] {{WIP}} | ||
</noinclude><noinclude> | |||
===Example=== | ===Example=== | ||
<nowiki>{{ | <nowiki>{{Avatar|William278|120}}</nowiki> generates: {{Avatar|William278|120}} | ||
<includeonly>https://minotar.net/helm/{{{1|char}}}/{{{2 | |||
</noinclude><includeonly><span class="noexcerpt" style="white-space:nowrap; {{#if: {{{block|}}}|display:block; {{#if: {{{float|}}}|float:{{{float|}}};|}} {{#if: {{{margin|}}}|margin:{{{margin|0 .3em}}};|}}|}}">{{#if: {{{uuid|}}}|https://dogcraft.net/img/mc/avatars/{{{uuid}}}?size={{{size|{{{2}}}}}}&overlay={{{overlay|true}}}.png|https://minotar.net/helm/{{{1|char}}}/{{{size|{{{2}}}}}}.png}}</span></includeonly><noinclude> | |||
<templatedata> | |||
{ | |||
"params": { | |||
"1": { | |||
"label": "Username", | |||
"description": "The ingame name of the user for whom to get the skin. May be replaced by UUID.", | |||
"example": "William278", | |||
"type": "string", | |||
"required": true | |||
}, | |||
"2": { | |||
"aliases": [ | |||
"size" | |||
], | |||
"label": "Size", | |||
"description": "The size at which to display the avatar. This is a plain number, specifying the width of one side of the square in pixels.", | |||
"example": "20", | |||
"type": "number", | |||
"default": "20" | |||
}, | |||
"block": { | |||
"label": "Block toggle", | |||
"description": "Optional toggle paramter for block display mode. If it contains anything, it will toggle. Use for image-like display.", | |||
"example": "\"1\" or \"true\" or \"xyz\"", | |||
"type": "boolean" | |||
}, | |||
"float": { | |||
"label": "Float (used in block mode)", | |||
"description": "Used for specifying an optional float in block display mode.", | |||
"example": "\"left\" or \"right\"", | |||
"type": "string" | |||
}, | |||
"margin": { | |||
"label": "Margin (used in block mode)", | |||
"description": "Used for specifying an optional margin in block display mode.", | |||
"example": "0 .3em", | |||
"type": "string", | |||
"default": "0 .3em", | |||
"autovalue": "0 .3em" | |||
}, | |||
"uuid": { | |||
"label": "UUID", | |||
"description": "The mc UUID of the user for whom to get the avatar for. May be the full uuid, or the {{UUID}} template. Can replace the Username parameter.", | |||
"example": "5dfb0558-e306-44f4-bb9a-f9218d4eb787 or {{UUID|William}}", | |||
"type": "string", | |||
"suggested": true | |||
}, | |||
"size": { | |||
"aliases": [ | |||
"2" | |||
], | |||
"label": "Size", | |||
"description": "The size at which to display the avatar. This is a plain number, specifying the width of one side of the square in pixels.", | |||
"example": "20", | |||
"type": "number", | |||
"default": "20", | |||
"required": true | |||
} | |||
}, | |||
"description": "Adds a image of a user's skin's face with an option to set size.", | |||
"format": "inline" | |||
} | |||
</templatedata> | |||
</noinclude> |
Latest revision as of 12:02, 4 December 2023
Example
{{Avatar|William278|120}} generates:
Adds a image of a user's skin's face with an option to set size.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Username | 1 | The ingame name of the user for whom to get the skin. May be replaced by UUID.
| String | required |
Size | 2 size | The size at which to display the avatar. This is a plain number, specifying the width of one side of the square in pixels.
| Number | optional |
Block toggle | block | Optional toggle paramter for block display mode. If it contains anything, it will toggle. Use for image-like display.
| Boolean | optional |
Float (used in block mode) | float | Used for specifying an optional float in block display mode.
| String | optional |
Margin (used in block mode) | margin | Used for specifying an optional margin in block display mode.
| String | optional |
UUID | uuid | The mc UUID of the user for whom to get the avatar for. May be the full uuid, or the {{UUID}} template. Can replace the Username parameter.
| String | suggested |
Size | size 2 | The size at which to display the avatar. This is a plain number, specifying the width of one side of the square in pixels.
| Number | required |