Difference between revisions of "Template:Textbox"

From Custom Mario Kart
Jump to navigation Jump to search
Line 3: Line 3:
 
<div class="textbox-body">{{{3}}}</div></div></includeonly><noinclude>
 
<div class="textbox-body">{{{3}}}</div></div></includeonly><noinclude>
 
== Usage ==
 
== Usage ==
usage: '''<nowiki>{{textbox|class|head|body}}</nowiki>'''
+
This whole template is css supported!
 +
usage: '''<nowiki>{{textbox|attributes|head|body}}</nowiki>'''
 +
or with tables: '''class="textbox class"'''
 
<ul>
 
<ul>
 
<li>
 
<li>
'''class''': Empty or '''one''' of the following keywords:
+
'''attributes''': Empty or '''one''' of the following keywords:
 
* 'red', 'green', 'cyan': setup color.
 
* 'red', 'green', 'cyan': setup color.
* 'news': special style for news on main page
+
** '''Guide:''' Use 'green' for summaries, 'red' for warnings, alerts and attentions and blue (not set) fpr standard text boxes.
 +
* 'news': special style for news on main page.
 
The default color is blue.
 
The default color is blue.
 
Add the any number of the following keywords to modify the layout:
 
Add the any number of the following keywords to modify the layout:
 
* 'center': center the body text
 
* 'center': center the body text
 +
* 'float-left': create a left floated table.
 +
* 'float-right': create a right floated table.
 +
' 'grid': enable a colored grid between cells in tables.
 
</li>
 
</li>
 
<li>'''head ''': Empty ot text for head line.</li>
 
<li>'''head ''': Empty ot text for head line.</li>
Line 17: Line 23:
 
</ul>
 
</ul>
  
== Examples ==
+
Edit this tempalte to explore the simple usage of this template and the same named css style.
 +
 
 +
== Textbox Examples ==
 +
 
 
{{textbox||Blue Title|This is an text box. The standard color is blue}}
 
{{textbox||Blue Title|This is an text box. The standard color is blue}}
  
Line 28: Line 37:
 
{{textbox|center||This is centered text in a box without header.}}
 
{{textbox|center||This is centered text in a box without header.}}
  
{{textbox|news|News|A news box.}}
+
{{textbox|news|News|A news box. At this moment a news box looks like a cyan box, but this may change.}}
 +
 
 +
The rounded corners and the shadows are part of HTML5 and modeled in CSS. Modern browsers like Firefox, Opera, Chrome and others support that, but not the Internet Explorer.
 +
 
 +
== Table Examples ==
 +
 
 +
{| class="textbox float-right grid red"
 +
|+ Caption
 +
|-
 +
! Attributes:
 +
| float-right grid red
 +
|-
 +
! Info:
 +
| Floated tables have always a limited width.
 +
|}
 +
 
 +
{| class="textbox"
 +
|+ Caption
 +
|-
 +
! Attributes:
 +
| (none)
 +
|-
 +
! Info 1:
 +
| Non floated tables uses as default the whole parent width.
 +
|-
 +
! Info 2:
 +
| This table is set without 'grid'.
 +
|}
 +
 
 +
{| class="textbox grid"
 +
|+ Caption
 +
|-
 +
! Attributes:
 +
| grid
 +
|-
 +
! Info 1:
 +
| Non floated tables uses as default the whole parent width.
 +
|-
 +
! Info 2:
 +
| This is the same table like above, but with 'grid'.
 +
|}
  
 
</noinclude>
 
</noinclude>

Revision as of 09:25, 19 March 2011

Usage

This whole template is css supported!

usage: {{textbox|attributes|head|body}}
or with tables: class="textbox class"
  • attributes: Empty or one of the following keywords:
    • 'red', 'green', 'cyan': setup color.
      • Guide: Use 'green' for summaries, 'red' for warnings, alerts and attentions and blue (not set) fpr standard text boxes.
    • 'news': special style for news on main page.
    The default color is blue. Add the any number of the following keywords to modify the layout:
    • 'center': center the body text
    • 'float-left': create a left floated table.
    • 'float-right': create a right floated table.
    ' 'grid': enable a colored grid between cells in tables.
  • head : Empty ot text for head line.
  • body: Any text for inside of the box.

Edit this tempalte to explore the simple usage of this template and the same named css style.

Textbox Examples

Blue Title
This is an text box. The standard color is blue
Red Title
Red colored boxes are also possible. The text is centered.
Green Title
Green colored boxes are also possible.
Cyan Title
Cyan colored boxes are also possible.
This is centered text in a box without header.
News
A news box. At this moment a news box looks like a cyan box, but this may change.

The rounded corners and the shadows are part of HTML5 and modeled in CSS. Modern browsers like Firefox, Opera, Chrome and others support that, but not the Internet Explorer.

Table Examples

Caption
Attributes: float-right grid red
Info: Floated tables have always a limited width.
Caption
Attributes: (none)
Info 1: Non floated tables uses as default the whole parent width.
Info 2: This table is set without 'grid'.
Caption
Attributes: grid
Info 1: Non floated tables uses as default the whole parent width.
Info 2: This is the same table like above, but with 'grid'.