Template:BubbleBox: Difference between revisions
No edit summary |
(→Parameters: TemplateData extension) |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 3: | Line 3: | ||
=== Parameters === | === Parameters === | ||
{ | <templatedata> | ||
{ | |||
"params": { | |||
"content": { | |||
"description": "The content of the container, or \"open\" to leave the container as an unterminated <div> element.", | |||
"suggestedvalues": [ | |||
"open" | |||
] | |||
}, | |||
"border": { | |||
"description": "An RGB triplet to use as the border color of the container. The default color is 192, 192, 192, defined in Template:SiteColor as \"Generic\".", | |||
"default": "rgb(192, 192, 192)" | |||
}, | |||
"background": { | |||
"description": "A CSS color value to use as the background for the content portion of the container, or \"bubbles\" for the site-standard bubble background. The default color is rgba([border], 0.25).", | |||
"default": "rgba([border], 0.25)." | |||
}, | |||
"style": { | |||
"description": "A CSS property list to apply to the container." | |||
}, | |||
"collapsed": { | |||
"description": "If present, the container becomes collapsible and two nested, unterminated <div> elements. [content] parameter will appear before the collapsible region. Must be one of the following:\n\"true\" - The collapsible region is collapsed by default.\n\"false\" - The collapsible region is expanded by default.", | |||
"suggestedvalues": [ | |||
"true", | |||
"false" | |||
] | |||
}, | |||
"tags": { | |||
"description": "If present, the given tag names will be added to the element. This is useful only for back-end JavaScript purposes." | |||
} | |||
} | |||
} | |||
</templatedata> | |||
=== Example === | === Example === | ||
==== Markup ==== | ==== Markup ==== | ||
<nowiki>{{BubbleBox|background=rgba({{SiteColor| | <nowiki>{{BubbleBox|background=rgba({{SiteColor|Abyssal}}, 0.25)|border={{SiteColor|Sol}}|Sample text 1}} | ||
{{BubbleBox|Sample text 2}} | {{BubbleBox|Sample text 2}} | ||
{{BubbleBox|border={{SiteColor| | {{BubbleBox|border={{SiteColor|Metropolis}}|Sample text 3}} | ||
{{BubbleBox|open|background=stripes|border={{SiteColor| | {{BubbleBox|open|background=stripes|border={{SiteColor|Luna}}}}Sample text 4</div> | ||
{{BubbleBox|background=bubbles|collapsed=false|border=40,80,120|Static content}}Collapsible content</div></div> | {{BubbleBox|background=bubbles|collapsed=false|border=40,80,120|Static content}}Collapsible content</div></div> | ||
</nowiki> | </nowiki> | ||
==== Output ==== | ==== Output ==== | ||
{{BubbleBox|background=rgba({{SiteColor| | {{BubbleBox|background=rgba({{SiteColor|Abyssal}}, 0.25)|border={{SiteColor|Sol}}|Sample text 1}} | ||
{{BubbleBox|Sample text 2}} | {{BubbleBox|Sample text 2}} | ||
{{BubbleBox|border={{SiteColor| | {{BubbleBox|border={{SiteColor|Metropolis}}|Sample text 3}} | ||
{{BubbleBox|background=stripes|border={{SiteColor| | {{BubbleBox|open|background=stripes|border={{SiteColor|Luna}}}}Sample text 4</div> | ||
{{BubbleBox|background=bubbles|collapsed=false|border=40,80,120|Static content}}Collapsible content</div></div> | {{BubbleBox|background=bubbles|collapsed=false|border=40,80,120|Static content}}Collapsible content</div></div> | ||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude> | </noinclude> | ||
Latest revision as of 18:28, 12 April 2026
Produces a site-standard content container.
Parameters
No description.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| content | content | The content of the container, or "open" to leave the container as an unterminated <div> element.
| Unknown | optional |
| border | border | An RGB triplet to use as the border color of the container. The default color is 192, 192, 192, defined in Template:SiteColor as "Generic".
| Unknown | optional |
| background | background | A CSS color value to use as the background for the content portion of the container, or "bubbles" for the site-standard bubble background. The default color is rgba([border], 0.25).
| Unknown | optional |
| style | style | A CSS property list to apply to the container. | Unknown | optional |
| collapsed | collapsed | If present, the container becomes collapsible and two nested, unterminated <div> elements. [content] parameter will appear before the collapsible region. Must be one of the following: "true" - The collapsible region is collapsed by default. "false" - The collapsible region is expanded by default.
| Unknown | optional |
| tags | tags | If present, the given tag names will be added to the element. This is useful only for back-end JavaScript purposes. | Unknown | optional |
Example
Markup
{{BubbleBox|background=rgba({{SiteColor|Abyssal}}, 0.25)|border={{SiteColor|Sol}}|Sample text 1}}
{{BubbleBox|Sample text 2}}
{{BubbleBox|border={{SiteColor|Metropolis}}|Sample text 3}}
{{BubbleBox|open|background=stripes|border={{SiteColor|Luna}}}}Sample text 4</div>
{{BubbleBox|background=bubbles|collapsed=false|border=40,80,120|Static content}}Collapsible content</div></div>
