Template:Callout: Difference between revisions
(added same-color borders) |
(added a little bevel) |
||
Line 48: | Line 48: | ||
"> | "> | ||
<div class="callout" style=" | <div class="callout" style=" | ||
--strip-size: 10px; | |||
width: fit-content; | width: fit-content; | ||
min-width: {{#var:callout_min_width}}; | min-width: {{#var:callout_min_width}}; | ||
Line 56: | Line 58: | ||
border: 1px solid {{#var: callout_strip_color}}; | border: 1px solid {{#var: callout_strip_color}}; | ||
border-left: 10px solid {{#var: callout_strip_color}}; | border-left: 10px solid {{#var: callout_strip_color}}; | ||
clip-path: polygon( | |||
0 0, | |||
100% 0, | |||
100% 100%, | |||
calc(var(--strip-size) / 2) 100%, | |||
0 calc(100% - var(--strip-size) / 2) | |||
); | |||
><!-- | ><!-- | ||
--><span class="callout-header" style=" | --><span class="callout-header" style=" |
Revision as of 08:24, 15 August 2024
Examples
Types
Type | Syntax | Result |
---|---|---|
Info | {{Callout |
Info An informative message. |
Warning | {{Callout |
Warning Something to be warned about. |
Danger | {{Callout |
Danger The clown is closing in. |
Tip | {{Callout |
Tip When walking over slippery surfaces, hold Shift to slow down and not slip (in most cases). |
Example | {{Callout |
Example 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 h | Header text of the callout. By default, depends on the type. | Line | suggested |
Align | align a | Alignment of the callout. When "Center" is used, the callout will span almost across the full width of a page.
| Line | suggested |