Difference between revisions of "Template:Imbox/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>Davidgothberg
(Updating to use "mbox-*" class names instead of "imbox-*". See Template talk:Mbox#Simpler to use class names.)
imported>WOSlinker
(sync)
Line 14: Line 14:
 
<tr>
 
<tr>
 
{{#ifeq:{{{image|}}}|none
 
{{#ifeq:{{{image|}}}|none
| <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. --><td style="border: none; padding: 1px;"></td>
+
| <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. --><td class="mbox-empty-cell"></td>
 
| <td class="mbox-image">
 
| <td class="mbox-image">
 
   {{#if:{{{image|}}}
 
   {{#if:{{{image|}}}
 
   | {{{image}}}
 
   | {{{image}}}
 
   | {{#switch:{{{type|}}}
 
   | {{#switch:{{{type|}}}
     | speedy    = [[Image:Imbox speedy deletion.png|40x40px]]  
+
     | speedy    = [[Image:Imbox speedy deletion.png|40x40px|alt=|link=]]  
     | delete    = [[Image:Imbox deletion.png|40x40px]]  
+
     | delete    = [[Image:Imbox deletion.png|40x40px|alt=|link=]]  
     | content    = [[Image:Imbox content.png|40x40px]]
+
     | content    = [[Image:Imbox content.png|40x40px|alt=|link=]]
     | style      = [[Image:Imbox style.png|40x40px]]
+
     | style      = [[Image:Edit-clear.svg|40x40px|link=|alt=]]
     | move      = [[Image:Imbox move.png|40x40px]]
+
     | move      = [[Image:Imbox move.png|40x40px|alt=|link=]]
     | protection = [[Image:Imbox protection.png|40x40px]]
+
     | protection = [[Image:Imbox protection.png|40x40px|alt=|link=]]
     | license    = [[Image:Imbox license.png|40x40px]]
+
     | license    = [[Image:Imbox license.png|40x40px|alt=|link=]]
 
     | featured  = [[Image:Imbox featured.png|40x40px]]
 
     | featured  = [[Image:Imbox featured.png|40x40px]]
 
     | notice          <!-- notice = default -->
 
     | notice          <!-- notice = default -->
     | #default  = [[Image:Imbox notice.png|40x40px]]
+
     | #default  = [[Image:Imbox notice.png|40x40px|alt=|link=]]
 
     }}
 
     }}
 
   }}</td>
 
   }}</td>

Revision as of 08:26, 18 July 2010

Sandbox for {{imbox}}

Here we can test new code versions.

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 stacked. If you 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:

{{imbox/sandbox
| type  = speedy / delete / content / style / notice / 
          move / protection / license / featured
| image = none / [[Image:Some image.svg|40px]]
| imageright = [[Image:Some image.svg|40px]]
| style = CSS value
| textstyle = CSS value
| text  = The message body text. 
| below = More text or another imbox.
}}

Examples of varying width

Note: The Creative Commons box above has more padding around the "Some rights reserved" image since that image itself has a lot of whitespace. To fix that the image should be modified, not imbox.

Testing the below parameter

These examples relies on CSS code in MediaWiki:Common.css to make them 100% wide instead of 80% wide when inside another imbox. That is, when an imbox is fed as the "below" parameter to another imbox.

With a left image:

With both a left and right image:

With no images:

Testing mbox-inside

These examples relies on that the surrounding template has the "mbox-inside" class and CSS code in MediaWiki:Common.css to make imboxes 100% wide instead of 80% wide when inside another template.


Description

Testing imboxes inside the {{information}} template.

Source
Date
Author

David Göthberg

Permission
(Reusing this file)