Template:UserTemplate: Difference between revisions
From The Urban Dead Wiki
Jump to navigationJump to search
BobHammero (talk | contribs) mNo edit summary |
The Rooster (talk | contribs) m (default font-size redefined to absolute CSS values to prevent font scaling when nested) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{|style="margin:{{{margintopbottom|auto}}} {{{marginleftright|0}}};border:{{{borderwidth|2px}}} {{{borderstyle|solid}}} {{{bordercolor|black}}};width:{{{width|250px}}};padding:{{{padding|0}}};background:{{{background|white}}};font-size:{{{fontsize|medium}}}" | |||
|rowspan= | |rowspan=2 style="padding:{{{imagepadding|0}}}"|[[Image:{{{image|Example.jpg}}}|{{{imagewidth|60px}}}]] | ||
|style="background:{{{headerbackground|black}}};color:{{{headercolor|white}}};font-size:{{{headerfontsize|small}}};line-height:{{{headerlineheight|1.5}}};text-align:{{{headeralign|center}}};height: {{{headerheight|auto}}};width:100%"|{{{headertext}}} | |||
|- | |- | ||
|style="font-size: {{{mainfontsize|xx-small}}}; text-align: {{{mainalign|center}}}; line-height: {{{mainlineheight| | |style="font-size:{{{mainfontsize|xx-small}}};text-align:{{{mainalign|center}}};line-height:{{{mainlineheight|2}}};background:{{{mainbackground|transparent}}};color:{{{maincolor|black}}};padding:{{{mainpadding|0}}}"|{{{maintext}}} | ||
|} | |}<noinclude> | ||
==Usage== | ==Usage== | ||
{{ | <nowiki> | ||
{{UserTemplate | |||
margintopbottom | |margintopbottom=size | ||
marginleftright | |marginleftright=size | ||
borderwidth | |borderwidth=size | ||
borderstyle | |borderstyle=style | ||
bordercolor | |bordercolor=color | ||
width | |width=size | ||
padding | |padding=size | ||
background | |background=color | ||
fontsize | |fontsize=size | ||
imagepadding | |imagepadding=size | ||
image | |image=name | ||
imagewidth | |imagewidth=size | ||
headerbackground | |headerbackground=color | ||
headercolor | |headercolor=color | ||
headerfontsize | |headerfontsize=size | ||
headerlineheight | |headerlineheight=size | ||
headeralign | |headeralign=alignment | ||
headerheight | |headerheight=size | ||
headertext | |headertext=text | ||
mainfontsize | |mainfontsize=size | ||
mainalign | |mainalign=alignment | ||
mainlineheight | |mainlineheight=size | ||
mainbackground | |mainbackground=color | ||
maincolor | |maincolor=color | ||
mainpadding | |mainpadding=size | ||
maintext | |maintext=text | ||
}} | }} | ||
</nowiki> | |||
This template is the mother of all user box templates. | This template is the mother of all user box templates. You need only define a few variables to get it to function. But you can adjust others for fine tuning of the result. | ||
You must define: | |||
*''image:'' image filename | |||
*''headertext:'' text in the header | |||
*''maintext:'' text in the main body | |||
You should probably define: | |||
*''bordercolor:'' color of the border | |||
*''headerbackground:'' color of the header | |||
*''headercolor:'' color of the header text | |||
The defaults are: | |||
*''margintopbottom:'' auto | *''margintopbottom:'' auto | ||
*''marginleftright:'' | *''marginleftright:'' 0 | ||
*''borderwidth:'' 2px | *''borderwidth:'' 2px | ||
*''borderstyle:'' solid | *''borderstyle:'' solid | ||
*''bordercolor:'' black | *''bordercolor:'' black | ||
*''width:'' 250px | *''width:'' 250px | ||
*''padding:'' | *''padding:'' 0 | ||
*''background:'' | *''background:'' white | ||
*''fontsize:'' | *''fontsize:'' medium | ||
*''imagepadding:'' | *''imagepadding:'' 0 | ||
*''imagewidth:'' 60px | *''imagewidth:'' 60px | ||
*''headerbackground:'' black | *''headerbackground:'' black | ||
*''headercolor:'' white | *''headercolor:'' white | ||
*''headerfontsize:'' | *''headerfontsize:'' small | ||
*''headerlineheight:'' | *''headerlineheight:'' 1.5 | ||
*''headeralign:'' center | *''headeralign:'' center | ||
*''headerheight:'' auto | *''headerheight:'' auto | ||
*''mainfontsize:'' xx-small | *''mainfontsize:'' xx-small | ||
*''mainalign:'' center | *''mainalign:'' center | ||
*''mainlineheight:'' | *''mainlineheight:'' 2 | ||
*''mainbackground:'' | *''mainbackground:'' transparent | ||
*''maincolor:'' | *''maincolor:'' black | ||
*''mainpadding:'' | *''mainpadding:'' 0 | ||
== | ==Example== | ||
To create | To create | ||
{{UserTemplate|headertext='''My First Template'''|maintext=This is my first template!|image=Dead.gif}} | {{UserTemplate|headertext='''My First Template'''|maintext=This is my first template!|image=Dead.gif}} | ||
just type | just type | ||
{{ | <nowiki>{{UserTemplate|headertext='''My First Template'''|maintext=This is my first template!|image=Dead.gif}}</nowiki> | ||
[[Category: | [[Category:Userboxes| {{PAGENAME}}]]</noinclude> | ||
</noinclude> |
Latest revision as of 19:56, 2 March 2010
{{{headertext}}} | |
{{{maintext}}} |
Usage
{{UserTemplate |margintopbottom=size |marginleftright=size |borderwidth=size |borderstyle=style |bordercolor=color |width=size |padding=size |background=color |fontsize=size |imagepadding=size |image=name |imagewidth=size |headerbackground=color |headercolor=color |headerfontsize=size |headerlineheight=size |headeralign=alignment |headerheight=size |headertext=text |mainfontsize=size |mainalign=alignment |mainlineheight=size |mainbackground=color |maincolor=color |mainpadding=size |maintext=text }}
This template is the mother of all user box templates. You need only define a few variables to get it to function. But you can adjust others for fine tuning of the result.
You must define:
- image: image filename
- headertext: text in the header
- maintext: text in the main body
You should probably define:
- bordercolor: color of the border
- headerbackground: color of the header
- headercolor: color of the header text
The defaults are:
- margintopbottom: auto
- marginleftright: 0
- borderwidth: 2px
- borderstyle: solid
- bordercolor: black
- width: 250px
- padding: 0
- background: white
- fontsize: medium
- imagepadding: 0
- imagewidth: 60px
- headerbackground: black
- headercolor: white
- headerfontsize: small
- headerlineheight: 1.5
- headeralign: center
- headerheight: auto
- mainfontsize: xx-small
- mainalign: center
- mainlineheight: 2
- mainbackground: transparent
- maincolor: black
- mainpadding: 0
Example
To create
My First Template | |
This is my first template! |
just type
{{UserTemplate|headertext='''My First Template'''|maintext=This is my first template!|image=Dead.gif}}