Template:OBX boilerplate html: Difference between revisions

From OLPC
Jump to navigation Jump to search
m (Template:XO box moved to Template:OBX boilerplate html: settling for the OBX prefix (Olpc BoXes))
m (documenting)
Line 4: Line 4:
| style={{{textstyle|"font-size: 8pt; background: #EEEEEE; padding: 4pt; line-height: 1.25em;"}}} | {{{text|Something to do with the '''XO'''}}}
| style={{{textstyle|"font-size: 8pt; background: #EEEEEE; padding: 4pt; line-height: 1.25em;"}}} | {{{text|Something to do with the '''XO'''}}}
|}
|}
</div><noinclude>[[Category:XO templates]]
</div><noinclude>[[Category:OBX templates]]
<p style="clear: both; padding-top: 2em">
<p style="clear: both; padding-top: 2em">
The purpose of this template is to be used by all the [[:Category:XO boxes|''real XO box'' templates]] as a way to factor out and reuse the most of the layout and display behavior in one single place. Other [[:Category:XO boxes|XO boxes]] will just invoke this template with the appropriate parameters needed, thus allowing a simple interface to both specifying new [[:Category:XO boxes|XO boxes]] and using them.
The purpose of this template is to be used by all the [[:Category:OBX boxes|''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 [[:Category:OBX boxes|OLPC boxes]] will just invoke this template with the appropriate parameters needed, thus allowing a simple interface to both specifying new [[:Category:OBX boxes|OLPC boxes]] and using them.


{{Pending|needs to be tested and used...}}
{{Pending|needs to be tested and used...}}


== Usage ==
== 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 [[:Category:OBX boxes|OLPC box]] idea).
<nowiki>{{</nowiki>{{PAGENAME}}
<nowiki>{{</nowiki>{{PAGENAME}}
| divstyle = default: <nowiki>"float:left; border:solid silver 1px; margin: 1px;"</nowiki>
| divstyle = default: <nowiki>"float:left; border:solid silver 1px; margin: 1px;"</nowiki>
Line 17: Line 18:
| icon = default: <nowiki>[[Image:Xo s.png]]</nowiki>
| icon = default: <nowiki>[[Image:Xo s.png]]</nowiki>
| textstyle = default: <nowiki>"font-size: 8pt; background: #EEEEEE; padding: 4pt; line-height: 1.25em;"</nowiki>
| textstyle = default: <nowiki>"font-size: 8pt; background: #EEEEEE; padding: 4pt; line-height: 1.25em;"</nowiki>
| text = default: <nowiki>Something to do with the '''XO'''</nowiki>
| text = default: <nowiki>Something to do with the '''OLPC'''</nowiki>
<!--
<!--
| xxx = default: <nowiki></nowiki>
| xxx = default: <nowiki></nowiki>
Line 25: Line 26:
== Sample ==
== Sample ==


The code below would actually be specified in a '''specific''' [[:Category:OBX boxes|OLPC box]]. For example, it could be something like <tt><nowiki>{{OBX diplomacy|France}}</nowiki></tt> that incorporates and builds the appropriate parameters (ie: [[OLPC France]]).
{|
{|
|-
|-
| {{XO box
| {{OBX boilerplate html
| divstyle = "border:solid #C0C000 1px;"
| divstyle = "border:solid #C0C000 1px;"
| tablesytle = "background:#FFFFC0;"
| tablesytle = "background:#FFFFC0;"
Line 35: Line 37:
| text = This user likes playing as [[OLPC France]] in '''[http://en.wikipedia.org/wiki/Diplomacy_(board_game) Diplomacy]'''.}}
| text = This user likes playing as [[OLPC France]] in '''[http://en.wikipedia.org/wiki/Diplomacy_(board_game) Diplomacy]'''.}}
| <pre>
| <pre>
{{OBX boilerplate html
{{XO box
| divstyle = "border:solid #C0C000 1px;"
| divstyle = "border:solid #C0C000 1px;"
| tablesytle = "background:#FFFFC0;"
| tablesytle = "background:#FFFFC0;"

Revision as of 17:00, 5 July 2007

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, it could be something like {{OBX diplomacy|France}} that incorporates and builds the appropriate parameters (ie: OLPC France).

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