User:Ring/Pagebox

From Guild Wars Wiki
Jump to navigationJump to search


This template allows easy creation of containers to wrap subpages and populate user pages with. It should be especially flexible concerning coloring, as one can specify every color explicitely or delegate to custom color templates.

Usage[edit]

{{User:Ring/Pagebox|1|2|3|4|<named parameters>...}}

Parameters[edit]

1 - heading (Default: nothing)
text to put in the upper part
2 - content (Default: nothing at all)
what to place in the main part of the box
3 - color (Default: none, i.e. default of color-t)
delegates to a color template to aquire a simple set of colors
4 - box-css
additional CSS instructions to apply to wrapping div-container
link
if specified, heading will link to specified destination
color-t (Default: User:Ring/Color)
color template to use
border-c (Default: border of color-t)
color of the border around the box and in between heading and main content
border-w (Default: 1px)
width of borders
border-s (Default: solid)
border-style, e.g. dotted or dashed
box-p (Default: 1px)
internal padding around heading and content areas
box-bg (Default: tint of color-t)
background of the box (visible in the internal padding), fallback to content-bg
heading-fc (Default: font-bg of color-t)
font color for heading
heading-bg (Default: background of color-t)
background color of the heading
heading-s (Default: 90%)
font size for the heading
heading-p (Default: 2px)
padding in the heading area
heading-align (Default: center)
horizontal alignment of the heading
heading-variant (Default: small-caps)
font variant of the heading (normal or small-caps)
heading-weight (Default: bold)
font weight of the heading, e.g. lighter, bold, bolder, 100..900, normal
heading-lh (Default: 1em)
line height of the heading
heading-css
additional CSS properties for the heading area
heading-level (Default: 2)
level of the heading to create, e.g. heading-level=3 for <h3>
content-fc (Default: font-tint of color-t)
font color for main content
content-bg (Default: tint of color-t)
background color of the main content
content-s (Default: 100%)
font-size for the main content
content-p (Default: 0.5em 1em)
padding in the content area
content-css
additional CSS properties for the content area
image
if set, the image will be used as a simulated background (not repeated)
image-s
size of the background image
image-pos (Default: bottom:0px; right:0px;)
position of the image, e.g. top:100px; left:-10px;
anchor
if specified, this will be used for the named anchor of the box instead of the heading

Colors[edit]

Following possibilities exist (for clarification):

  • specifying color, but not color-t: User:Ring/Color with parameter color will be used, including font colors
  • specifying color-t, but not color: specified template will be used, e.g. profession specific template; default font colors are {{color-t|dark}} for heading, black for content
  • specifying color and color-t: {{color-t|color|...}} will be used, including font colors
  • specifying neither: default of User:Ring/Color will be used for all colors, including font colors

If heading-fc or content-fc is one of lighter, light or dark, then {{color-t | [color] | <parameter>}} will be used. This should allow easy support for color templates that do not provide font colors yet.

Anchors[edit]

If a heading is provided, an id will be created for it (id="user_ring_<heading>"). Use "#{{anchorencode:user_ring_<heading>}}" to link to this box. (If anchor is specified, user_ring_<anchor> will be used instead.)

Examples[edit]

<div style="height:10em; position:relative; clear:both;">

{{User:Ring/Pagebox|Moep|Moep||width:240px;float:left;height:100%;|heading-variant=normal}}

{{User:Ring/Pagebox|Elementalist|test, one, two|e|width:300px;float:left;margin:20px;}}

{{User:Ring/Pagebox
|Characters|
* Number 1
* Number 2
* Number 3
* or include subpage here
|box-css=float:left; width:20em;
|link=User:Ring/Characters
|color-t=W-color
|heading-bg=dark
|heading-fc=lighter}}

{{User:Ring/Pagebox
|Moep
|zzzzzzzzzzzz
|border-c=#600
|heading-bg=#933
|heading-fc=#FEE
|content-bg=#FCC
|content-fc=#600
|content-p=4px
|box-bg=#FFF
|box-p=2px
|box-css=float:right;
}}

</div>

Moep

Moep

Elementalist

test, one, two

Characters

  • Number 1
  • Number 2
  • Number 3
  • or include subpage here

Moep

zzzzzzzzzzzz


Notes[edit]

  • Please let me know if you want to use this template or it might get mercilessly rewritten.
  • The link to the background image (and its copyright notice) will be effectively hidden under the content area!

See also[edit]

Ring Ding