Template:Box: Difference between revisions

From KDE UserBase Wiki
No edit summary
(make it match community wiki)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>
<div class="alert {{#if: {{{4| }}} | mw-message-box-{{{4}}} | mw-message-box }} mw-message-box">
 
{{#if: {{{3|}}} | {{{3}}} }}
</noinclude>
<div>
<div class="alert {{#if: {{{4|}}} | {{{4}}} | alert-success }}">
<strong>{{{2}}}</strong>
<table><tr><th></th><th> {{#if: {{{2|}}} | {{{2|}}} | ""}}</th></tr><tr><td width="50" valign="top">{{{3}}}</td><td>{{{1}}}</td></tr></table>
<div>{{{1}}}</div>
<div class="clearfix"></div>
</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 (optional)
# The background color: possible values
# The color:
## nothing gives yellow
#* the default gives gray
## ''alert-info'' gives blue - use with care, it doesn't work well with links
#* 'warning' gives yellow
## ''alert-success'' gives green
#* 'error' gives red
## ''alert-error'' gives red
 
Example:
<tt><nowiki>{{Box|1=This is an example box|2=Example|3=[[Image:Note-box-icon.png|left|40px|link=]]|4=warning}}</nowiki></tt>
{{Box|1=This is an example box|2=Example|3=[[Image:Note-box-icon.png|left|40px|link=]]|4=warning}}
 
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]].


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]]
[[Category:Template]]
[[Category:Template]]
<div class="alert {{#if: {{{4|}}} | {{{4}}} | alert-success }}">
<table><tr>
<th></th><th>{{#if: {{{2|}}} | {{{2}}} | Testing }}</th></tr>
<tr><td width="50" valign="top">{{#if: {{{3|}}} | {{{3}}}  | [[Image:Dialog-information.png|left|40px]] }}</td><td>{{{1}}}</td></tr></table>
<div class="clearfix"></div>
</div>

Latest revision as of 16:48, 10 October 2023

{{{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 (optional)
  4. The color:
    • the default gives gray
    • 'warning' gives yellow
    • 'error' gives red

Example: {{Box|1=This is an example box|2=Example|3=[[Image:Note-box-icon.png|left|40px|link=]]|4=warning}}

Example

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.