Template:Userbox: Difference between revisions
From Screamer Wiki
(Created page with "{{userbox | bodyclass = <!--Adds an HTML class attribute to the entire template's HTML table, to allow for styling, emission of microformats, etc.--> | border-c = <!-...") |
No edit summary |
||
Line 1: | Line 1: | ||
{{ | <div style="float:{{{float|left}}}; border:{{{border-width|{{{border-s|1}}}}}}px solid {{{border-color|{{{1|{{{border-c|{{{id-c|#999}}}}}}}}}}}}; margin:1px;" class="wikipediauserbox"> | ||
| | {| cellspacing="0" style="width:238px; background:{{{info-background|{{{2|{{{info-c|#EEE}}}}}}}}};" | ||
| border-c | {{#if:{{{logo|{{{3|{{{id|id}}}}}}}}}| | ||
| | ! style="width:{{{logo-width|{{{id-w|45}}}}}}px; height:{{{logo-height|{{{id-h|45}}}}}}px; background:{{{logo-background|{{{1|{{{id-c|#DDD}}}}}}}}}; text-align:{{{id-a|center}}}; font-size:{{{logo-size|{{{5|{{{id-s|14}}}}}}}}}pt; color:{{{logo-color|{{{id-fc|black}}}}}}; padding:{{{logo-padding|{{{id-p|1px}}}}}}; line-height:{{{logo-line-height|{{{id-lh|1.25em}}}}}}; vertical-align: middle; {{{logo-other-param|{{{id-op|}}}}}}" {{!}} {{{logo|{{{3|{{{id|id}}}}}}}}} | ||
| | |||
| id | |||
| id- | |||
| | |||
| id-h | |||
| | |||
| id- | |||
| | |||
| id-s | |||
| id- | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
}} | }} | ||
| style="text-align:{{{info-a|left}}}; font-size:{{{info-size|{{{info-s|8}}}}}}pt; padding:{{{info-padding|{{{info-p|4px}}}}}}; height:{{{logo-height|{{{id-h|45}}}}}}px; line-height:{{{info-line-height|{{{info-lh|1.25em}}}}}}; color:{{{info-color|{{{info-fc|black}}}}}}; vertical-align: middle; {{{info-other-param|{{{info-op|}}}}}}" | {{{info|{{{4|{{{info|''info''}}}}}}}}} | |||
|}</div>{{#if:{{{usercategory|}}}{{{usercategory2|}}}{{{usercategory3|}}}|{{cat handler | |||
|nocat = {{{nocat|}}} | |||
|subpage = {{#if:{{{nocatsubpages|}}}|no}} | |||
|user = {{#if:{{{usercategory|}}}|[[Category:{{{usercategory}}}]]}}{{#if:{{{usercategory2|}}}|[[Category:{{{usercategory2}}}]]}}{{#if:{{{usercategory3|}}}|[[Category:{{{usercategory3}}}]]}} | |||
|template = {{#if:{{{usercategory|}}}|[[Category:{{{usercategory}}}| {{BASEPAGENAME}}]]}}{{#if:{{{usercategory2|}}}|[[Category:{{{usercategory2}}}| {{BASEPAGENAME}}]]}}{{#if:{{{usercategory3|}}}|[[Category:{{{usercategory3}}}| {{BASEPAGENAME}}]]}} | |||
}}}}<noinclude> | |||
{{documentation}} | |||
</noinclude> |
Revision as of 01:46, 20 August 2019
id | info |
---|
- Description
- This template is used to create user boxes.
Description | Left Inset | Main Box | Right Inset | |
---|---|---|---|---|
Content | Content wiki code | lcontent= | content= | rcontent= |
Background | color | lbg= | mainbg= | rbg= |
Text color | color | lcolor= | color= | rcolor= |
Width | with units | lwidth= | width= (with insets) |
rwidth= |
Font size | with units | lsize= | size= | rsize= |
|
- Syntax
- Type
{{userbox}}
on user page. - The box is formatted with the help of MediaWiki:Wikia.css (see below) - allowing the template to be used both with and without additional formatting information.
- The box consists of three parts - left and right inserts as well as the main (text) cell; the cells are rendered if the relevant content parameters are provided.
- The available parameters are listed in the box to the right.
- CSS code (add to MediaWiki:Wikia.css)
/* === USERBOXES === */ table.userbox { float:left; margin:0.2em; padding:0; border-width:1px; border-style:solid; } table.userbox td.left, table.userbox td.right { text-align:center; vertical-align:middle; font-size:1.6em; padding:0; } table.userbox td.main { padding:0 4px; vertical-align:middle; line-height:125%; font-size:0.9em; } table.userbox { border-color:#aaa; background:#f8f8f8; } table.userbox td.left, table.userbox td.right { background:#d8d8d8; }
- Sample output
{{userbox}}
gives...
id | info |
---|
{{userbox|rcontent=R|content=Box with one inset and no provided styling.}}
gives...
id | info |
---|
{{userbox|lcontent=L|rcontent=R|content=Box with both insets and no provided styling.}}
gives...
id | info |
---|
{{userbox|rcontent=[[File:Red Prompt button up-1-.svg]]|content=Box with one inset with a photo and no provided styling.}}
gives...
id | info |
---|
{{userbox|rcontent=BLU|content=Right inset, custom colors|mainbg=steelblue|rbg=lightsteelblue|rcolor=midnightblue|rsize=2em|color=#BBDDFF|bcolor=skyblue}}
gives...
id | info |
---|
- Dependencies
- See also
- Template:User edits on Templates Wiki, a userbox using this template.
- Template:Userbox on WoWWiki, upon which this template was based.