Difference between revisions of "Template:Userbox"
From eRepublik Official Wiki
John F Baker (Talk | contribs) m |
m (cat correction; documentation added) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | <div style="float: | + | <div style="float:{{{float|right}}}; 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: {{{background- | + | {| cellspacing="0" style="width:238px; background:{{{info-background|{{{2|{{{info-c|#EEE}}}}}}}}};" |
− | | style="width: | + | | style="width:45px; height:45px; 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=" | + | | style="font-size:{{{info-size|{{{info-s|8}}}}}}pt; text-align: {{{info-align|left}}}; 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''}}}}}}}}} |
− | | | + | {{category handler |
− | {{{ | + | |nocat = {{{nocat|}}} |
− | + | |subpage = {{#if:{{{nocatsubpages|}}}|no}}}} | |
− | + | |}</div><noinclude>{{Documentation}}[[Category:Templates]]</noinclude> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | {{ | + | |
− | | | + | |
− | | | + | |
− | | | + | |
− | | | + | |
− | | | + | |
− | | | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | }} | + | |
− | </ | + |
Latest revision as of 10:48, 22 April 2020
id | info |
Template {{Userbox}} has been created as a standardization tool to create userboxes to be used in the user pages, it will float on the right side of an article while having a smaller box on the left and bigger box on the right. If you want the other way around use Template {{Userbox-r}}.
Userboxes can be also added in a frame to hold all of them together by using template {{Userboxframe}}.
This template needs to be closed off with {{End}}
Creating userbox
To create a userbox, the following code is to be used:
{{Userbox | border-s = insert only number which px size of the border you want (insert 0 if no border is needed); default is 1 | border-c = insert a color code (e.g. #DDD; white; #FF5600) for the color of the border; default is black | id = smaller box usually reserved for an image and the image is inserted as [[File:**name of the file**|***logo-size; suggested 40x40px***|****link if any****]] | id-c = insert a color code (e.g. #DDD; white; #FF5600) for the smaller box background color | id-fc = insert a color code (e.g. #DDD; white; #FF5600) for the smaller box font color; default is black | info = the bigger box where usually text is placed | info-c = insert a color code (e.g. #DDD; white; #FF5600) for the bigger box background color | info-fc = insert a color code (e.g. #DDD; white; #FF5600) for the bigger box font color; default is black | info-align= align the bigger box; default is left }}
Usage
{{Userbox | border-s = | border-c = | id = | id-c = | id-fc = | info = | info-c = | info-fc = | info-align= }}
Samples
{{Userbox | border-s = 2 | border-c = #999 | id = [[File:Wiki bureaucrat.png|40px]] | id-c = #DDD | id-fc = white | info = This is a userbox where big box is on the right and the text is aligned to the right. | info-c = white | info-fc = #FF5600 | info-align= right }}
This is a userbox where big box is on the left and the text is aligned to the center. The image is also bigger. |
{{Userbox-r | border-s = 5 | border-c = #FF5600 | id = [[File:Exclamation.png|80px]] | id-c = #DDD | id-fc = white | info = '''This is a userbox where big box is on the left and the text is aligned to the center. The image is also bigger.''' | info-c = orange | info-fc = green | info-align= center }}
Quick userbox with fixed settings
This userbox has preset border size (1) and default font color (black).
{{Userbox|'''border color and background in the smaller box'''|'''the background color of the big box'''|'''content of the small box'''|'''content of the big box'''|}}
This is a text |
{{Userbox|#FF5733|yellow|[[File:Wiki bureaucrat.png|40px|link=]]|This is a text|}}
Multiple userboxes in the frame
Users can also put multiple userboxes in a frame by using the following code:{{Userboxframe|Name of the frame}} following the userboxes and ending with {{End}}
Please note that {{End}} template has to be in the new line.
Example:
These are userboxes in this frame
|
{{Userboxframe|These are userboxes in this frame}}{{Wiki user for|year=2009|month=1|day=9}}{{User country|Croatia}}{{Mentor Request}} {{End}}