Difference between revisions of "Template:Box"

From Trinity Desktop Project Wiki
Jump to navigation Jump to search
m (Get rid of unneeded line breaks)
(Template updates)
Line 1: Line 1:
 
__NOTOC__<noinclude>
 
__NOTOC__<noinclude>
= Template:Box =
 
 
'''Template:Box''' is a general-purpose template meant to display Wikipedia-style boxes with information such as warnings about the content of a page.
 
'''Template:Box''' is a general-purpose template meant to display Wikipedia-style boxes with information such as warnings about the content of a page.
   
 
See the [[Template:Outdated]] template for an example of its usage.
 
See the [[Template:Outdated]] template for an example of its usage.
   
To use this template, use <code><nowiki>{{Box|caption|text|color1|color2}}</nowiki></code> on the target page (where <code>caption</code> is the box caption, <code>text</code> is the box contents, <code>color1</code> is the background colour and <code>color2</code> is the highlight colour.
+
To use this template, use <code><nowiki>{{Box|caption=...|text=...|icon=...|background=...|highlight=...}}</nowiki></code> on the target page.
  +
* <code>caption</code> ''(optional)'' is the box caption;
  +
* <code>text</code> ''(required)'' is the box contents;
  +
* <code>icon</code> ''(optional)'' is the icon displayed by the text ("Messagebox_info.png" by default);
  +
* <code>background</code> ''(optional)'' is the background color (#D9D1FF by default);
  +
* <code>highlight</code> ''(optional)'' is the highlight color (#4A80FF by default).
   
  +
Using this template on a page results in a box being placed.
Using this template on a page results in a box being placed. For example, <code><nowiki>{{Box|Welcome to the Trinity Desktop Project Wiki!|The [Trinity Desktop Environment (TDE) project is a feature rich desktop environment for Unix-like operating systems with a primary goal of retaining a traditional, efficient and productive user interface.|#BFFFC2|#4DFF00}}</nowiki></code> displays the following box:
 
   
  +
==Example==
{{Box|Welcome to the Trinity Desktop Project Wiki!|The Trinity Desktop Environment (TDE) project is a feature rich desktop environment for Unix-like operating systems with a primary goal of retaining a traditional, efficient and productive user interface.|#BFFFC2|#4DFF00}}
 
  +
</noinclude><includeonly><div style='background-color: {{{3}}}; border: solid 2px {{{4}}}; border-left: solid 5px {{{4}}}; padding: 2px 5px;'><div style='font-size:1.15em; font-weight: bold;'>{{{1}}}</div>{{{2}}}</div></includeonly>
 
  +
<syntaxhighlight lang="html+handlebars">
  +
{{Box
  +
|caption=Welcome to the Trinity Desktop Project Wiki!
 
|text=The Trinity Desktop Environment (TDE) project is a feature rich desktop environment for Unix-like operating systems with a primary goal of retaining a traditional, efficient and productive user interface.
  +
|icon=CrystalSVGFolderIcon128.png
  +
|background=#BFFFC2
  +
|highlight=#4DFF00
  +
}}
  +
</syntaxhighlight>
  +
  +
{{Box
  +
|caption=Welcome to the Trinity Desktop Project Wiki!
 
|text=The Trinity Desktop Environment (TDE) project is a feature rich desktop environment for Unix-like operating systems with a primary goal of retaining a traditional, efficient and productive user interface.
  +
|icon=CrystalSVGFolderIcon128.png
  +
|background=#BFFFC2
  +
|highlight=#4DFF00
  +
}}
 
</noinclude><includeonly><div style='background-color: {{{background|#D9D1FF}}}; border: solid 2px {{{highlight|#4A80FF}}}; border-left: solid 5px {{{highlight|#4A80FF}}}; padding: 2px 5px;'>
  +
[[File:{{{icon|Messagebox_info.png}}}|left|48px]]<div style='font-size:1.15em; font-weight: bold;'>{{{caption}}}</div>{{{text}}}</div></includeonly>

Revision as of 19:03, 22 August 2021

Template:Box is a general-purpose template meant to display Wikipedia-style boxes with information such as warnings about the content of a page.

See the Template:Outdated template for an example of its usage.

To use this template, use {{Box|caption=...|text=...|icon=...|background=...|highlight=...}} on the target page.

  • caption (optional) is the box caption;
  • text (required) is the box contents;
  • icon (optional) is the icon displayed by the text ("Messagebox_info.png" by default);
  • background (optional) is the background color (#D9D1FF by default);
  • highlight (optional) is the highlight color (#4A80FF by default).

Using this template on a page results in a box being placed.

Example

{{Box
 |caption=Welcome to the Trinity Desktop Project Wiki!
 |text=The Trinity Desktop Environment (TDE) project is a feature rich desktop environment for Unix-like operating systems with a primary goal of retaining a traditional, efficient and productive user interface.
 |icon=CrystalSVGFolderIcon128.png
 |background=#BFFFC2
 |highlight=#4DFF00
}}
CrystalSVGFolderIcon128.png
Welcome to the Trinity Desktop Project Wiki!
The Trinity Desktop Environment (TDE) project is a feature rich desktop environment for Unix-like operating systems with a primary goal of retaining a traditional, efficient and productive user interface.