Difference between revisions of "Template:Notice/doc"

From Project: Gorgon Wiki
Jump to: navigation, search
m (Added documentation for 'float')
m (Switching to sections to aid modifications, and fixing a small bug)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{SPW|is not on|name=Notice}}
 
{{SPW|is not on|name=Notice}}
 +
<includeonly>
 +
[[Category:Wikia Help templates]]
 +
</includeonly><noinclude>
 +
[[Category:Template documentation]]
 +
</noinclude>
 
<dl>
 
<dl>
<dt>Description:</dt>
+
==<dt>Description</dt>==
 
<dd>A simple notice box.</dd>
 
<dd>A simple notice box.</dd>
  
<dt>Dependencies:</dt>
+
==<dt>Dependencies</dt>==
 
<dd>
 
<dd>
 
*Uses [[:File:Gtk-ok.png]] as default image.
 
*Uses [[:File:Gtk-ok.png]] as default image.
Line 11: Line 16:
 
**{{t|t}} = To show clickable template mentions.
 
**{{t|t}} = To show clickable template mentions.
 
**{{t|para}} = To show parameter usage.
 
**{{t|para}} = To show parameter usage.
 +
**{{t|-}} and {{t|Lorem ipsum}} = To format the output of the samples.
 
</dd>
 
</dd>
  
<dt>Syntax:</dt>
+
==<dt>Syntax</dt>==
 
<dd>Type <code>{{t|Notice|parameters}}</code> somewhere.</dd>
 
<dd>Type <code>{{t|Notice|parameters}}</code> somewhere.</dd>
 
+
===<dt>Parameters</dt>===
<dt>Parameters:</dt>
 
 
<dd>
 
<dd>
 
*<i>Recommended</i>: {{para|type}}
 
*<i>Recommended</i>: {{para|type}}
Line 69: Line 74:
 
</dd>
 
</dd>
  
<dt>Sample output:</dt>
+
==<dt>Sample output</dt>==
<dd>
+
<dd><dl>
<code><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></code>
+
===Sample:1===
</dd>
+
<dt 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/>
 +
<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>
 
<dd>gives...</dd>
<dd>
+
<dd style="border:2px solid teal; border-radius:1em;">{{Lorem ipsum|1|&ldquo;|&rdquo;}}
{{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.}}
+
{{Notice|float=Left|type=Notice box|info={{Lorem ipsum|1|&ldquo;|&rdquo;}} }}
</dd>
+
{{Lorem ipsum|2|&ldquo;|&rdquo;}}{{-}}</dd>
<hr/>
+
===Sample:5===
<dd>
+
<dt style="font-family:monospace,Courier; font-weight:normal; border:2px solid teal; border-radius:1em;">
<code><nowiki>{{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.}}</nowiki></code>
+
<nowiki>{{Lorem ipsum|1|&amp;ldquo;|&amp;rdquo;}}</nowiki><br/>
</dd>
+
<nowiki>{{Notice|float=Right|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>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>
 
<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.}}
+
*{{t|Ambox}}
 
</dd>
 
</dd>
  
<dt>See also:</dt>
 
<dd>
 
*{{t|Ambox}}<includeonly>
 
</dd>
 
 
</dl>
 
</dl>
[[Category:Wikia Help templates]]
 
</includeonly><noinclude>
 
[[Category:Template documentation]]
 
</noinclude>
 

Latest revision as of 07:11, 29 April 2016

Description

A simple notice box.

Dependencies

  • Uses File:Gtk-ok.png as default image.
  • Uses for this documentation:
    • {{SPW}} = Wikia specific to link back to original.
    • {{t}} = To show clickable template mentions.
    • {{para}} = To show parameter usage.
    • {{-}} and {{Lorem ipsum}} = To format the output of the samples.

Syntax

Type {{Notice|parameters}} somewhere.

