Template:OBX boilerplate html

From OLPC
Revision as of 03:32, 7 July 2007 by Xavi (talk | contribs) (cosmetics)
Jump to navigation Jump to search
Xo s.png Something to do with the XO

The purpose of this template is to be used by all the real OLPC box templates as a way to factor out and reuse the most of the layout and display behavior in one single place. Other OLPC boxes will just invoke this template with the appropriate parameters needed, thus allowing a simple interface to both specifying new OLPC boxes and using them. needs to be tested and used...

Usage

NOTE: This should not be used by non-templates, particulary (and most importantly) because it doesn't categorize the including page (defeating the purpose of the OLPC box idea).

{{OBX boilerplate html
 | divstyle   = default: "float:left; border:solid silver 1px; margin:1px;"
 | tablesytle = default: "width:238px; height:57px; color:black; background:white;"
 | iconstyle  = default: "width:42px; background:white; text-align:center; font-size:14pt;"
 | icon       = default: [[Image:Xo s.png]]
 | textstyle  = default: "font-size:8pt; background:#EEEEEE; padding:4pt; line-height:1.25em;"
 | text       = default: Something to do with the '''OLPC'''
 }}

Sample

The code below would actually be specified in a specific OLPC box.

For example, assuming the existance of a {{OBX diplomacy game|France}} template that incorporates and builds the appropriate parameters (ie: OLPC France), it could have the following code:

Xo s.png This user likes playing as OLPC France in Diplomacy.

{{OBX boilerplate html
  | divstyle   = "border:solid #C0C000 1px; float:right; "
  | tablesytle = "background:#FFFFC0; width:238px; "
  | iconstyle  = "background:#FFFFC0;"
  | icon       = [[Image:Xo s.png]]
  | textstyle  = "font-size:9pt; background:#FFFFF0;"
  | text       = This user likes playing as [[OLPC {{{1}}}]] in '''[http://en.wikipedia.org/wiki/Diplomacy_(board_game) Diplomacy]'''.}}