Difference between revisions of "Template:Box"

From Scioly.org
Jump to: navigation, search
Line 1: Line 1:
{| cellspacing="0" style="width: 238px; background: {{{info-background|#fff}}}; float: {{{float|left}}}; border: {{{border-width|1}}}px solid {{{border-color|#000}}}; margin: 1px;"
+
{| cellspacing="0" style="width: 238px; background: {{{info-background|#fff}}}; float: {{{float|left}}}; border: {{{border-width|1}}}px {{{border-style|solid}}} {{{border-color|#000}}}; margin: 1px;"
 
| style="width: 45px; height: 45px; background: {{{logo-background|#ccc}}}; text-align: center; font-size: {{{logo-size|{{{5|12}}}}}}pt; color: {{{logo-color|#000}}};" | '''{{{logo}}}'''
 
| style="width: 45px; height: 45px; background: {{{logo-background|#ccc}}}; text-align: center; font-size: {{{logo-size|{{{5|12}}}}}}pt; color: {{{logo-color|#000}}};" | '''{{{logo}}}'''
 
| style="font-size:{{{info-size|8}}}pt; padding:4pt; line-height:1.25em; color:{{{info-color|#000}}};" | {{{info-text}}}
 
| style="font-size:{{{info-size|8}}}pt; padding:4pt; line-height:1.25em; color:{{{info-color|#000}}};" | {{{info-text}}}
 
|}<noinclude>
 
|}<noinclude>
 
{{clear}}
 
{{clear}}
{{Improve documentation}}
+
{{Documentation}}
 
[[Category:Templates]]
 
[[Category:Templates]]
 
[[Category:Organization Templates]]
 
[[Category:Organization Templates]]
 
</noinclude>
 
</noinclude>

Revision as of 01:18, 21 June 2020

{{{logo}}} {{{info-text}}}


Template documentation[view] [edit] [history] [purge]

The Box template is a template used to generate a customizable userbox. All parameters are optional, except for logo and info-text.

Parameters

Info

info-text - the userbox's main text
info-background - the color of the userbox (white by default)
info-size - the size of the userbox's text in points, written in the form of an integer (8 by default)
info-color - the userbox's text color color (black by default)

Border

border-width - the width of the userbox's border in pixels, written in the form of an integer (1 by default}
border-style - sets the userbox's border style (solid by default)
border-color - sets the userbox's border color (black by default)

Logo

logo - the userbox's logo, seen to the left. May be an image or text.
logo-background - the logo's background color (gray by default)
logo-size - the logo's size in points, written in the form of an integer (12 by default. Use only for text logos - if the logo is an image, specify the size in pixels like in the examples below.)
logo-color - the logo's color (black by default)

Other

float - sets the userbox's float css property. (left by default)

Examples

For more examples of userboxes that use this template, see Category:User Templates.

Code Result
{{box
|logo=[[File:MOScioly_Logo.png|45px]]
|info-text=This user is boring.}}
MOScioly Logo.png This user is boring.
{{box
|logo=C
|logo-background=#87e35f
|info-size=12
|info-text=This user competes in Division C.}}
C This user competes in Division C.
{{box
|border-style=dashed
|border-size=2
|logo=π
|logo-size=15
|logo-background=#bd19ba
|info-background=#fffed1
|info-text=This user likes to eat pi.}}
π This user likes to eat pi.
{{box
|info-text=This user is flashy.
|info-background=#7d0000
|info-size=15
|info-color=#1cecff
|border-width=5
|border-style=groove
|border-color=#2cf239
|logo=❕
|logo-size=18
|logo-background=#fb00ff
}}
This user is flashy.