Template:Capsule/doc: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{Doc/subpage}} | {{Doc/subpage}} | ||
This template is designed to add a block with rounded corners with text inside. | This template is designed to add a block with rounded corners with text inside. | ||
{ | == Parameters and Examples == | ||
{| class=standard-table | style="width:100%;" | |||
== | |- | ||
{{CodeBlock| | ! width=15% | Parameter | ||
{{Capsule|Hello, | ! Description | ||
! Example | |||
! width=30% | Preview | |||
{{CodeBlock | |- | ||
{{Capsule | | align="center" | ''No parameters'' | ||
| Reverts to default styling | |||
| {{CodeBlock|<nowiki>{{Capsule}}</nowiki>}} | |||
{{CodeBlock | | {{Capsule}} | ||
{{Capsule| | |- | ||
| align="center" | {{code|{{param|1}}}} or {{code|{{param|text}}}} | |||
| For text input | |||
{{CodeBlock | | {{CodeBlock|<nowiki>{{Capsule|Hello, world!}}</nowiki>}} {{CodeBlock|<nowiki>{{Capsule|text=Hello, world!}}</nowiki>}} | ||
{{Capsule| | | {{Capsule|Hello, world!}} | ||
|- | |||
| align="center" | {{code|{{param|align}}}} | |||
{{CodeBlock | | For specifying text alignment | ||
{{Capsule|style= | | {{CodeBlock|<nowiki>{{Capsule|Hello, world!|align=left}}</nowiki>}} {{CodeBlock|<nowiki>{{Capsule|Hello, world!|align=center}}</nowiki>}} {{CodeBlock|<nowiki>{{Capsule|Hello, world!|align=right}}</nowiki>}} | ||
| {{Capsule|Hello, world!|align=left}} {{Capsule|Hello, world!|align=center}} {{Capsule|Hello, world!|align=right}} | |||
|- | |||
{{CodeBlock | ! colspan=4 | Styling parameters | ||
| style = | |- | ||
| align="center" | {{code|{{param|bg}}}} | |||
| Background value | |||
| {{CodeBlock|<nowiki>{{Capsule|bg=#294157}}</nowiki>}} | |||
}}</nowiki>}} | | {{Capsule|bg=#294157}} | ||
{{Capsule | |- | ||
| style = 1 | | align="center" | {{code|{{param|style}}}} | ||
| | | Used to change preset styling of the capsule. | ||
| | | {{CodeBlock|<nowiki>{{Capsule|style=1}}</nowiki>}} {{CodeBlock|<nowiki>{{Capsule|style=2}}</nowiki>}} {{CodeBlock|<nowiki>{{Capsule|style=3}}</nowiki>}} | ||
| | | {{Capsule|style=1}} {{Capsule|style=2}} {{Capsule|style=3}} | ||
|} |
Revision as of 18:22, 23 July 2023

This is a documentation subpage for Template:Capsule.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
This template is designed to add a block with rounded corners with text inside.
Parameters and Examples
Parameter | Description | Example | Preview |
---|---|---|---|
No parameters | Reverts to default styling | ||
{{{1}}} or {{{text}}} | For text input | Hello, world!
| |
{{{align}}} | For specifying text alignment | Hello, world! Hello, world! Hello, world!
| |
Styling parameters | |||
{{{bg}}} | Background value | ||
{{{style}}} | Used to change preset styling of the capsule. |