Template:Titled box: Difference between revisions

From Pikipedia, the Pikmin wiki
Jump to navigation Jump to search
(Moved CSS stuff out of here.)
m (Text replacement - "<br />" to "<br>")
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{|class="titledBox" style="{{#if:{{{bg|}}}|background: {{{bg}}};}} {{#if:{{{border|}}}|border-color: {{{border}}};}}"
{| class="titledBox" {{#if:{{{id|}}}|id="{{{id}}}"}} style="{{#if:{{{bg|}}}|background: {{{bg}}};}} {{#if:{{{border|}}}|border-color: {{{border}}};}} {{{style|}}}"
|
|
{|class="titledBoxTitle" style="{{#if:{{{tbg|}}}|background: {{{tbg}}};}} {{#if:{{{tborder|}}}|border-color: {{{tborder}}};}}"
{| class="titledBoxTitle" {{#if:{{{titleid|}}}|id="{{{titleid}}}"}} style="{{#if:{{{tbg|}}}|background: {{{tbg}}};}} {{#if:{{{tborder|}}}|border-color: {{{tborder}}};}}"
|{{{title|Title}}}{{#if:{{{editlink|}}}|<br />
|{{{title|Title}}}{{#if:{{{editlink|}}}|<br>
{{!}}style="text-align:right;" class="plainlinks"{{!}}[{{fullurl:{{{editlink}}}|action=edit}} edit]}}
{{!}}style="text-align:right;" class="plainlinks"{{!}}[{{fullurl:{{{editlink}}}|action=edit}} edit]}}
|}
|}
Line 11: Line 11:


==Use==
==Use==
This template creates a box with content and a title. Used primarily on the [[Main Page]].
This template creates a box with content and a title. It is used primarily on the [[Main Page]].


==Parameters==
==Parameters==
Line 37: Line 37:
! tborder
! tborder
| No || #a3bfb1 || Border color of the title rectangle.
| 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.
|}
|}


==Template==
==Skeleton==
<pre>
<pre>
{{titled box
{{titled box
Line 49: Line 58:
|tborder  =  
|tborder  =  
|content  =  
|content  =  
|style    =
|id      =
|titleid  =
}}
}}
</pre>
</pre>
Line 68: Line 80:
|}
|}


[[Category:Templates]]</noinclude>
[[Category:Main page templates]]</noinclude>

Latest revision as of 15:42, July 13, 2023

Title

Content.

Use

This template creates a box with content and a title. It is used primarily on the Main Page.

Parameters

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

{{titled box
|title    = 
|editlink = 
|bg       = 
|border   = 
|tbg      = 
|tborder  = 
|content  = 
|style    = 
|id       = 
|titleid  = 
}}

Examples

Code Result
{{titled box | title = Box with example
|content = This is example content.}}
Box with example

This is example content.

{{titled box | title = Colored box
|content = This is example content.
|bg = #faa | border = #866
|tbg = #e99 | tborder = #422
|editlink = Template:Titled box}}
Colored box

This is example content.