Template:Box: Difference between revisions

From Pikipedia, the Pikmin wiki
Jump to navigation Jump to search
No edit summary
(Removed unnecessary {{round}} call.)
 
(21 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{| style="background-color: #cfc; border: 2px outset #0b0; width: {{{2|auto}}}; margin: 5px auto; padding: 0 .5em; {{#if:{{{3|}}}|{{round|{{{3}}}}}}}{{{4|}}}"
{| class="pikipediaBox {{{boxclass|}}}" style="width: {{{2|auto}}}; {{#if:{{{3|}}}|border-radius: {{{3}}}px 0;}}{{{4|}}}"
|-
{{#if:{{{li|}}}| {{!}} [[File:{{{li}}}|{{{lis|48px}}}]]}}
|
|{{#if:{{{class|}}}|class="{{{class}}}"{{!}}}}
{{{1}}}
{{{1}}}
{{#if:{{{ri|}}}| {{!}} [[File:{{{ri}}}|{{{ris|{{{lis|48px}}}}}}]]}}
|}<noinclude>
|}<noinclude>
{{otheruses|the Pikipedia template for message boxes|the template indicating the [[cardboard box]] obstacle|Template:Cardboard box}}
==Info==
This is the base template for a box note. It places a box in an article in the standard Pikipedia style. Normally, other templates expand this one.
==Parameters==
{| class = "wikitable"
! Parameter || Mandatory || Default || Purpose || Detailed description
|-
! 1
| '''Yes''' ||  || Content || The box's content.
|-
! 2
| No || auto || Width || The box's width, used in the CSS.
|-
! 3
| No ||  || Roundness || The roundness of the box, in pixels (without the "px").
|-
! 4
| No ||  || Extra style || Any extra CSS rules.
|-
! li
| No ||  || Left image || Image file name to use on the left of the message, extension included.
|-
! ri
| No ||  || Right image || Image file name to use on the right of the message, extension included.
|-
! lis
| No || 48px || Left image size || Size of the image on the left.
|-
! ris
| No || ''<nowiki>lis</nowiki>'' || Right image size || Size of the image on the right.
|-
! class
| No ||  || CSS class || CSS class for the content of the box (text only).
|-
! boxclass
| No ||  || CSS class || CSS class for the box itself.
|}


==Use==
==Skeleton==
<nowiki>{{box|content|width|round|style}}</nowiki>
<pre>
{{box
|<content>
|<width>|<round>|<extra style>
|li=<left image>|ri=<right image>|lis=<left image size>|ris=<right image size>
|class=<content class>
|boxclass=<box class>
}}
</pre>


This is a box in the standard Pikipedia style. The <code>width</code> argument requires a unit (such as px, em, %); if it is left blank or not given, the box shrinks to fit its contents. If <code>round</code> is given, it is a number in pixels to give the top-left and bottom-right corners of the box as border radius. Extra CSS rules can be applied to the box with the <code>style</code> argument.
==Examples==
{| class = "wikitable"
! Code || Result
|-
| <pre>{{box|A normal box.}}</pre>
| {{box|A normal box.}}
|-
| <pre>{{box|A long box.|300px}}</pre>
| {{box|A long box.|300px}}
|-
| <pre>{{box|A rounded box.||20}}</pre>
| {{box|A rounded box.||20}}
|-
| <pre>{{box|A red text box.|||color: red;}}</pre>
| {{box|A red text box.|||color: red;}}
|-
| <pre>{{box|A warning about a Red Bulborb.
|li=Red Bulborb P3Art.png}}</pre>
| {{box|A warning about a Red Bulborb.|li=Red Bulborb P3Art.png}}
|}


[[Category:Templates|{{PAGENAME}}]]</noinclude>
[[Category:Templates]]
[[Category:Box templates| ]]</noinclude>

Latest revision as of 15:11, July 4, 2024

{{{1}}}

This article is about the Pikipedia template for message boxes. For the template indicating the cardboard box obstacle, see Template:Cardboard box.

Info

This is the base template for a box note. It places a box in an article in the standard Pikipedia style. Normally, other templates expand this one.

Parameters

Parameter Mandatory Default Purpose Detailed description
1 Yes Content The box's content.
2 No auto Width The box's width, used in the CSS.
3 No Roundness The roundness of the box, in pixels (without the "px").
4 No Extra style Any extra CSS rules.
li No Left image Image file name to use on the left of the message, extension included.
ri No Right image Image file name to use on the right of the message, extension included.
lis No 48px Left image size Size of the image on the left.
ris No lis Right image size Size of the image on the right.
class No CSS class CSS class for the content of the box (text only).
boxclass No CSS class CSS class for the box itself.

Skeleton

{{box
|<content>
|<width>|<round>|<extra style>
|li=<left image>|ri=<right image>|lis=<left image size>|ris=<right image size>
|class=<content class>
|boxclass=<box class>
}}

Examples

Code Result
{{box|A normal box.}}

A normal box.

{{box|A long box.|300px}}

A long box.

{{box|A rounded box.||20}}

A rounded box.

{{box|A red text box.|||color: red;}}

A red text box.

{{box|A warning about a Red Bulborb.
|li=Red Bulborb P3Art.png}}
Artwork of a Bulborb.

A warning about a Red Bulborb.