Difference between revisions of "Template:Admonition"
From ThresholdRPG Wiki
Line 1: | Line 1: | ||
− | <includeonly> | + | <includeonly> |
− | + | <div style="border-radius: 4px; border-left: 4px solid {{#switch: {{{type|note}}}|note=#448aff|warning=#ff9100|tip=#00bfa5|important=#ff1744|#default=#448aff}}; background: #444444; margin: 1em 0; border-radius: 3px;"> | |
− | + | <div style="background: {{#switch: {{{type|note}}}|note=#448aff33|warning=#ff910033|tip=#00bfa533|important=#ff174433|#default=#448aff33}}; padding: 8px 12px; font-weight: bold;">{{#switch: {{{type|note}}}|note=📝|warning=⚠️|tip=💡|important=❗|#default=📝}} {{{title|{{#switch: {{{type|note}}}|note=Note|warning=Warning|tip=Tip|important=Important|#default=Note}}}}} | |
− | + | </div> | |
− | + | <div style="padding: 12px;">{{{1}}}</div> | |
− | + | </div> | |
− | |||
− | |||
− | |||
− | }}; background | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | }}; font-weight: bold;" | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | }} {{{title|{{#switch: {{{type|note}}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | }}}}} | ||
− | |||
− | |||
− | |||
</includeonly> | </includeonly> | ||
<noinclude> | <noinclude> |
Revision as of 02:53, 6 February 2025
Usage
This template creates admonition boxes (highlighted message boxes) with different styles based on type.
Syntax
{{Admonition|type=TYPE|text}}
or
{{Admonition|type=TYPE|title=CUSTOM TITLE|text}}
Available Types
- note (default) - For general information
- warning - For warning messages
- tip - For helpful tips
- important - For crucial information
- info - For additional information
- question - For questions or FAQs
- caution - For careful consideration
Examples
{{Admonition|This is a default note.}} {{Admonition|type=warning|This is a warning message.}} {{Admonition|type=tip|title=Pro Tip!|This is a custom-titled tip.}} {{Admonition|type=important|This is important information.}} {{Admonition|type=info|This is additional information.}} {{Admonition|type=question|Have you considered this?}} {{Admonition|type=caution|Proceed with caution.}}
Live Examples
📝 Note
This is a default note.
⚠️ Warning
This is a warning message.
💡 Pro Tip!
This is a custom-titled tip.