(Created template) |
(Made "title" argument requried) |
||
Line 1: | Line 1: | ||
<div style="clear: both; margin: 2px 0 1em 0; border: 1px solid #aaa; background: {{{background|#ecfcf4}}}; padding: 10px;"> | <div style="clear: both; margin: 2px 0 1em 0; border: 1px solid #aaa; background: {{{background|#ecfcf4}}}; padding: 10px;"> | ||
<div style="padding-bottom: 3px; border-bottom: 1px solid #aaa; | <div style="padding-bottom: 3px; border-bottom: 1px solid #aaa; font-weight: bold; font-size: 125%; margin-bottom: 0.8ex;"><span style="display: inline-block; margin-right: 5px;">{{{icon|{{notice icon|❢|royalblue}}}}}</span> {{{title}}}</div> | ||
{{{content}}}</div><noinclude> | {{{content}}}</div><noinclude> |
Latest revision as of 17:50, 12 August 2016
Template documentation This template creates a notice box.
Usually you won't want to use this template directly. Instead, it is intended to be used by other templates to create customized notices. For example:
Notice boxes are much more disruptive than section notes, so you shouldn't use them as part of the regular text of a page. They are more for things you really want to jump out at the reader, like warnings. Usage{{notice box | title = <title text> | content = <content> }} <title> is the text that will be used for the title of the notice box. <content> is what will be placed in the content area of the notice box. By default the notice box is presented with a cyan background, and an exclamation mark icon to the left of the title.
The icon is generated via For example, {{❢}} Notice
This is the content.(Note that if you're doing the above, it would be simpler to just do: Optional argumentsiconYou can change the icon used in a notice box with the icon argument. Anything you use will replace the default icon. You will probably want to use For example: {{notice box | title = Looks like rain! | icon = {{notice icon|☔|blue}} | content = Hope you brought your umbrella! }} Produces: {{☔}} Looks like rain!
Hope you brought your umbrella!backgroundBy default the background of the notice box is cyan. But you can set it to any colour with background. Any colour format recognized by Cascading Style Sheets can be used. For example: {{notice box | title = Yarrr! | icon = {{notice icon|☠}} | background = #ccc | content = Well, blow me down! There be pirates here! }} Produces: {{☠}} Yarrr!
Well, blow me down! There be pirates here!NotesYou will almost never want to use this template directly in pages.
Because of the nature of wiki markup, you have to be careful about how you format your content text. Normally when you have two lines of text separated by a single newline, they get joined into a single paragraph: This is line 1. This is line 2. produces: This is line 1. This is line 2. That works in the content of a notice box... except for the last line: {{notice box | title = Title | content = This is line 1. This is line 2. This is line 3. This is line 4. This is line 5. This is line 6. }} Produces: {{❢}} Title
This is line 1. This is line 2. This is line 3. This is line 4. This is line 5. This is line 6.Notice that lines 5 and 6 are separated into two paragraphs. To prevent this, you can do: {{notice box | title = Title | content = This is line 1. This is line 2. This is line 3. This is line 4. This is line 5. This is line 6. <nowiki/>}} to get: {{❢}} Title
This is line 1. This is line 2. This is line 3. This is line 4. This is line 5. This is line 6. But as you can see, it creates extra space at the bottom. The only real solution is to simply make sure the last paragraph in your notice box content is all on a single line. It's a pain the ass, sure, but... it's all you can do. |