Difference between revisions of "Template:Userbox"

From eRepublik Official Wiki
Jump to: navigation, search
m
 
m (cat correction; documentation added)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
<div style="float: left; border:solid {{{border-color|gold}}} 1px; margin: 1px;">
+
<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-color|blue}}};"
+
{| cellspacing="0" style="width:238px; background:{{{info-background|{{{2|{{{info-c|#EEE}}}}}}}}};"
| style="width: 50px; height: 50px; background: {{{left-colour|blue}}}; text-align: center; font-size: {{{left-font-size|14pt}}}; color: {{{left-font-colour|black}}};" | {{{left-content|[[File:Star.png|45px]]}}}
+
| 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="background: {{{right-colour|white}}}; font-size: {{{right-font-size|8pt}}}; padding: {{{right-padding|4pt}}}; line-height: {{{right-lineheight|1.25em}}}; color: {{{right-font-colour|black}}};" | {{{right-content|This user is a [[eRepublik:Uber Editors|Uber Editor]].}}}
+
| 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
{{{anythingelse|}}}
+
|nocat = {{{nocat|}}}
</div><noinclude>
+
|subpage = {{#if:{{{nocatsubpages|}}}|no}}}}
 
+
|}</div><noinclude>{{Documentation}}[[Category:Templates]]</noinclude>
 
+
 
+
 
+
 
+
 
+
===Usage===
+
<pre>
+
{{Userbox
+
|background-color=
+
|left-colour=                       
+
|left-font-size=
+
|left-font-colour=               
+
|left-content=
+
|right-colour=                     
+
|right-font-size=
+
|right-padding=                   
+
|right-lineheight=
+
|right-font-colour=             
+
|right-content=
+
|anythingelse=
+
}}
+
</pre>
+

Latest revision as of 10:48, 22 April 2020

id info

[edit] [purge]

Documentation


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

Wiki bureaucrat.png This is a userbox where big box is on the right and the text is aligned to the right.
{{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. Exclamation.png
{{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'''|}}

Wiki bureaucrat.png 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
Clock and calendar.png This user has joined eRepublik Official Wiki 15 years, 4 months and 6 days ago.
Icon-Croatia.png This user lives in Croatia.
ERepublik wiki.png This user is awaiting for a
Mentor from the
Wiki Mentor Program
.
{{Userboxframe|These are userboxes in this frame}}{{Wiki user for|year=2009|month=1|day=9}}{{User country|Croatia}}{{Mentor Request}}
{{End}}

List of already existing user page templates