Template:Titled box: Difference between revisions

New documentation style.
m (Adding custom colors; I have an idea.)
(New documentation style.)
Line 11: Line 11:


==Use==
==Use==
<nowiki>{{titled box|title=...|content=...|editlink=...|bg=...|border=...|tbg=...|tborder=...}}</nowiki>
This template creates a box with content and a title. Used primarily on the [[Main Page]].


editlink is optional, and is the page to link to; if not given, no edit link is shown.
==Parameters==
bg and border are the colors for the background and border, respectively. The same ones, but starting with t are for the title's box.
{| class = "wikitable"
! Parameter || Mandatory || Default || Detailed description
|-
! title
| No || Title || Title of the box.
|-
! content
| No || Content. || The box's content.
|-
! editlink
| No ||  || Link to the page with the content. Useful if the content in the box is just a template, so that editors can have a link to edit the template, if they need to change the box's content.
|-
! bg
| No || #f5fffa || Background color.
|-
! border
| No || #cef2e0 || Color of the outer border.
|-
! tbg
| No || #cef2e0 || Background color of the title rectangle.
|-
! tborder
| No || #a3bfb1 || Border color of the title rectangle.
|}


[[Category:Templates|{{PAGENAME}}]]</noinclude>
==Template==
<pre>
{{titled box
|title    =
|editlink =
|bg      =
|border  =
|tbg      =
|tborder  =
|content  =
}}
</pre>
 
==Examples==
{| class = "wikitable"
! Code || Result
|-
| <pre>{{titled box | title = Box with example
|content = This is example content.}}</pre>
| {{titled box | title = Box with example | content = This is example content.}}
|-
| <pre>{{titled box | title = Colored box
|content = This is example content.
|bg = #faa | border = #866
|tbg = #e99 | tborder = #422
|editlink = Template:Titled box}}</pre>
| {{titled box | title = Colored box |content = This is example content. |bg = #faa | border = #866 |tbg = #e99 | tborder = #422 |editlink = Template:Titled box}}
|}
 
[[Category:Templates]]</noinclude>