Difference between revisions of "Template:Box"

From Trinity Desktop Project Wiki
Jump to navigation Jump to search
(Added a basic "box" template to the wiki, to be used as a base for other templates. Similarly to how they are used on Wikipedia, such templates can be used to display e.g. a warning on a page.)
 
m (Get rid of unneeded line breaks)
Line 1: Line 1:
__NOTOC__
+
__NOTOC__<noinclude>
<noinclude>
 
 
= Template:Box =
 
= 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.
Line 11: Line 10:
   
 
{{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}}
 
{{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>
</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>
 

Revision as of 18:30, 22 August 2021

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.

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

To use this template, use {{Box|caption|text|color1|color2}} on the target page (where caption is the box caption, text is the box contents, color1 is the background colour and color2 is the highlight colour.

Using this template on a page results in a box being placed. For 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}} displays the following 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.