Difference between revisions of "Template:Warningbox"
From Fallen Sword Wiki
(Create basic warningbox (visual styled copied from wikipedia, but no code)) |
Ashgaerath (Talk | contribs) |
||
(14 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | <center> | + | <includeonly><center> |
− | {| width="auto" cellpadding="0" cellspacing=" | + | {| width="{{{Width|auto}}}" cellpadding="0" cellspacing="2" style="border-left:8px solid red; border-top:1px solid gray; border-right: 1px solid gray; border-bottom: 1px solid gray; background:#fff8e0;" |
− | | rowspan=2 style="width:auto; padding: 5px;" align="left" valign="middle" | | + | | rowspan=2 style="width:auto; padding: 5px;" align="left" valign="middle" | https://upload.wikimedia.org/wikipedia/en/f/f4/Ambox_content.png |
− | | align=" | + | | align="left" valign="middle" style="font-weight:bold;font-family:Verdana, sans-serif;font-size:1.1em;font-variant:small-caps; padding-right:8px;" | {{{Title|Your title here}}} |
|- | |- | ||
− | | align=" | + | | align="left" valign="middle" style="font-family:sans-serif;font-weight:normal; padding-right:8px;" | {{{Text|Your text here.}}} |
|} | |} | ||
− | </center> | + | </center></includeonly> |
− | <noinclude> | + | <noinclude>{{DontEditTemplate}} |
+ | |||
+ | This template can be used as basis for warning messages, such as "needs info", "needs map" etc. | ||
+ | ==Usage== | ||
+ | To put a warningbox on a page, just enter the following: | ||
+ | <code><pre> | ||
+ | {{Warningbox | ||
+ | |Title=Your title here | ||
+ | |Text=Your text here. | ||
+ | }}</pre> | ||
+ | </code> | ||
+ | There is also a parameter that controls the width of the box. The default is "auto" which will let the box occupy whatever space it needs. It can be set to anything that HTML table understand for the width parameter (such as "60%" for percentage, "500" for pixel width): | ||
+ | <code><pre> | ||
+ | {{Warningbox | ||
+ | |Title=Your title here | ||
+ | |Text=Your text here. | ||
+ | |Width=60% | ||
+ | }}</pre> | ||
+ | </code> | ||
+ | produces the following: | ||
+ | {{Warningbox | ||
+ | |Title=Your title here | ||
+ | |Text=Your text here. | ||
+ | |Width=60% | ||
+ | }} | ||
+ | |||
[[Category:Templates|{{PAGENAME}}]] | [[Category:Templates|{{PAGENAME}}]] | ||
</noinclude> | </noinclude> |
Latest revision as of 22:26, 9 February 2018
Editing this template may cause all pages using it to stop working. | |
This is a template that is being used by many pages on the wiki. Changes made to this page is instantly applied to all these pages, and any editing mistake can break them. Do not edit the template unless you know what you are doing. If you would like to make a customized version of this template for your own use, copy it to a new template and edit from there. |
This template can be used as basis for warning messages, such as "needs info", "needs map" etc.
Usage
To put a warningbox on a page, just enter the following:
{{Warningbox
|Title=Your title here
|Text=Your text here.
}}
There is also a parameter that controls the width of the box. The default is "auto" which will let the box occupy whatever space it needs. It can be set to anything that HTML table understand for the width parameter (such as "60%" for percentage, "500" for pixel width):
{{Warningbox
|Title=Your title here
|Text=Your text here.
|Width=60%
}}
produces the following:
Your title here | |
Your text here. |