Template:Userbox/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
Line 22: Line 22:
| {{Code|{{param|border-c}}}}
| {{Code|{{param|border-c}}}}
| Userbox border color
| Userbox border color
| {{CodeBlock|{{((}}Userbox|{{Tint|color=yellow|border-c}}{{=}}{{Tint|color=green|red}}{{))}}}}
| {{CodeBlock|margin=5px|<nowiki>| border-c = red</nowiki>}}
| {{Userbox|border-c=red}}
| {{Userbox|border-c=red}}
|-
|-
| {{Code|{{param|border-w}}}}
| {{Code|{{param|border-w}}}}
| Userbox border width <br>{{ModernNote}} Unit must be specified
| Userbox border width <br>{{ModernNote}} Unit must be specified
| {{CodeBlock|{{((}}Userbox&#124;{{Tint|color=yellow|border-w}}{{=}}{{Tint|color=green|3px}}{{))}}}}
| {{CodeBlock|margin=5px|<nowiki>| border-w = 3px</nowiki>}}
| {{Userbox|border-w=3px}}
| {{Userbox|border-w=3px}}
|-
|-
| {{Code|{{param|info}}}}
| {{Code|{{param|info}}}}
| Infobox content
| Infobox content
| {{CodeBlock|{{((}}Userbox&#124;{{Tint|color=yellow|info}}{{=}}{{Tint|color=green|Hello, World!}}{{))}}}}
| {{CodeBlock|margin=5px|<nowiki>| info = Hello, World!</nowiki>}}
| {{Userbox|info=Hello, World!}}
| {{Userbox|info=Hello, World!}}
|-
|-
| {{Code|{{param|info-s}}}}
| {{Code|{{param|info-s}}}}
| Infobox styling
| Infobox styling
| {{CodeBlock|{{((}}Userbox&#124;{{Tint|color=yellow|info-s}}{{=}}{{Tint|color=green|background:#222;}}{{))}}}}
| {{CodeBlock|margin=5px|<nowiki>| info-s = background:#222;</nowiki>}}
| {{Userbox|info-s=background:#222;}}
| {{Userbox|info-s=background:#222;}}
|-
|-
| {{Code|{{param|id}}}}
| {{Code|{{param|id}}}}
| Idbox content
| Idbox content
| {{CodeBlock|{{((}}Userbox&#124;{{Tint|color=yellow|id}}{{=}}{{Tint|color=green|<nowiki>[[File:Earth.gif|24px|link=]]</nowiki>}}{{))}}}}
| {{CodeBlock|margin=5px|<nowiki>| id = [[File:Earth.gif|link=]]</nowiki>}}
| {{Userbox|id=[[File:Earth.gif|link=]]}}
| {{Userbox|id=[[File:Earth.gif|link=]]}}
|-
|-
| {{Code|{{param|id-s}}}}
| {{Code|{{param|id-s}}}}
| Idbox styling
| Idbox styling
| {{CodeBlock|{{((}}Userbox&#124;{{Tint|color=yellow|id-s}}{{=}}{{Tint|color=green|background:indigo;}}{{))}}}}
| {{CodeBlock|margin=5px|<nowiki>| id-s = background:indigo;</nowiki>}}
| {{Userbox|id-s=background:indigo;}}
| {{Userbox|id-s=background:indigo;}}
|-
|-
| {{Code|{{param|type}}}}
| {{Code|{{param|type}}}}
| Predefined styling for the entire userbox
| Predefined styling for the entire userbox
| {{CodeBlock|{{((}}Userbox&#124;{{Tint|color=yellow|type}}{{=}}{{Tint|color=green|black}}{{))}}}}
| {{CodeBlock|margin=5px|<nowiki>| type = black</nowiki>}}
| {{Userbox|type=black}}
| {{Userbox|type=black}}
|}
|}

Revision as of 12:16, 24 April 2023

Edit-copy.png
This is a documentation subpage for Template:Userbox.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

This is a meta template used to aid in the creation of userbox templates.

Copy and Paste

{{Userbox | info = | info-s = | id = | id-s = }}

Usage, Parameters and Examples

{{Userbox}}
Parameter Description Example Preview
{{{border-c}}} Userbox border color
| border-c = red
id

info

{{{border-w}}} Userbox border width
Template:ModernNote Unit must be specified
| border-w = 3px
id

info

{{{info}}} Infobox content
| info = Hello, World!
id

Hello, World!

{{{info-s}}} Infobox styling
| info-s = background:#222;
id

info

{{{id}}} Idbox content
| id = [[File:Earth.gif|link=]]
Earth.gif

info

{{{id-s}}} Idbox styling
| id-s = background:indigo;
id

info

{{{type}}} Predefined styling for the entire userbox
| type = black
id

info

Available Types

{{Userbox|type=black}}
id

info