Template:Test: Difference between revisions
mNo edit summary Tag: Reverted |
mNo edit summary Tag: Manual revert |
||
| Line 7: | Line 7: | ||
-->"> | -->"> | ||
<div style="position: relative;"><!-- | <div style="position: relative;"><!-- | ||
-->{{#if:{{{dismiss|}}}|{{#ifeq:{{{dismiss}}}|no||<div class="dismiss-button" style="position: absolute; top: -12px; right: -3px; cursor: pointer; padding: 5px | -->{{#if:{{{dismiss|}}}|{{#ifeq:{{{dismiss}}}|no||<div class="dismiss-button" style="position: absolute; top: -12px; right: -3px; cursor: pointer; padding: 5px;">×</div>}}| <div class="dismiss-button" style="position: absolute; top: -12px; right: -3px; cursor: pointer; padding: 5px;">×</div>}}<!-- | ||
-->{{#if:{{{b|}}}|<div class="notice-main-text" style="font-weight:bold;">{{{b}}}</div>}}<!-- | -->{{#if:{{{b|}}}|<div class="notice-main-text" style="font-weight:bold;">{{{b}}}</div>}}<!-- | ||
--><div class="{{#if:{{{b|}}}|hide-for-multinotice|notice-main-text}}" style="white-space: normal;">{{{1}}}</div><!-- | --><div class="{{#if:{{{b|}}}|hide-for-multinotice|notice-main-text}}" style="white-space: normal;">{{{1}}}</div><!-- | ||
Revision as of 19:41, 26 March 2025
This page is for testing out new templates or for making alterations to live templates without damaging them.
This is a bit of text.
This is a bit of text
The Notice template is a parent template that helps build Notice Templates. This template should never be used in its raw form on an article, but instead should be used to create new templates.
Parameters
{{{style}}} - allows the user to set various style elements of the notice box, like background color
{{{b}}} - optional parameter that creates a bolded title for the notice box
{{{1}}} - the regular text in the notice box
Examples
Here is one example of a potential notice box.
This code on the template page
{{notice|style=background-color:#CCA;
|b=This is the bold title of the box!
|1=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;
|1=This notice doesn't have a bold title
}}
- Use
|clear=yesif the notice is interfering with other elements.
