Log in | Back to darenet.org

Template:Userbox

(New page: <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"> {| ...)
m
 
Line 3: Line 3:
| style="width:{{{logo-width|{{{id-w|45}}}}}}px; height:{{{logo-height|{{{id-h|45}}}}}}px; background:{{{logo-background|{{{1|{{{id-c|#DDD}}}}}}}}}; text-align:center; font-size:{{{logo-size|{{{5|{{{id-s|14}}}}}}}}}pt; color:{{{logo-color|{{{id-fc|black}}}}}}; padding:{{{logo-padding|{{{id-p|1pt}}}}}}; line-height:{{{logo-line-height|{{{id-lh|1.25em}}}}}}; {{{logo-other-param|{{{id-op|}}}}}}" | '''{{{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:center; font-size:{{{logo-size|{{{5|{{{id-s|14}}}}}}}}}pt; color:{{{logo-color|{{{id-fc|black}}}}}}; padding:{{{logo-padding|{{{id-p|1pt}}}}}}; line-height:{{{logo-line-height|{{{id-lh|1.25em}}}}}}; {{{logo-other-param|{{{id-op|}}}}}}" | '''{{{logo|{{{3|{{{id|id}}}}}}}}}'''
| style="font-size:{{{info-size|{{{info-s|8}}}}}}pt; padding:{{{info-padding|{{{info-p|4pt}}}}}}; line-height:{{{info-line-height|{{{info-lh|1.25em}}}}}}; color:{{{info-color|{{{info-fc|black}}}}}}; {{{info-other-param|{{{info-op|}}}}}}" | {{{info|{{{4|{{{info|''info''}}}}}}}}}
| style="font-size:{{{info-size|{{{info-s|8}}}}}}pt; padding:{{{info-padding|{{{info-p|4pt}}}}}}; line-height:{{{info-line-height|{{{info-lh|1.25em}}}}}}; color:{{{info-color|{{{info-fc|black}}}}}}; {{{info-other-param|{{{info-op|}}}}}}" | {{{info|{{{4|{{{info|''info''}}}}}}}}}
-
|}</div>
+
|}</div><noinclude><br>
<br>
<br>
<br>
<br>
-
<br>
 
-
<noinclude>
 
=== How to construct the box ===
=== How to construct the box ===
There are a number of box types to select from when deciding to make a userbox. The most commonly used design is the "'''Standard box'''". It has one square shaped area on the left ("''id''") and a rectangular area on the right ("''info''").
There are a number of box types to select from when deciding to make a userbox. The most commonly used design is the "'''Standard box'''". It has one square shaped area on the left ("''id''") and a rectangular area on the right ("''info''").

Current revision as of 18:46, 15 April 2009

id info



How to construct the box

There are a number of box types to select from when deciding to make a userbox. The most commonly used design is the "Standard box". It has one square shaped area on the left ("id") and a rectangular area on the right ("info").

For ease of use, userboxes are made using maker-templates that have a number of parameters. Once the maker-template is saved, it is automatically transformed to HTML.

Template Parameters Meaning Value type
border-c The border color of the userbox. CSS color value (#hex or color name)
border-s The border size of the userbox. Width in pixels
id-c The background color of the id box. CSS color value
id-s The font size of the id box. Size in PostScript points
id-fc The font color of the id box text. CSS color value
id-p The distance between border and content of id box. CSS padding width value. (px, pt)
id-lh The distance between text lines of id box. CSS relative line height/length value. (em)
info-c The background color of info box. CSS color value
info-s The font size of info box. Size in PostScript points
info-fc The font color of info box. CSS color value
info-p The distance between border and content of info box. CSS padding width value. px, pt
info-lh The distance between text lines of info box. CSS relative line height/length value. em
id This is the content of the id box. Free-form
info This is the content of info box. Free-form

The id and info boxes can include text, links, and images using the usual Wikipedia syntax. Generally, the id box will contain a few letters or a 43px image, while the info box will contain a sentence with a link or two.

Userbox types

Code Appearance
Standard box
{{Template:Userbox|border-c=#000 |border-s=1 |id-c=#fff |id-s=12 |id-fc=#000 |info-c=#039 |info-s=8 |info-fc=#fff |id=ID |info=Content}}

or {{Userbox |side-box colour |main box colour |side-box content |main box content}}

ID Content
Reverse box
{{Template:Userbox-r|border-c=#000 |border-s=1 |id-c=#fff |id-s=12 |id-fc=#000 |info-c=#039 |info-s=8 |info-fc=#fff |id=ID |info=Content}}

or {{Userbox-r |side-box colour |main box colour |side-box content |main box content}}

Content ID


Double box
{{Template:Userbox-2|border-c=#000 |border-s=1 |id1-c=#fff |id1-s=12 |id1-fc=#000 |id2-c=#000 |id2-s=12 |id2-fc=#fff |info-c=#039 |info-s=8 |info-fc=#fff |id1=ID 1 |id2=ID 2 |info=Content}}

or {{Userbox-2 |side-box 1 colour |main box colour |side-box 1 content |message |side-box 2 content |border colour |side-box 2 colour |main box font-colour |box border thickness}}
Note: If omitted, border colour and side-box 2 colour default to the same colour as side-box 1, and font colour is black. Default border thickness is 1.

ID 1 Content ID 2


Mini box
{{Template:Userbox-m|border-c=#000 |border-s=1 |id-c=#fff |id-s=12 |id-fc=#000 |id=ID}}

or {{Userbox-m |box colour |box content}}

ID