Difference between revisions of "Template:Box"
Jump to navigation
Jump to search
m (Added 1px black outline) |
(Updated template) |
||
Line 2: | Line 2: | ||
'''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. |
||
More specific box templates include: |
|||
See the [[Template:Outdated]] template for an example of its usage. |
|||
* [[Template:TipBox]], for displaying tips and miscellaneous information; |
|||
* [[Template:WarningBox]], for displaying warnings and important notes; |
|||
* [[Template:SafeBox]], for displaying validating information (e.g. see [[Template:Applicable to TDE]]). |
|||
== Usage == |
|||
To use this template, use <code><nowiki>{{Box|caption=...|text=...|icon=...|background=...|highlight=...}}</nowiki></code> on the target page. |
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>caption</code> ''(optional)'' is the box caption; |
||
* <code>text</code> ''(required)'' is the box contents; |
* <code>text</code> ''(required)'' is the box contents; |
||
* <code>icon</code> ''(optional)'' is the icon displayed by the text ( |
* <code>icon</code> ''(optional)'' is the icon displayed by the text (default: [[:File:Gear.png]]); |
||
* <code>background</code> ''(optional)'' is the background color ( |
* <code>background</code> ''(optional)'' is the background color (default: <tt>gainsboro</tt>); |
||
* <code>highlight</code> ''(optional)'' is the highlight color ( |
* <code>highlight</code> ''(optional)'' is the highlight color (default: <tt>gray</tt>). |
||
Using this template on a page results in a box being placed. |
Using this template on a page results in a box being placed. |
||
== |
== Examples == |
||
<syntaxhighlight lang="html+handlebars"> |
|||
{{Box |
|||
|caption=Hello, TDE Wiki! |
|||
|text=This is a box. |
|||
}} |
|||
</syntaxhighlight> |
|||
{{Box |
|||
|caption=Hello, TDE Wiki! |
|||
|text=This is a box. |
|||
}} |
|||
---- |
|||
<syntaxhighlight lang="html+handlebars"> |
<syntaxhighlight lang="html+handlebars"> |
||
Line 32: | Line 53: | ||
|highlight=#4C8ACE |
|highlight=#4C8ACE |
||
}} |
}} |
||
</noinclude><includeonly><div style='background-color: {{{background| |
</noinclude><includeonly><div style='background-color: {{{background|gainsboro}}}; outline: solid 1px black; border: solid 2px {{{highlight|gray}}}; border-left: solid 5px {{{highlight|gray}}}; padding: 2px 5px; min-height: 48px;'> |
||
[[File:{{{icon| |
[[File:{{{icon|Gear.png}}}|left|48px]]<div style='font-size:1.15em; font-weight: bold;'>{{{caption}}}</div>{{{text}}}</div><br/></includeonly> |
Revision as of 14:11, 6 January 2022
Template:Box is a general-purpose template meant to display Wikipedia-style boxes with information such as warnings about the content of a page.
More specific box templates include:
- Template:TipBox, for displaying tips and miscellaneous information;
- Template:WarningBox, for displaying warnings and important notes;
- Template:SafeBox, for displaying validating information (e.g. see Template:Applicable to TDE).
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 (default: File:Gear.png);background
(optional) is the background color (default: gainsboro);highlight
(optional) is the highlight color (default: gray).
Using this template on a page results in a box being placed.
Examples
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.