Template:Notice: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| Line 1: | Line 1: | ||
<includeonly>{{#if: {{{clear|}}} | <div style="clear: both;"></div> }}<div {{#if:{{{id|}}}|id="{{{id}}}"}} class="notice hide-for-print {{{class|curved}}} {{#if:{{{dismiss|}}}|{{#ifeq:{{{dismiss}}}|no||dismissible-notice}}|dismissible-notice}}" style="width: {{#if:{{{width|}}}{{{width}}}|{{{width}}}|50%}};{{#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}}};{{#if: {{{color|}}} | background-color: {{{color}}}; {{#if: {{{border|}}} | border: {{{border}}}; }} | border: 1px solid black; }} | <includeonly> | ||
{{#if: {{{clear|}}} | <div style="clear: both;"></div> }}<!-- | |||
--><div {{#if:{{{id|}}}|id="{{{id}}}"}} class="notice hide-for-print {{{class|curved}}} {{#if:{{{dismiss|}}}|{{#ifeq:{{{dismiss}}}|no||dismissible-notice}}|dismissible-notice}}" style="width: {{#if:{{{width|}}}{{{width}}}|{{{width}}}|50%}};<!-- | |||
-->{{#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}}};<!-- | |||
-->{{#if: {{{color|}}} | background-color: {{{color}}}; {{#if: {{{border|}}} | border: {{{border}}}; }} | border: 1px solid black; }}<!-- | |||
-->"> | |||
<div style="position: relative;"><!-- | |||
-->{{#if:{{{dismiss|}}}|{{#ifeq:{{{dismiss}}}|no||<div class="dismiss-button" style="position: absolute; top: -0.85rem; right: -0.25rem; cursor: pointer; padding: 5px; font-size: 21px;">×</div>}}| <div class="dismiss-button" style="position: absolute; top: -0.85rem; right: -0.25rem; cursor: pointer; padding: 5px; font-size: 21px;">×</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><!-- | |||
--></div> | |||
</includeonly><noinclude> | |||
The Notice template is a parent template that helps build [[:Category: Notices|Notice Templates]]. This template should never be used in its raw form on an article, but instead should be used to create new templates. | The Notice template is a parent template that helps build [[:Category: Notices|Notice Templates]]. This template should never be used in its raw form on an article, but instead should be used to create new templates. | ||
| Line 23: | Line 36: | ||
produces this when the template is used: | produces this when the template is used: | ||
{{notice|style=background-color:#CCA; | {{notice|style=background-color:#CCA; | ||
|b=This is the bold title of the box! | |b=This is the bold title of the box! | ||
|1=This is the regular text with more detail | |1=This is the regular text with more detail | ||
}} | }} | ||
Here's another example, this time without the bold line at the top. | Here's another example, this time without the bold line at the top. | ||