Template:Callout: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| Line 1: | Line 1: | ||
<templatestyles src="Template:Callout/styles.css" /> | <templatestyles src="Template:Callout/styles.css" /> | ||
<!-- | |||
<div class="callout callout-{{{type|note}}}"> | |||
<span class="callout-label"> | |||
{{#switch: {{{type|note}}} | |||
| tip = Important Tip: | |||
| warning = Warning: | |||
| protip = Pro Tip: | |||
| note = Note: | |||
| #default = Note: | |||
}} | |||
</span> | |||
{{{text|{{{1}}}}}} | |||
</div> | |||
--> | |||
<noinclude> | |||
<templatedata> | |||
{ | |||
"description": "Unified callout box with type-based styling (tip, note, warning, protip). Uses TemplateStyles.", | |||
"params": { | |||
"type": { | |||
"label": "Type", | |||
"description": "Callout type: tip, note, warning, protip", | |||
"type": "string", | |||
"required": false, | |||
"default": "note" | |||
}, | |||
"title": { | |||
"label": "Title", | |||
"description": "The content of the callout", | |||
"type": "string", | |||
"required": true | |||
}, | |||
"text": { | |||
"label": "Text", | |||
"description": "The content of the callout", | |||
"type": "string", | |||
"required": true | |||
} | |||
} | |||
} | |||
</templatedata> | |||
<big>Callout usage</big> | |||
Use this template to create a visually distinct callout box. | |||
<div class="callout callout-{{{type|note}}}"> | Valid types: <code>tip</code>, <code>note</code>, <code>warning</code>, <code>protip</code>. | ||
Copy/paste/edit parameters | |||
---- | |||
<nowiki>{{</nowiki> | |||
Callout | |||
| type = tip / note / warning / protip | |||
| title = The title of your callout goes here. | |||
| text = Your callout text goes here. | |||
<nowiki>}}</nowiki> | |||
---- | |||
The Callout will render as it appears below this line. | |||
---- | |||
</noinclude> | |||
<templatestyles src="Template:Callout/styles.css" /> | |||
<div class="callout callout-{{{type|title|note}}}"> | |||
<span class="callout-label"> | <span class="callout-label"> | ||
{{#switch: {{{type|note}}} | {{#switch: {{{type|note}}} | ||
| Line 9: | Line 80: | ||
| note = Note: | | note = Note: | ||
| #default = Note: | | #default = Note: | ||
}}< | }} <span class="callout-title">{{{title| The title of your callout goes here.}}}</span><blockquote class="callout-text">{{{text|{{{1|Your callout text goes here}}}}}}</blockquote></span> | ||
</div> | </div> | ||