Template:Userbox: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{doc}}<includeonly><onlyinclude><div style="margin:1px; display:inline-grid; grid-template-columns:1fr 6fr; width:294px; border-radius:.25em; border: {{{border-w|1px}}} solid  
{{doc}}<includeonly><onlyinclude><div style="margin:1px; display:inline-grid; grid-template-columns:1fr 6fr; min-width:256px; max-width:294px; border-radius:.25em; border: {{{border-w|1px}}} solid  


{{#switch:{{{type}}}
{{#switch:{{{type}}}
| black    = #000
| black    = #000
| pink    = rgb(159, 59, 86,.4)
| pink    = rgb(159, 59, 86,.4)
| ClearBlack = rgb(0, 0, 0,.88)
| #default = {{{border-c|rgba(255,255,255,.1)}}}
| #default = {{{border-c|rgba(255,255,255,.1)}}}
}};  
}};  
Line 13: Line 12:


<div style="background:{{#switch:{{{type}}}  
<div style="background:{{#switch:{{{type}}}  
| ClearBlack = rgba(0,0,0,.88)
| black    = #000
| black    = #000
| pink    = rgb(159, 59, 86,.16)
| pink    = rgb(159, 59, 86,.16)
Line 22: Line 20:


<div style="background:{{#switch:{{{type}}}  
<div style="background:{{#switch:{{{type}}}  
| ClearBlack = rgba(0,0,0,.88)
| black    = #000
| black    = #000
| pink    = rgb(159, 59, 86,.16)
| pink    = rgb(159, 59, 86,.16)
| #default = rgba(0,0,0,.16)
| #default = rgba(0,0,0,.16)
}};display:grid; font-size:8pt; {{{info-s|}}}"><p style="margin:.4em 0; align-self:center; padding-left:5px; line-height: 1.25em; ">{{{info|''info''}}}</p></div></div></onlyinclude></includeonly>
}};display:grid; font-size:8pt; {{{info-s|}}}"><p style="margin:.4em 0; align-self:center; padding-left:5px; line-height: 1.25em; ">{{{info|''info''}}}</p></div></div></onlyinclude></includeonly>

Latest revision as of 14:58, 16 May 2024

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
View
Page history

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

For the list of predefined userbox templates which uses this template, see Category:Userbox Templates.

Copy and Paste

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

Usage, Parameters and Examples

{{Userbox}}
Parameter Description Example Preview
No parameters Template will revert to the default valves specified within the {{#switch}} parser functions.
{{Userbox}}
id

info

{{{border-c}}} Userbox border color
| border-c = red
id

info

{{{border-w}}} Userbox border width
Note.pngNote: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}} {{Userbox|type=pink}} {{Userbox|type=ClearBlack}}
id

info

id

info

id

info