Template:Notice: Difference between revisions
mNo edit summary Tag: Reverted |
mNo edit summary Tag: Manual revert |
||
| Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
{{#if: {{{clear|}}} | <div style="clear: both;"></div> }}<!-- | {{#if: {{{clear|}}} | <div style="clear: both;"></div> }}<!-- | ||
--><div {{#if:{{{id|}}}|id="{{{id}}}"}} class="notice hide-for-print {{{class|curved}}} {{#if:{{{dismiss|}}}|{{#ifeq:{{{dismiss}}}|no||maybe-dismissible}}|maybe-dismissible | --><div {{#if:{{{id|}}}|id="{{{id}}}"}} class="notice hide-for-print {{{class|curved}}} {{#if:{{{dismiss|}}}|{{#ifeq:{{{dismiss}}}|no||maybe-dismissible}}|maybe-dismissible}}" style="width: {{#if:{{{width|}}}|{{{width}}}|65%}};<!-- | ||
-->{{#switch:{{{align|center}}}|left=margin: 0.3em 0.3em 0.3em 0;|right=margin: 0.3em 0 0.3em auto;|#default=margin: 0.3em auto;}};<!-- | -->{{#switch:{{{align|center}}}|left=margin: 0.3em 0.3em 0.3em 0;|right=margin: 0.3em 0 0.3em auto;|#default=margin: 0.3em auto;}};<!-- | ||
-->padding: 0.5em; text-align: center; font-size: {{{font-size|1em}}}; {{{style}}};<!-- | -->padding: 0.5em; text-align: center; font-size: {{{font-size|1em}}}; {{{style}}};<!-- | ||
Revision as of 19:24, 24 April 2025
Description
This template is a parent template that helps build Notice Templates. It is not intended to be used on its own, but rather to be used to help build other derivative templates.
Usage
| Text Only Explanation | |
|---|---|
| You Type | You Get |
{{notice
|text=This is a notice.
}}
|
|
| Add a Heading Explanation | |
| You Type | You Get |
{{notice
|header=This is a header.
|text=This is the regular text.
}}
|
|
| Adjust Width Explanation | |
| You Type | You Get |
{{notice
|text=This notice's width is 100%.
|width=100%
}}
|
|
| Adjust Alignment Explanation | |
| You Type | You Get |
Test |
Test |
| Adjust Color Explanation | |
| You Type | You Get |
Test |
Test |
| Add a Border Explanation (Border Help) | |
| You Type | You Get |
Test |
Test |
| Prevent Dismissal Explanation | |
| You Type | You Get |
Test |
Test |
| Clear Other Elements Explanation | |
| You Type | You Get |
Without using clear=yes.
| |
{{quote}}{{notice
|text=This notice is not using "clear=yes".
}}
|
|
Using clear=yes.
| |
{{quote}}{{notice
|text=This notice is using "clear=yes".
|clear=yes
}}
|
|
Here is one example of a potential notice box.
This code on the template page
{{notice|style=background-color:#CCA;
|header=This is the bold title of the box!
|text=This is the regular text with more detail
}}
produces this when the template is used:
Here's another example, this time without the bold line at the top.
This code on the template page
{{notice|style=background-color:#FAA;
|text=This notice doesn't have a bold title
}}
- Use
|clear=yesif the notice is interfering with other elements.
Derivative Templates
- Template:Partial (transclusion) (← links | edit)
- Template:Complete (transclusion) (← links | edit)
- Template:Notice (transclusion) (← links | edit)
- Template:Stub (transclusion) (← links | edit)
- Template:Copyright (transclusion) (← links | edit)
- Template:Delete (transclusion) (← links | edit)
- Template:Spoiler (transclusion) (← links | edit)
- Template:Claim (transclusion) (← links | edit)
- Template:Theory (transclusion) (← links | edit)
- Template:Rename (transclusion) (← links | edit)
- Template:Test/A (transclusion) (← links | edit)
- Template:Editlock (← links | edit)
- Template:Update (transclusion) (← links | edit)