Template:Notice: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| Line 62: | Line 62: | ||
| {{notice|text=This notice is aligned left.|align=left}}{{notice|text=This notice is aligned right.|align=right}} | | {{notice|text=This notice is aligned left.|align=left}}{{notice|text=This notice is aligned right.|align=right}} | ||
|- | |- | ||
! colspan="2" style="text-align: center;" | <span style="font-size: 115%;">Adjust Color</span><br><span style="font-weight: normal;">By default, the notice will have a light gray background with a gray border.<br>You can adjust its background color by passing <code>color=</code> with a color value in one of three forms:<br>1. A [https://htmlcolorcodes.com/color-names/ Named HTML Color] (e.g., <code>red</code>)<br>2. A [https://www.color-hex.com hex color code] (e.g., <code>#ff0000 </code>)<br>3. An RGB value (e.g., <code>rgb(255, 0, 0)</code>) | ! colspan="2" style="text-align: center;" | <span style="font-size: 115%;">Adjust Color</span><br><span style="font-weight: normal;">By default, the notice will have a light gray background with a gray border.<br>You can adjust its background color by passing <code>color=</code> with a color value in one of three forms ('''Note:''' By adding a color value, the border is removed.):<br>1. A [https://htmlcolorcodes.com/color-names/ Named HTML Color] (e.g., <code>red</code>)<br>2. A [https://www.color-hex.com hex color code] (e.g., <code>#ff0000 </code>)<br>3. An RGB value (e.g., <code>rgb(255, 0, 0)</code>)</span> | ||
|- | |- | ||
! width=30%|You Type | ! width=30%|You Type | ||
Revision as of 21:47, 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 The only required parameter for this template is text=, which will populate the template with your input.
| |
|---|---|
| You Type | You Get |
{{notice
|text=This is a notice.
}}
|
|
| Add a Heading You have the option to also add a bold header by passing header=.Note: If you wish for the main text to be bold, surround your text= input with triple apostrophes. ('''INPUT''')
| |
| You Type | You Get |
{{notice
|header=This is a header.
|text=This is the regular text.
}}
|
|
| Adjust Width By default, the width of the notice will be 65% the width of the page or container where it is used. You can adjust this value by passing width= and defining the width as either a percentage (e.g., 80%) or a pixel width (e.g., 300px).
| |
| You Type | You Get |
{{notice
|text=This notice's width is 100%.
|width=100%
}}
|
|
| Adjust Alignment By default, the notice will be centered on the page or in the container where it is used. You can adjust its alignment by passing align= with either the value LEFT or RIGHT.
| |
| You Type | You Get |
{{notice
|text=This notice is aligned left.
|align=LEFT/RIGHT
}}
|
|
| Adjust Color By default, the notice will have a light gray background with a gray border. You can adjust its background color by passing color= with a color value in one of three forms (Note: By adding a color value, the border is removed.):1. A Named HTML Color (e.g., red)2. A hex color code (e.g., #ff0000 )3. An RGB value (e.g., rgb(255, 0, 0))
| |
| You Type | You Get |
{{notice
|text=This notice is light green.
|color=#bdcca1
}}
|
|
| Add a Border Explanation (Border Help) | |
| You Type | You Get |
{{notice
|text=This notice has a blue border.
|border=1px solid blue
}}
|
|
| Prevent Dismissal Explanation | |
| You Type | You Get |
{{notice
|text=This notice is not dismissible.
|dismiss=no
}}
|
|
| 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
}}
|
|
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)