Difference between revisions of "Template:Fmbox/test1"

From blackwiki
Jump to navigation Jump to search
imported>Davidgothberg
(Adding "type=warning" to "List of all parameters".)
imported>Davidgothberg
(The 31 days CSS caching for the global "mbox-image" and "mbox-text" classes has passed, so removing the hard-coded styles.)
 
(2 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
}} {{{class|}}}" style="clear: both; margin: 0.2em 0; border: 1px solid #aaa; background: #f9f9f9; width: 100%;  
 
}} {{{class|}}}" style="clear: both; margin: 0.2em 0; border: 1px solid #aaa; background: #f9f9f9; width: 100%;  
 
{{#switch:{{{type|}}}
 
{{#switch:{{{type|}}}
| warning    = background: #FFDBDB; border: 1px solid #BB7979;
+
| warning    = background: #FFDBDB; border: 1px solid #BB7070;
 
| editnotice = background: transparent;
 
| editnotice = background: transparent;
 
| system          <!-- system = default -->
 
| system          <!-- system = default -->
Line 15: Line 15:
 
{{#ifeq:{{{image|}}}|none
 
{{#ifeq:{{{image|}}}|none
 
| <!-- No image. -->
 
| <!-- No image. -->
| <td class="mbox-image" style="border: none; padding: 2px 0 2px 0.9em; text-align: center;">
+
| <td class="mbox-image">
 
   {{#if:{{{image|}}}
 
   {{#if:{{{image|}}}
 
   | {{{image}}}
 
   | {{{image}}}
Line 26: Line 26:
 
   }}</td>
 
   }}</td>
 
}}
 
}}
<td class="mbox-text" style="border: none; padding: 0.25em 0.9em; width: 100%; {{{textstyle|}}}"> {{{text}}} </td>
+
<td class="mbox-text" style="{{{textstyle|}}}"> {{{text}}} </td>
 
{{#if:{{{imageright|}}}
 
{{#if:{{{imageright|}}}
| <td class="mbox-imageright" style="border: none; padding: 2px 0.9em 2px 0; text-align: center;"> {{{imageright}}} </td>
+
| <td class="mbox-imageright"> {{{imageright}}} </td>
 
}}
 
}}
 
</tr>
 
</tr>
</table><noinclude>
+
</table><!-- Detect and report usage with faulty "type" parameter:
 +
-->{{#switch:{{{type|}}}
 +
|  <!-- No type fed, is also valid input -->
 +
| warning
 +
| editnotice
 +
| system    =    <!-- Do nothing, valid "type" -->
 +
| #default  = [[Category:Wikipedia message box parameter needs fixing|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
 +
}}<noinclude>
  
  
Line 99: Line 106:
 
}}
 
}}
 
</pre>
 
</pre>
 +
 +
=== Testing error reporting ===
 +
 +
<!--
 +
{{fmbox/test1
 +
| type = fun
 +
| text = type=fun
 +
}}
 +
-->

Latest revision as of 03:38, 2 November 2008


David's sandbox for {{fmbox}}

Here David Göthberg is testing and showing new code versions. Please do not edit this page. If you want to experiment do so in {{fmbox/sandbox}} or create your own subpage under {{fmbox}} or in your own user space.

The box above is template code on this page, the boxes below are transclusions of this page and show how that code renders when the box is used in different ways. If you anyway have updated the code above then you have to Script error: No such module "Purge". to see the effect on the examples below.

Some text just to test bottom margin.

Special

Some other parameter combinations.

Parameters

List of all parameters:

{{fmbox/test1
| type  = system / editnotice / warning
| image = none / [[Image:Some image.svg|40px]]
| imageright = [[Image:Some image.svg|40px]]
| class = CSS class names
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
}}

Testing error reporting