Template:Callout/doc: Difference between revisions
(→Syntax: sync) |
(stacked docs, custom wrapper class docs) |
||
Line 91: | Line 91: | ||
{{Callout|Info|header=Work in Progress|align=center|This page is unfinished.|image=Wired Frame.png|image2=Wrench.png}} | {{Callout|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. | |||
{{tji|Callout|stacked:1|Info|An informative message. An informative message. An informative message.}} | |||
{{tji|Callout|stacked:1|Info|header=Notice|Bla-bla-bla, lorem ipsum... Bla-bla-bla, lorem ipsum... Bla-bla-bla, lorem ipsum... Bla-bla-bla, lorem ipsum...}} | |||
{{gda}} | |||
{{Callout|stacked=1|Info|An informative message. An informative message. An informative message.}} | |||
{{Callout|stacked=1|Info|header=Notice|Bla-bla-bla, lorem ipsum... Bla-bla-bla, lorem ipsum... Bla-bla-bla, lorem ipsum... Bla-bla-bla, lorem ipsum...}} | |||
=== Wrapper classes === | |||
Allows to add custom classes to the wrapper element. | |||
{{tji|Callout|wrapper class:hello|Info|An informative message.}} | |||
{{gda}} | |||
{{Callout|wrapper class=hello|Info|An informative message.}} | |||
<noinclude>[[Category:Template documentation]]</noinclude> | <noinclude>[[Category:Template documentation]]</noinclude> |
Revision as of 09:34, 17 August 2024
Syntax
| 1 = [REQUIRED] Type of the callout. Select from the suggested values. Any casing is supported. TYPE: line
| 2 = [REQUIRED] Content of the callout. TYPE: string
| header = Header text of the callout. By default, depends on the type. TYPE: line
| align = Alignment of the callout. When "Center" is used, the callout will span almost across the full width of a page. TYPE: line
| image = An image to add inside the callout at the start. TYPE: wiki-file-name
| image2 = A second image to add inside the callout to the left, after the first one. TYPE: wiki-file-name
}}
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.
{{Callout
↓
Wrapper classes
Allows to add custom classes to the wrapper element.
{{Callout
↓