Changes

Jump to: navigation, search

Template:Notice/doc

2,730 bytes added, 08:11, 29 April 2016
m
Switching to sections to aid modifications, and fixing a small bug
{{SPW|is not on|name=Notice}}
<includeonly>
[[Category:Wikia Help templates]]
</includeonly><noinclude>
[[Category:Template documentation]]
</noinclude>
<dl>
==<dt>Description:</dt>==
<dd>A simple notice box.</dd>
==<dt>Dependencies:</dt>==
<dd>
*Uses [[:File:Gtk-ok.png]] as default image.
**{{t|t}} = To show clickable template mentions.
**{{t|para}} = To show parameter usage.
**{{t|-}} and {{t|Lorem ipsum}} = To format the output of the samples.
</dd>
==<dt>Syntax:</dt>==
<dd>Type <code>{{t|Notice|parameters}}</code> somewhere.</dd>
 ===<dt>Parameters:</dt>===
<dd>
*<i>Recommended</i>: {{para|type}}
*<i>Optional</i>: {{para|border}}
*:Notice box left-border-bar definition.
*:Use {{para|border|<var>definition</var>}}, where <code><var>definition</var></code> is a valid custom definition for the [http://www.w3schools.com/cssref/pr_border-left.asp CSS property <code>border-left</code>].*:Or use {{para|border|preset}}, where <varcode>preset</varcode> is one of the predefined names below<nowiki>:</nowiki>
*:*<span style="background-color:#b22222;">&nbsp; &nbsp;</span> red &rArr; <code>10px solid #b22222</code>
*:*<span style="background-color:#f28500;">&nbsp; &nbsp;</span> orange &rArr; <code>10px solid #f28500</code>
*:Default: {{para|border|blue}}
*:<i>You don't need to provide the <code>;</code> at the end to properly terminate the definition(s) because it will be appended automatically for proper functionality.</i>
*<i>Optional</i>: {{para|float|side}}
*:Float the Notice box.
*:Where <code>side</code> can be one of: <i>(Case insensitive)</i>
*:*<code>l</code> or <code>left</code>
*:*<code>r</code> or <code>right</code>
*:*<code>n</code> or <code>none</code>
*:When anything else is provided it will be treated as <b><code>none</code></b>.
*:<span style="color:red;"><b>When used</b> it alters the <u>default value</u> for <code>styleWidth</code></span> of {{para|style}}<sup>(see below)</sup> as following when the effective floating is:
*:*left &rArr; <code>25%</code>
*:*right &rArr; <code>25%</code>
*:*none &rArr; <code>50%</code>
*<i>Optional</i>: {{para|style|<var>inline-CSS;</var>}}
*:Completely override the inline-CSS used in the [http://www.w3schools.com/tags/att_global_style.asp style-attribute] of the table that generates the Notice box.
*:To override parts of the default shown above you can use: <i>(defaults shown as value)</i>
*:*{{para|styleFontSize|95%}}
*:*{{para|styleWidth|80%}}<i>(Default value is altered when {{para|float}}<sup>(see above)</sup> is used.)</i>
*:*{{para|styleMargin|0 auto}}
*:*{{para|styleBorder|1px #aaa solid}}
</dd>
==<dt>Sample output:</dt>==<dd><dl>===Sample:1===<codedt style="font-family:monospace,Courier; font-weight:normal; border:2px solid teal; border-radius:1em;"><nowiki>{{Notice|type=Notice box|info=Does not use the {{t|Ambox}} template and could be considered a simpler alternative, since it doesn't have a CSS dependency.}}</nowiki></dt><dd>gives...</dd><dd style="border:2px solid teal; border-radius:1em;">{{Notice|type=Notice box|info=Does not use the {{t|Ambox}} template and could be considered a simpler alternative, since it doesn't have a CSS dependency.}}</dd>===Sample:2===<dt style="font-family:monospace,Courier; font-weight:normal; border:2px solid teal; border-radius:1em;"><nowiki>{{Notice|styleWidth=50%|type=Notice box|info={{Lorem ipsum|1|&amp;ldquo;|&amp;rdquo;}} }}</nowiki></dt><dd>gives...</dd><dd style="border:2px solid teal; border-radius:1em;">{{Notice|styleWidth=50%|type=Notice box|info={{Lorem ipsum|1|&ldquo;|&rdquo;}} }}</dd>===Sample:3===<dt style="font-family:monospace,Courier; font-weight:normal; border:2px solid teal; border-radius:1em;"><nowiki>{{Lorem ipsum|1|&amp;ldquo;|&amp;rdquo;}}</nowiki><br/code><nowiki>{{Notice|float=N|type=Notice box|info={{Lorem ipsum|1|&amp;ldquo;|&amp;rdquo;}} }}</nowiki><br/><nowiki>{{Lorem ipsum|2|&amp;ldquo;|&amp;rdquo;}}{{-}}</nowiki></dt><dd>gives...</dd><dd style="border:2px solid teal; border-radius:1em;">{{Lorem ipsum|1|&ldquo;|&rdquo;}}{{Notice|float=N|type=Notice box|info={{Lorem ipsum|1|&ldquo;|&rdquo;}} }}{{Lorem ipsum|2|&ldquo;|&rdquo;}}{{-}}</dd>===Sample:4===<dt style="font-family:monospace,Courier; font-weight:normal; border:2px solid teal; border-radius:1em;"><nowiki>{{Lorem ipsum|1|&amp;ldquo;|&amp;rdquo;}}</nowiki><br/><nowiki>{{Notice|float=Left|type=Notice box|info={{Lorem ipsum|1|&amp;ldquo;|&amp;rdquo;}} }}</nowiki><br/><nowiki>{{Lorem ipsum|2|&amp;ldquo;|&amp;rdquo;}}{{-}}</nowiki></dt>
<dd>gives...</dd>
<ddstyle="border:2px solid teal; border-radius:1em;">{{Lorem ipsum|1|&ldquo;|&rdquo;}}{{Notice|float=Left|type=Notice box|info=Does not use the {{tLorem ipsum|Ambox1|&ldquo;|&rdquo;}} template and could be considered a simpler alternative, since it doesn't have a CSS dependency.}}{{Lorem ipsum|2|&ldquo;|&rdquo;}}{{-}}</dd>===Sample:5===<hr/dt style="font-family:monospace,Courier; font-weight:normal; border:2px solid teal; border-radius:1em;"><ddnowiki>{{Lorem ipsum|1|&amp;ldquo;|&amp;rdquo;}}</nowiki><codebr/><nowiki>{{Notice|styleWidthfloat=50%Right|type=Notice box|info=Does not use the {{tLorem ipsum|Ambox1|&amp;ldquo;|&amp;rdquo;}} template and could be considered a simpler alternative, since it doesn't have a CSS dependency.}}</nowiki><br/><nowiki>{{Lorem ipsum|2|&amp;ldquo;|&amp;rdquo;}}{{-}}</codenowiki></dddt>
<dd>gives...</dd>
<dd style="border:2px solid teal; border-radius:1em;">{{Lorem ipsum|1|&ldquo;|&rdquo;}}
{{Notice|float=Right|type=Notice box|info={{Lorem ipsum|1|&ldquo;|&rdquo;}} }}
{{Lorem ipsum|2|&ldquo;|&rdquo;}}{{-}}</dd>
 
</dl></dd>
 
==<dt>See also</dt>==
<dd>
{{Notice|styleWidth=50%|type=Notice box|info=Does not use the *{{t|Ambox}} template and could be considered a simpler alternative, since it doesn't have a CSS dependency.}}
</dd>
<dt>See also:</dt>
<dd>
*{{t|Ambox}}<includeonly>
</dd>
</dl>
[[Category:Wikia Help templates]]
</includeonly><noinclude>
[[Category:Template documentation]]
</noinclude>
1,071
edits

Navigation menu