Template:OBX boilerplate html: Difference between revisions

From OLPC
Jump to navigation Jump to search
m (typo in image)
(tweaked some default sizes so the image was not subsampled...)
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: 45px; color: black; background: white;"}}}
{| cellspacing="0" style={{{tablestyle|"width: 238px; height: 57px; color: black; background: white;"}}}
| style={{{iconstyle|"width: 45px; background: white; text-align: center; font-size: 14pt;"}}} | {{{icon|[[Image:Xo s.png|40px]]}}}
| style={{{iconstyle|"width: 42px; background: white; text-align: center; font-size: 14pt;"}}} | {{{icon|[[Image:Xo s.png]]}}}
| 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'''}}}
|}
|}
Line 13: Line 13:
<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: 45px; color: black; background: white;"</nowiki>
| tablesytle = default: <nowiki>"width: 238px; height: 57px; color: black; background: white;"</nowiki>
| iconstyle = default: <nowiki>"width: 45px; 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.jpg|40px]]</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 '''XO'''</nowiki>
Line 28: Line 28:
|-
|-
| {{XO box
| {{XO box
| divstyle = "float:left; border:solid #C0C000 1px; margin:1px;"
| divstyle = "border:solid #C0C000 1px;"
| tablesytle = "width:238px; background:#FFFFC0;"
| tablesytle = "background:#FFFFC0;"
| iconstyle = "width:45px; height:45px; background:#FFFFC0; text-align:center; font-size:14pt;"
| iconstyle = "background:#FFFFC0;"
| icon = [[Image:Xo s.png]]
| textstyle = "font-size:8pt; padding:4pt; line-height:1.25em;"
| textstyle = "font-size:9pt;"
| 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>
{{XO box
{{XO box
| divstyle = "float:left; border:solid #C0C000 1px; margin:1px;"
| divstyle = "border:solid #C0C000 1px;"
| tablesytle = "width:238px; background:#FFFFC0;"
| tablesytle = "background:#FFFFC0;"
| iconstyle = "width:45px; height:45px; background:#FFFFC0; text-align:center; font-size:14pt;"
| iconstyle = "background:#FFFFC0;"
| icon = [[Image:Xo s.png]]
| textstyle = "font-size:8pt; padding:4pt; line-height:1.25em;"
| textstyle = "font-size:9pt;"
| 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>

Revision as of 20:15, 4 July 2007

Xo s.png Something to do with the XO

The purpose of this template is to be used by all the 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 XO boxes will just invoke this template with the appropriate parameters needed, thus allowing a simple interface to both specifying new XO boxes and using them. needs to be tested and used...

Usage

{{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 '''XO'''
 }}

Sample

Template:XO box
{{XO box 
  | 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]'''.}}
}}