Parameters

  • Recommended: |type=
    Notice box header text.
    Default: |type=Header text
  • Recommended: |info=
    Notice box additional info.
    Default: |type=Explanation
  • Optional: |image=
    Notice box symbol image.
    Provide the image-filename with extension, or use |image=no to completely remove/inhibit the image part.
    Default: |image=Gtk-ok.png
  • Optional: |imageSize=
    Notice box symbol image-size.
    Provide the image-size including the unit, eg: px, part.
    Default: |imageSize=50px
  • Optional: |border=
    Notice box left-border-bar definition.
    Use |border=definition, where definition is a valid custom definition for the CSS property border-left.
    Or use |border=preset, where preset is one of the predefined names below:
    •     red ⇒ 10px solid #b22222
    •     orange ⇒ 10px solid #f28500
    •     yellow ⇒ 10px solid #f4c430
    •     purple ⇒ 10px solid #9932cc
    •     blue ⇒ 10px solid #1e90ff
    •     green ⇒ 10px solid #228b22
    •     gray ⇒ 10px solid #bba
    Default: |border=blue
    You don't need to provide the ; at the end to properly terminate the definition(s) because it will be appended automatically for proper functionality.
  • Optional: |float=side
    Float the Notice box.
    Where side can be one of: (Case insensitive)
    • l or left
    • r or right
    • n or none
    When anything else is provided it will be treated as none.
    When used it alters the default value for styleWidth of |style=(see below) as following when the effective floating is:
    • left ⇒ 25%
    • right ⇒ 25%
    • none ⇒ 50%
  • Optional: |style=inline-CSS;
    Completely override the inline-CSS used in the style-attribute of the table that generates the Notice box.
    Where inline-CSS; defaults to:
    font-size:{{{styleFontSize}}}; width:{{{styleWidth}}}; margin:{{{styleMargin}}}; border:{{{styleBorder}}}; border-collapse:{{{styleBorderCollapse}}}; background-color:{{{styleBackgroundColor}}}; border-left:{{{border}}}
    To override parts of the default shown above you can use: (defaults shown as value)
    • |styleFontSize=95%
    • |styleWidth=80% (Default value is altered when |float=(see above) is used.)
    • |styleMargin=0 auto
    • |styleBorder=1px #aaa solid
    • |styleBorderCollapse=collapse
    • |styleBackgroundColor=#eee

Sample output

Sample:1

{{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.}}
gives...

Gtk-ok.pngNotice box
Does not use the {{Ambox}} template and could be considered a simpler alternative, since it doesn't have a CSS dependency.

Sample:2

{{Notice|styleWidth=50%|type=Notice box|info={{Lorem ipsum|1|&ldquo;|&rdquo;}} }}
gives...

Gtk-ok.pngNotice box
“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”

Sample:3

{{Lorem ipsum|1|&ldquo;|&rdquo;}}
{{Notice|float=N|type=Notice box|info={{Lorem ipsum|1|&ldquo;|&rdquo;}} }}
{{Lorem ipsum|2|&ldquo;|&rdquo;}}{{-}}
gives...
“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”

Gtk-ok.pngNotice box
“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”

“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”

“Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis, molestie eu, feugiat in, orci. In hac habitasse platea dictumst.”

Sample:4

{{Lorem ipsum|1|&ldquo;|&rdquo;}}
{{Notice|float=Left|type=Notice box|info={{Lorem ipsum|1|&ldquo;|&rdquo;}} }}
{{Lorem ipsum|2|&ldquo;|&rdquo;}}{{-}}
gives...
“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”

Gtk-ok.pngNotice box
“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”

“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”

“Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis, molestie eu, feugiat in, orci. In hac habitasse platea dictumst.”

Sample:5

{{Lorem ipsum|1|&ldquo;|&rdquo;}}
{{Notice|float=Right|type=Notice box|info={{Lorem ipsum|1|&ldquo;|&rdquo;}} }}
{{Lorem ipsum|2|&ldquo;|&rdquo;}}{{-}}
gives...
“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”

Gtk-ok.pngNotice box
“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”

“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”

“Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis, molestie eu, feugiat in, orci. In hac habitasse platea dictumst.”

See also