Jump to content

Template:Robelbox: Difference between revisions

From IdeaWazaWiki
wikademia>Jtneill
fix revert
wikademia>Jtneill
found the dodgy line; fixed up; adding colours + examples back in
Line 1: Line 1:
<noinclude>''This is a special kind of box with a hanging icon in the right hand top corner. The size of the icon can be increased indefinitely without the height of the title bar being affected. If an empty title is specified, the title bar shrinks to a small band.''</noinclude>
<noinclude>''This is a special kind of box with a hanging icon in the right hand top corner. The size of the icon can be increased indefinitely without the height of the title bar being affected. If an empty title is specified, the title bar shrinks to a small band.''
</noinclude>
{| cellspacing="2" cellpadding="0" style="margin:0em 0em 0em 0em; width:{{{width|100%}}}; {{#ifeq:{{{height|100%}}}|none||height:{{{height|100%}}}}};"
{| cellspacing="2" cellpadding="0" style="margin:0em 0em 0em 0em; width:{{{width|100%}}}; {{#ifeq:{{{height|100%}}}|none||height:{{{height|100%}}}}};"
| colspan="1" style="width:100%; {{#ifeq:{{{height|100%}}}|none||height:100%;}} vertical-align:top; border:1px solid {{Robelbox/C2|{{{theme|1}}}}}; background-color:{{Robelbox/C1|{{{theme|1}}}}};" |
| colspan="1" style="width:100%; {{#ifeq:{{{height|100%}}}|none||height:100%;}} vertical-align:top; border:1px solid {{Robelbox/C2|{{{theme|1}}}}}; background-color:{{Robelbox/C1|{{{theme|1}}}}};" |
Line 6: Line 7:
<noinclude><div style="padding:0.75em 1.5em 0em 0.75em;">
<noinclude><div style="padding:0.75em 1.5em 0em 0.75em;">
''Parameters:''
''Parameters:''
* ''theme'': Values 1 to 14; gives colour scheme.
* ''theme'': Values 1 to 14; gives colour scheme:
:# tan (default)
:# mid green
:# slate blue
:# red
:# mauve
:# yellow
:# mid blue
:# orange
:# grey-green
:# sky blue
:# better mauve
:# light red
:# blue
:# grey
* ''title'': Box title.
* ''title'': Box title.
* ''width'': Box width; default is 100%.
* ''width'': Box width; default is 100%.
Line 15: Line 30:
</div>
</div>
|}
|}
==Simple examples==
This code:
  <nowiki>{{robelbox|title=Test title}}
  <div style="{{Robelbox/pad}}">
  Test content using a default box
  </div>
  {{Robelbox/close}}</nowiki>
produces this box:
{{robelbox|title=Test title}}
<div style="{{Robelbox/pad}}">
Test content using a default box
</div>
{{Robelbox/close}}
This code:
  <nowiki>{{robelbox|theme=2|title=Test title}}
  <div style="{{Robelbox/pad}}">
  Test content using a default box with theme=2
  </div>
  {{Robelbox/close}}</nowiki>
produces this box:
{{robelbox|theme=2|title=Test title}}
<div style="{{Robelbox/pad}}">
Test content using a default box with theme=2
</div>
{{Robelbox/close}}
[[Category:Design templates]]</noinclude>
[[Category:Design templates]]</noinclude>

Revision as of 02:57, 26 May 2008

This is a special kind of box with a hanging icon in the right hand top corner. The size of the icon can be increased indefinitely without the height of the title bar being affected. If an empty title is specified, the title bar shrinks to a small band.

Title

Parameters:

  • theme: Values 1 to 14; gives colour scheme:
  1. tan (default)
  2. mid green
  3. slate blue
  4. red
  5. mauve
  6. yellow
  7. mid blue
  8. orange
  9. grey-green
  10. sky blue
  11. better mauve
  12. light red
  13. blue
  14. grey
  • title: Box title.
  • width: Box width; default is 100%.
  • height: Guess; default is 100%.
  • icon: Image name for icon.
  • iconwidth: Pixel width of icon; default is 56. Include "px".

Don't forget to use the {{Robelbox/close}} template after your content!

Simple examples

This code:

 {{robelbox|title=Test title}}
  <div style="{{Robelbox/pad}}">
  Test content using a default box
  </div>
  {{Robelbox/close}}

produces this box:

Test title

Test content using a default box

This code:

 {{robelbox|theme=2|title=Test title}}
  <div style="{{Robelbox/pad}}">
  Test content using a default box with theme=2
  </div>
  {{Robelbox/close}}

produces this box:

Test title

Test content using a default box with theme=2