Difference between revisions of "Template:Sign/Documentation"

From GodWiki
Jump to: navigation, search
m (Undo revision 9994 by Ahappygiraffe (Talk))
(Update docs)
Line 1: Line 1:
<noinclude> [[Category:Templates/Documents|{{PAGENAME}}]]</noinclude>  
+
==Parameters==
 +
All parameters are optional.
 +
:'''{{para|title}}''': The box title (default: no title)
 +
:'''{{para|text}}''': Text inside the box (default: a mess of lorem ipsum)
 +
:'''{{para|bgcolor}}''': Background color in RGB format with no sign of # (default: fefefe)
 +
:'''{{para|bordercolor}}''': Border color of the left (for harmony with the picture and the background; default: 999)
 +
:'''{{para|outerbordercolor}}''': Color of the top, right and bottom borders (default: AAB)
 +
:'''{{para|img}}''': An image filename without the prefix "Image:" (default: Important.png)
 +
:'''{{para|imgwidth}}''': Width of image. Use with care, or preferably do not use. (default: 64)
 +
:'''{{para|cat}}''': A category without the prefix "Category:" (default: none).
 +
:: Add the page where this sign is placed to the specified category.
 +
:: ''Note:'' Use of {{para|cat}} needs to be protected (<code>&lt;includeonly&gt;</code> at least) when {{tl|Sign}} is used in other templates.
 +
:'''{{para|height}}''': the height of the template (default: auto)
 +
:'''{{para|width}}''': the width of the template (default: 100%, see also '''{{para|margins}}''')
 +
:'''{{para|interval}}''': the bottom margin in pixels (default: 1)
 +
:'''{{para|margins}}''': the left and right margins of the box (default: <code>3em</code>)
  
Parameters:
+
===Margins vs. width===
*'''title''' - the title (default: no title)
+
Making this template narrower by setting the {{para|width}} parameter is strongly discouraged, as it is not portable across different-sized devices. If you need to narrow the box, increase the value of {{para|margins}} instead.
*'''text''' - text (default: a mess of lorem ipsum)
 
*'''bgcolor''' - the background color in RGB format with no sign of # (default: fefefe)
 
*'''bordercolor''' - Border color of the left (for harmony with the picture and the background; default: 999)
 
*'''outerbordercolor''' - color of the top, right and bottom Boarders (default: AAB)
 
*'''img''' - a picture without the prefix "Image:» (default: Important.png)
 
*'''imgwidth''' - for non-standard images. It is advisable not to touch (default: 64)
 
*'''cat''' - the category without the prefix "Category:» (default: none). Do not use directly in other patterns, otherwise the template will get this same category
 
*'''height''' - the height of the template (default: auto)
 
*'''width''' - the width of the template (default: 80%)
 
*'''interval''' - the bottom margin in pixels (default: 1)
 
  
 
+
==Example of use==
== Example ==  
+
<pre>
 
+
{{Sign
<nowiki>
 
{{Sign  
 
 
| title = What a nice example!
 
| title = What a nice example!
| text = [[User:Spode|Spode]] is clearly a genius
+
| text = <nowiki>[[User:Spode|Spode]]</nowiki> is clearly a genius
 
| bgcolor = abcdef
 
| bgcolor = abcdef
 
| img = Imbox notice.png
 
| img = Imbox notice.png
 
| outerbordercolor = red
 
| outerbordercolor = red
 
| bordercolor = green
 
| bordercolor = green
| width = 50
+
| margins = 10em
}}
+
}}</pre>
</Nowiki>  
 
 
 
 
 
 
'''Results in:'''  
 
'''Results in:'''  
 
 
{{Sign  
 
{{Sign  
 
| title = What a nice example!
 
| title = What a nice example!
Line 39: Line 38:
 
| outerbordercolor = red
 
| outerbordercolor = red
 
| bordercolor = green
 
| bordercolor = green
| width = 50
+
| margins = 10em
 
}}
 
}}
 
+
<noinclude>[[Category:Templates/Documents|{{PAGENAME}}]]</noinclude>
 
 
<!-- <noinclude>[[Category:Template:Documentation]]</noinclude> -->
 

Revision as of 20:10, 3 September 2018

Parameters

All parameters are optional.

|title=: The box title (default: no title)
|text=: Text inside the box (default: a mess of lorem ipsum)
|bgcolor=: Background color in RGB format with no sign of # (default: fefefe)
|bordercolor=: Border color of the left (for harmony with the picture and the background; default: 999)
|outerbordercolor=: Color of the top, right and bottom borders (default: AAB)
|img=: An image filename without the prefix "Image:" (default: Important.png)
|imgwidth=: Width of image. Use with care, or preferably do not use. (default: 64)
|cat=: A category without the prefix "Category:" (default: none).
Add the page where this sign is placed to the specified category.
Note: Use of |cat= needs to be protected (<includeonly> at least) when {{Sign}} is used in other templates.
|height=: the height of the template (default: auto)
|width=: the width of the template (default: 100%, see also |margins=)
|interval=: the bottom margin in pixels (default: 1)
|margins=: the left and right margins of the box (default: 3em)

Margins vs. width

Making this template narrower by setting the |width= parameter is strongly discouraged, as it is not portable across different-sized devices. If you need to narrow the box, increase the value of |margins= instead.

Example of use

{{Sign
| title = What a nice example!
| text = [[User:Spode|Spode]] is clearly a genius
| bgcolor = abcdef
| img = Imbox notice.png
| outerbordercolor = red
| bordercolor = green
| margins = 10em
}}

Results in:

Imbox notice.png

What a nice example!

Spode is clearly a genius