Template:OBX boilerplate html: Difference between revisions

From OLPC
Jump to navigation Jump to search
(tweaked some default sizes so the image was not subsampled...)
(fix edits - for microformat)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div style={{{divstyle|"float:left; border:solid silver 1px; margin: 1px;"}}}>
<div style={{{divstyle|"float:left; border:solid silver 1px; margin: 1px;"}}}>
{| cellspacing="0" style={{{tablestyle|"width: 238px; height: 57px; color: black; background: white;"}}}
{| cellspacing="0" style={{{tablestyle|"width:238px; height:20px; color:black; background:white;"}}}
| style={{{iconstyle|"width: 42px; background: white; text-align: center; font-size: 14pt;"}}} | {{{icon|[[Image:Xo s.png]]}}}
| style={{{iconstyle|"width:42px; background:white; text-align:center; font-size:14pt;"}}} | {{{icon|[[Image:Xo s.png|10px]]}}}
| 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;"}}} class="{{{textclass}}}" | {{{text|Something to do with the '''XO'''}}}
|}
|}
</div><noinclude>[[Category:XO templates]]
</div><noinclude>{{-}}
----
<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.

{{Pending|needs to be tested and used...}}
{{Pending|needs to be tested and used...}}
The purpose of this template is to be used by all the [[:Category:OBX templates|''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 templates|OLPC boxes]] will just invoke this template with the appropriate parameters needed, thus allowing a simple interface to both specifying new [[:Category:OBX templates|OLPC boxes]] and using them.


== 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 templates|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>
| tablesytle = default: <nowiki>"width: 238px; height: 57px; color: black; background: white;"</nowiki>
| tablesytle = default: <nowiki>"width:238px; height:57px; color:black; background:white;"</nowiki>
| iconstyle = default: <nowiki>"width: 42px; background: white; text-align: center; font-size: 14pt;"</nowiki>
| iconstyle = default: <nowiki>"width:42px; background:white; text-align:center; font-size:14pt;"</nowiki>
| 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 25:
== Sample ==
== Sample ==


The code below would actually be specified in a '''specific''' [[:Category:OBX templates|OLPC box]].
{|

|-
For example, assuming the existance of a <tt><nowiki>{{OBX game diplomacy|France}}</nowiki></tt> template that incorporates and builds the appropriate parameters (ie: [[OLPC France]]), it could have the following code:
| {{XO box
{{OBX boilerplate html
| divstyle = "border:solid #C0C000 1px;"
| divstyle = "border:solid #C0C000 1px; float:right; "
| tablesytle = "background:#FFFFC0;"
| iconstyle = "background:#FFFFC0;"
| tablesytle = "background:#FFFFF0; width:238px;"
| icon = [[Image:Xo s.png]]
| iconstyle = "background:#DFDFA0;"
| textstyle = "font-size:9pt;"
| textstyle = "font-size:9pt; background:#F8F8C8;"
| 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|France]] in '''[http://en.wikipedia.org/wiki/Diplomacy_(board_game) Diplomacy]'''.}}
<span style="font-size:80%; font-family:fixed; "><pre>
| <pre>
{{OBX boilerplate html
{{XO box
| divstyle = "border:solid #C0C000 1px;"
| divstyle = "border:solid #C0C000 1px; float:right; "
| tablesytle = "background:#FFFFC0;"
| tablesytle = "background:#FFFFC0; width:238px; "
| iconstyle = "background:#FFFFC0;"
| iconstyle = "background:#DFDFA0;"
| textstyle = "font-size:9pt; background:#F8F8C8;"
| icon = [[Image:Xo s.png]]
| text = This user likes playing as [[OLPC {{{1}}}|{{{1}}}]] in '''[http://en.wikipedia.org/wiki/Diplomacy_(board_game) Diplomacy]'''.
| textstyle = "font-size:9pt;"
}}
| text = This user likes playing as [[OLPC France]] in '''[http://en.wikipedia.org/wiki/Diplomacy_(board_game) Diplomacy]'''.}}
}}</pre>
</pre></span>

|}

[[Category:OBX templates|{{PAGENAME}}]]
</noinclude>
</noinclude>

Latest revision as of 00:45, 28 July 2008

Xo s.png Something to do with the XO



needs to be tested and used... 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.

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 game diplomacy|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 France in Diplomacy.
{{OBX boilerplate html
 | divstyle   = "border:solid #C0C000 1px; float:right; "
 | tablesytle = "background:#FFFFC0; width:238px; "
 | iconstyle  = "background:#DFDFA0;"
 | textstyle  = "font-size:9pt; background:#F8F8C8;"
 | text       = This user likes playing as [[OLPC {{{1}}}|{{{1}}}]] in '''[http://en.wikipedia.org/wiki/Diplomacy_(board_game) Diplomacy]'''.
 }}