Template:PortalBox/doc

From MeritBadgeDotOrg

Jump to: navigation, search
This documentation is transcluded from Template:PortalBox/doc/doc.
This template may have a sandbox (edit) and testcases for editors to experiment.

This template is a block-level container, with the following three block-level elements:

  1. a header
  2. content
  3. an optional footer

Contents

Usage

This template is used to cascade into other templates, see Example 1 below (as {{PortalBox-blue}}), or can be used alone as in Example 2. The following parameters are available (there are currently no stylable parameters for the default footer):

Header

Border is set to 1px solid

  • border color = headerframe-color (default #ababab)
  • background color = header-bgcolor (defaults to white)
  • text color = header-textcolor (default #000)
  • header padding = headerpadding (value will be taken in em's, default is 0.25, then bottom is overridden as 0.1em)

Then margin-bottom is set to 0px and font-weight to bold.

Content

Border is set to 1px solid

  • border color = contentframe-color (default #eeeeee)
  • background color = content-bgcolor (defaults to white)
  • text color = content-textcolor (default #000)

The margin is set to 0 0 10px, and padding is set to 0.3em 0.2em 0em 0.3em, and font-size to smaller. Vertical-align is set to top.

Footer

Margin is set to 0.3em 0.2em 0em 0.3em, padding to 0.3em 0.2em 0em 0.3em, font-size to smaller, and it's all made bold.

Example 1

The following code:

{{PortalBox-blue
|headertext = The Scout Oath
|content = :Scout Oath
|footer  = [[link]]
}}

Will produce:

The Scout Oath
The Scout Oath or Promise is a pledge to help our community, our world, and ourselves.

The Scout Oath (or Promise) reads as follows:

On my honor I will do my best
To do my duty to God and my country
and to obey the Scout Law;
To help other people at all times;
To keep myself physically strong,
mentally awake, and morally straight.


Example 2

The following code:

{{PortalBox
|headertext =  Welcome to... '''WWW.MERITBADGE.ORG''' — ''"Helping Scouts Advance"''
|header-textcolor = black
|header-bgcolor = #cef2e0
|headerframe-color = #a3bfb1
|contentframe-color = 
|content-bgcolor = #f5fffa
|content-textcolor = black
|content = User:Scouterdennis/Portal/Main/Intro <!-- MUST be a PAGE for inclusion  -->
|footer  = 
}}

Will produce:

Welcome to... WWW.MERITBADGE.ORG"Helping Scouts Advance"
Welcome to the portal about Scouting!
Scouting is a worldwide youth movement composed of many organizations. Its aim is to develop young people physically, spiritually and mentally so that youth may take a constructive place in society. This is achieved through non-formal education with emphasis on practical activities in the outdoors, the so called Scout method. The Scout Movement was founded in 1907 by Robert Baden-Powell, a retired Lieutenant General in the British Army. He was also at that time a good friend of William Alexander Smith, Founder of the Boys' Brigade. Currently Scouting and Guiding have over 38 million members in 217 countries and territories represented through several different Scouting associations at the international level.

Template copy-and-paste

{{PortalBox
|headertext = 
|header-textcolor = 
|header-bgcolor = 
|headerframe-color = 
|contentframe-color = 
|content-bgcolor = 
|content-textcolor = 
|content =  
|footer  =
}}

See also

Personal tools
language