Template:Box: Difference between revisions
From Pikmin Fanon
(There!) |
Trig Jegman (talk | contribs) m (& added parameter to remove links to files if desired) |
||
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<center> | <center> | ||
{|style="padding:2px; background-color:# | {|style="padding:2px; background-color:#ceb; {{#if:{{{round2|}}}|{{round2}}|{{#if:{{{square|}}}||{{round}}}}}} border:2px solid #cbd; width: {{{2|auto}}}; {{{3|}}}" | ||
|- | |- | ||
{{#if:{{{li|}}}| {{!}} [[File:{{{li}}}|{{{lis| | {{#if:{{{li|}}}| {{!}} <div align="left">[[File:{{{li}}}|{{{lis|50px}}}|{{#ifeq:{{{nl|}}}|true|link=| }}]]</div>}} | ||
|{{#if:{{{class|}}}|class="{{{class}}}"{{!}}}} | |{{#if:{{{class|}}}|class="{{{class}}}"{{!}}}} | ||
{{{1}}} | <center>{{{1}}}</center> | ||
{{#if:{{{ri|}}}| {{!}} [[File:{{{ri}}}|{{{ris|{{{lis| | {{#if:{{{ri|}}}| {{!}} <div align="right">[[File:{{{ri}}}|{{{ris|{{{lis|50px}}}}}}|{{#ifeq:{{{nl|}}}|true|link=| }}]]</div>}} | ||
|}</center><noinclude> | |}</center><noinclude> | ||
==Info== | ==Info== | ||
{{for|the obstacle|box}} | |||
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. | 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. | ||
Line 33: | Line 32: | ||
|- | |- | ||
! lis | ! lis | ||
| No || | | No || 50px || Left image size || Size of the image on the left. | ||
|- | |- | ||
! ris | ! ris | ||
| No || ''<nowiki>lis</nowiki>'' || Right image size || Size of the image on the right. | | No || ''<nowiki>lis</nowiki>'' || Right image size || Size of the image on the right. | ||
|- | |||
! nl | |||
| No || || Remove image links || Removes link to images. | |||
|- | |- | ||
! class | ! class | ||
Line 43: | Line 45: | ||
! boxclass | ! boxclass | ||
| No || || CSS class || CSS class for the box itself. | | No || || CSS class || CSS class for the box itself. | ||
|- | |||
! round2 | |||
| No || || Style || If the box is desired to have rounded and square corners, give this a value like "y". | |||
|- | |||
! square | |||
| No || || Style || If the box is desired to be square, give this a value like "y". | |||
|} | |} | ||
Line 53: | Line 61: | ||
|class=<content class> | |class=<content class> | ||
|boxclass=<box class> | |boxclass=<box class> | ||
|round2=<y> | |||
|square=<y> | |||
}} | }} | ||
</pre> | </pre> | ||
Line 69: | Line 79: | ||
| {{box|A red text box.||color: red;}} | | {{box|A red text box.||color: red;}} | ||
|- | |- | ||
| <pre>{{box|A warning about a [[Red Bulborb]]. | | <pre>{{box|A warning about a [[Red Bulborb]].|li=P3 Red Bulborb.png}}</pre> | ||
|li=P3 Red Bulborb.png}}</pre> | |||
| {{box|A warning about a [[Red Bulborb]].|li=P3 Red Bulborb.png}} | | {{box|A warning about a [[Red Bulborb]].|li=P3 Red Bulborb.png}} | ||
|- | |||
| <pre>{{box|A box that uses {{t|round2}}.|round2=y}}</pre> | |||
| {{box|A box that uses {{t|round2}}.|round2=y}} | |||
|- | |||
| <pre>{{box|A box that is square.|square=y}}</pre> | |||
| {{box|A box that is square.|square=y}} | |||
|} | |} | ||
[[Category:Box templates| ]]</noinclude> | [[Category:Box templates| ]]</noinclude> |
Latest revision as of 04:30, 13 September 2023
|
Info
- For the obstacle, see box.
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 | 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 | 50px | Left image size | Size of the image on the left. |
ris | No | lis | Right image size | Size of the image on the right. |
nl | No | Remove image links | Removes link to images. | |
class | No | CSS class | CSS class for the content of the box (text only). | |
boxclass | No | CSS class | CSS class for the box itself. | |
round2 | No | Style | If the box is desired to have rounded and square corners, give this a value like "y". | |
square | No | Style | If the box is desired to be square, give this a value like "y". |
Skeleton
{{box |<content> |<width>|<extra style> |li=<left image>|ri=<right image>|lis=<left image size>|ris=<right image size> |class=<content class> |boxclass=<box class> |round2=<y> |square=<y> }}
Examples
Code | Result | ||
---|---|---|---|
{{box|A normal box.}} |
| ||
{{box|A long box.|300px}} |
| ||
{{box|A box of red text.||color: red;}} |
| ||
{{box|A warning about a [[Red Bulborb]].|li=P3 Red Bulborb.png}} |
| ||
{{box|A box that uses {{t|round2}}.|round2=y}} |
| ||
{{box|A box that is square.|square=y}} |
|