Jump to content

Template:Box: Difference between revisions

From KDE Wiki Sandbox
Claus chr (talk | contribs)
No edit summary
Claus chr (talk | contribs)
No edit summary
Line 1: Line 1:
<div class="alert {{#if: {{{4|}}} | {{{4}}} }}" width="50%">
<div class="alert {{{4}}}">
<table><tr><th></th><th> {{{2|}}}</th></tr><tr><td width="50" valign="top">{{{3}}}</td><td>{{{1}}}</td></tr></table>
<div style="float:left; valign:top">{{{3}}}</div>
<div style="width:10px; float:left">&nbsp;</div>
<table><tr><th>{{{2}}}</th></tr><tr><td>{{{1}}}</td></tr></table>
<div class="clearfix"></div>
<div class="clearfix"></div>
</div>
</div>
<noinclude>
<noinclude>
----
----
Produces a boks for emphasizing material. Takes four arguments:
Use this template for content that needs to be specially emphasized. Syntax: {{Input|1=<nowiki>{{Box1|2=Title|3=Image|4=color|1=text}}</nowiki>}}
# The text of the main body if the box
 
The template takes four arguments:
# The text of the main body of the box
# The title of the box
# The title of the box
# An image file to be displayed in the left side of the body - the image should be 40 x 40
# An image file to be displayed in the top left of the box - the image size should be 40 x 40
# The background color: possible values
# The background color (optional): possible values
#* default is yellow
#* default is yellow
#* ''alert-info'' gives blue - use with care, it doesn't work well with links
#* ''alert-info'' gives blue - use with care; it doesn't work well with links
#* ''alert-success'' gives green
#* ''alert-success'' gives green
#* ''alert-error'' gives red
#* ''alert-error'' gives red


Don't use this template directly in your pages. Instead use it to make a more specific template. For examples see [[Template:Info]] or [[Template:Warning]]
Example: {{Input|1=<nowiki>{{Box1|2=Example|3=[[Image:Dialog-information.png|left|40px|link=]]|1=This is an example box}}</nowiki>}}
{{Box1|2=Example|3=[[Image:Dialog-information.png|left|40px|link=]]|1=This is an example box}}
 
Please avoid using this template directly in pages. If you need something that doesn't already exist, consider making a new template based on this template. That way it will be much easier to maintain TechBase, and the risk of introducing unintended effects on your page is reduced considerably.
 
Existing templates based on this template: [[Template:Info]], [[Template:Note]], [[Template:Tip]], [[Template:Warning]], [[Template:Remember]].
 
[[Category:Template]]
[[Category:Template]]
</noinclude>

Revision as of 16:49, 27 August 2012

{{{3}}}
 
{{{2}}}
{{{1}}}

Use this template for content that needs to be specially emphasized. Syntax:

{{Box1|2=Title|3=Image|4=color|1=text}}

The template takes four arguments:

  1. The text of the main body of the box
  2. The title of the box
  3. An image file to be displayed in the top left of the box - the image size should be 40 x 40
  4. The background color (optional): possible values
    • default is yellow
    • alert-info gives blue - use with care; it doesn't work well with links
    • alert-success gives green
    • alert-error gives red

Example:

{{Box1|2=Example|3=[[Image:Dialog-information.png|left|40px|link=]]|1=This is an example box}}

Template:Box1

Please avoid using this template directly in pages. If you need something that doesn't already exist, consider making a new template based on this template. That way it will be much easier to maintain TechBase, and the risk of introducing unintended effects on your page is reduced considerably.

Existing templates based on this template: Template:Info, Template:Note, Template:Tip, Template:Warning, Template:Remember.