Template:Titled box: Difference between revisions

m
Text replacement - "<br />" to "<br>"
No edit summary
m (Text replacement - "<br />" to "<br>")
 
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{|style="width: 100%; background: #f5fffa; border: 1px solid #cef2e0; margin-top: 10px; padding: 6px;"
{| class="titledBox" {{#if:{{{id|}}}|id="{{{id}}}"}} style="{{#if:{{{bg|}}}|background: {{{bg}}};}} {{#if:{{{border|}}}|border-color: {{{border}}};}} {{{style|}}}"
|
|
{|style="width: 100%; height: 1em; background: #cef2e0; border: 1px solid #a3bfb1; padding: 0 5px;"
{| class="titledBoxTitle" {{#if:{{{titleid|}}}|id="{{{titleid}}}"}} style="{{#if:{{{tbg|}}}|background: {{{tbg}}};}} {{#if:{{{tborder|}}}|border-color: {{{tborder}}};}}"
|style="font-size: 1.2em; font-weight: bold;"|{{{1|Title}}}{{#if:{{{3|}}}|<br />
|{{{title|Title}}}{{#if:{{{editlink|}}}|<br>
{{!}}style="text-align:right;"{{!}}[{{fullurl:{{{3}}}|action=edit}} edit]}}
{{!}}style="text-align:right;" class="plainlinks"{{!}}[{{fullurl:{{{editlink}}}|action=edit}} edit]}}
|}
|}
|-
|-
|
|
{{{2|Content.}}}
{{{content|Content.}}}
|}<noinclude>
|}<noinclude>


==Use==
==Use==
<nowiki>{{Titled box|title|content|edit link}}</nowiki>
This template creates a box with content and a title. It is used primarily on the [[Main Page]].


Edit link title is optional, and is the page to link to; if not given, no edit link is shown.
==Parameters==
{| 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.
|-
! style
| No ||  || Any extra style rules.
|-
! id
| No ||  || HTML element ID for the entire box.
|-
! titleid
| No ||  || HTML element ID for the title.
|}
 
==Skeleton==
<pre>
{{titled box
|title    =
|editlink =
|bg      =
|border  =
|tbg      =
|tborder  =
|content  =
|style    =
|id      =
|titleid  =
}}
</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|{{PAGENAME}}]]</noinclude>
[[Category:Main page templates]]</noinclude>