Template:Callout: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly><div class="callout"><!-- | <includeonly><!-- | ||
-->{{#switch: {{lc: {{{1}}}}} | |||
|info= | |||
{{#vardefine: callout_header|Info}} | |||
{{#vardefine: callout_strip_color|var(--action-color)}} | |||
|{{error|unknown type{{colon}} {{{1}}}}} | |||
}}<!-- | |||
--><div class="callout-wrapper"> | |||
<div class="callout" style=" | |||
padding: .5rem; | |||
border-left: 10px solid #b32424; | |||
background: var(--bg-color-light-x2); | |||
border-top: 1px solid var(--bg-color-light-x4); | |||
border-bottom: 1px solid var(--bg-color-light-x4); | |||
border-right: 1px solid var(--bg-color-light-x4); | |||
color: var(--text-color); | |||
><!-- | |||
--><span class="callout-header" style=" | |||
font-weight: bold; | |||
font-size: large; | |||
">{{#var:callout_header}}</span><!-- | |||
--><div class="callout-content">{{{2}}}</div><!-- | |||
--></div><!-- | |||
--></div></includeonly><noinclude> | --></div></includeonly><noinclude> | ||
{{docs}} | {{docs}} | ||
{{callout|info|hello world}} | |||
<templatedata> | <templatedata> |
Revision as of 12:41, 14 August 2024
Examples
Types
Type | Syntax | Result |
---|---|---|
Info | {{Callout |
Info An informative message. |
Warning | {{Callout |
unknown type: Warning Info Something to be warned about. |
Danger | {{Callout |
unknown type: Danger Info The clown is closing in. |
Tip | {{Callout |
unknown type: Tip Info When walking over slippery surfaces, hold Shift to slow down and not slip (in most cases). |
Example | {{Callout |
unknown type: Example Info An example for something. |
Header label
{{Callout
or
{{Callout
↓
or
Alignment
Left
The default.
Center
{{Callout
or
{{Callout
↓
or
Right
{{Callout
↓
Images
| Info
| header = Work in Progress
| align = center
| This page is unfinished.
| image = Wired Frame.png
| image2 = Wrench.png
}}
↓
Stacked callouts
Sets the callout to a predefined width, making all callouts with the same class appear with the same width.
Callouts will be stacked to the right and will require {{clear}} after to not overflow with the content that goes after.
{{Callout
{{Callout
{{Clear}}
↓
Wrapper classes
Allows to add custom classes to the wrapper element.
{{Callout
↓
A template for producing various notices.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Type | 1 | Type of the callout. Select from the suggested values. Any casing is supported.
| Line | required |
Content | 2 | Content of the callout. | String | required |
Header label | header | Header text of the callout. By default, depends on the type. | Line | suggested |
Align | align | Alignment of the callout.
| Line | suggested |