Difference between revisions of "Template:Imbox/testcases"
imported>Edokter (moving test code) |
|||
| Line 54: | Line 54: | ||
Some text just to test bottom margin. | Some text just to test bottom margin. | ||
| + | |||
| + | === Special === | ||
| + | |||
| + | Some other parameter combinations. | ||
| + | |||
| + | {{imbox/sandbox | ||
| + | | text = No type and no image given ('''default''') | ||
| + | }} | ||
| + | |||
| + | {{imbox/sandbox | ||
| + | | image = none | ||
| + | | text = No type and '''image=none''' – No image is used and the '''text''' uses the whole message box area. | ||
| + | }} | ||
| + | |||
| + | {{imbox/sandbox | ||
| + | | type = license | ||
| + | | image = [[Image:Imbox license.svg|40px]] <br> [[Image:Ambox warning yellow.svg|40px]] | ||
| + | | imageright = [[Image:Shuttle.svg|30px]] | ||
| + | | text = type = license <br> image = <nowiki>[[Image:Imbox license.svg|40px]] <br> [[Image:Ambox warning yellow.svg|40px]]</nowiki> <br> imageright = <nowiki>[[Image:Shuttle.svg|30px]]</nowiki> | ||
| + | }} | ||
| + | |||
| + | {{imbox/sandbox | ||
| + | | type = license | ||
| + | | image = [[Image:Imbox license.svg|40px]] <br> [[Image:Ambox warning yellow.svg|40px]] | ||
| + | | imageright = [[Image:Shuttle.svg|30px]] | ||
| + | | text = '''This file is in the [[public domain]] because it was created by [[NASA]].''' | ||
| + | <br>Note that use of NASA logos, insignia and emblems are restricted per US law. | ||
| + | }} | ||
| + | |||
| + | {{imbox/sandbox | ||
| + | | image = | ||
| + | | text = image = | ||
| + | }} | ||
| + | |||
| + | {{imbox/sandbox | ||
| + | | image = [[Image:Nuvola apps bookcase.svg|100px]] | ||
| + | | text = Trying large left side image. - lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text | ||
| + | }} | ||
| + | |||
| + | {{imbox/sandbox | ||
| + | | image = [[Image:Nuvola apps bookcase.svg|100px]] | ||
| + | | text = Trying large left side image. - lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text | ||
| + | | imageright = [[Image:Nuvola apps bookcase.svg|100px]] | ||
| + | }} | ||
| + | |||
| + | {{imbox/sandbox | ||
| + | | image = none | ||
| + | | text = No type and '''image=none''' | ||
| + | }} | ||
| + | |||
| + | === Parameters === | ||
| + | |||
| + | List of all parameters: | ||
| + | |||
| + | <pre> | ||
| + | {{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. | ||
| + | }} | ||
| + | </pre> | ||
| + | |||
| + | === Examples of varying width === | ||
| + | |||
| + | {{imbox/sandbox | ||
| + | | type = license | ||
| + | | image = [[Image:Imbox license.svg|40px]] | ||
| + | | text = | ||
| + | This file has been released into the '''[[w:public domain|public domain]]''' by the [[w:Copyrights|copyright]] holder, its copyright has expired, or it is ineligible for copyright. This applies worldwide. | ||
| + | }} | ||
| + | |||
| + | {{imbox/sandbox | ||
| + | | type = license | ||
| + | | image = [[Image:Heckert GNU white.svg|52px|GFDL]] | ||
| + | | text = | ||
| + | Permission is granted to copy, distribute and/or modify this document under the terms of the '''[[Wikipedia:Text of the GNU Free Documentation License|GNU Free Documentation License]]''', Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. | ||
| + | }} | ||
| + | |||
| + | {{imbox/sandbox | ||
| + | | type = license | ||
| + | | image = [[Image:CC some rights reserved.svg|90px|Creative Commons License]] <br> [[Image:Cc-by new white.svg|24px|Creative Commons Attribution icon]][[Image:Cc-sa white.svg|24px|Creative Commons Share Alike icon]] | ||
| + | | imageright = [[Image:Flag of Germany.svg|64px|right|Flag of Germany]] | ||
| + | | text = | ||
| + | ''This image is licensed under the [[Creative Commons]] [http://creativecommons.org/licenses/by-sa/2.0/de/deed.en Attribution ShareAlike License v. 2.0] '''as written for [[Germany|German]] law''' (which may or may not be entirely compatible with versions for other countries).'' | ||
| + | }} | ||
| + | |||
| + | 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: | ||
| + | |||
| + | {{imbox/sandbox | ||
| + | | type = license | ||
| + | | image = [[Image:Imbox license.svg|40px]] | ||
| + | | text = | ||
| + | This file has been released into the '''[[w:public domain|public domain]]''' by the [[w:Copyrights|copyright]] holder, its copyright has expired, or it is ineligible for copyright. This applies worldwide. | ||
| + | | below = | ||
| + | {{imbox/sandbox | ||
| + | | type = content | ||
| + | <!-- | style = margin: 0 -0.5em; --> | ||
| + | | text = '''This license tag is deprecated!''' | ||
| + | }} | ||
| + | }} | ||
| + | |||
| + | With both a left and right image: | ||
| + | |||
| + | {{imbox/sandbox | ||
| + | | type = license | ||
| + | | image = [[Image:CC some rights reserved.svg|90px|Creative Commons License]] <br> [[Image:Cc-by new white.svg|24px|Creative Commons Attribution icon]][[Image:Cc-sa white.svg|24px|Creative Commons Share Alike icon]] | ||
| + | | imageright = [[Image:Flag of Germany.svg|64px|right|Flag of Germany]] | ||
| + | | text = | ||
| + | ''This image is licensed under the [[Creative Commons]] [http://creativecommons.org/licenses/by-sa/2.0/de/deed.en Attribution ShareAlike License v. 2.0] '''as written for [[Germany|German]] law''' (which may or may not be entirely compatible with versions for other countries).'' | ||
| + | | below = | ||
| + | {{imbox/sandbox | ||
| + | | type = content | ||
| + | <!-- | style = margin: 0 -0.5em; --> | ||
| + | | text = '''This license tag is deprecated!''' | ||
| + | }} | ||
| + | }} | ||
| + | |||
| + | With no images: | ||
| + | |||
| + | {{imbox/sandbox | ||
| + | | type = license | ||
| + | | image = none | ||
| + | | text = | ||
| + | This file has been released into the '''[[w:public domain|public domain]]''' by the [[w:Copyrights|copyright]] holder, its copyright has expired, or it is ineligible for copyright. This applies worldwide. | ||
| + | | below = | ||
| + | {{imbox/sandbox | ||
| + | | type = content | ||
| + | <!-- | style = margin: 0 -0.5em; --> | ||
| + | | text = '''This license tag is deprecated!''' | ||
| + | }} | ||
| + | }} | ||
| + | |||
| + | === 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. | ||
| + | |||
| + | {{information | ||
| + | | Description = Testing imboxes inside the {{tl|information}} template. | ||
| + | | Source = | ||
| + | {{imbox/sandbox | ||
| + | | type = notice | ||
| + | | text = Now is full width instead of 80% width. | ||
| + | }} | ||
| + | | Author = David Göthberg | ||
| + | | Permission = | ||
| + | {{imbox/sandbox | ||
| + | | type = notice | ||
| + | | text = Now is full width instead of 80% width. | ||
| + | }} | ||
| + | }} | ||
Revision as of 10:37, 30 November 2011
Contents
Testing {{imbox}}
The boxes below are transclusions of {{imbox}}. If you have updated the code of imbox then you might need to purge this page to see the effect on the examples below.
| 40x40px | speedy |
| 40x40px | delete |
| 40x40px | content - lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text | 40x40px |
| 40x40px | style - lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text | 40x40px |
| 40x40px | notice - lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text | 80px |
| 40x40px | move |
| 40x40px | protection |
| 40x40px | Esta página aguarda tradução para português. |
| 40x40px | A elaboração desta página encontra-se em curso. Por favor evite fazer edições neste momento. |
Some text just to test bottom margin.
Special
Some other parameter combinations.
| 40x40px | No type and no image given (default) |
| No type and image=none – No image is used and the text uses the whole message box area. |
| 40px 40px | type = license image = [[Image:Imbox license.svg|40px]] <br> [[Image:Ambox warning yellow.svg|40px]] imageright = [[Image:Shuttle.svg|30px]] | 30px |
| 40px 40px | This file is in the public domain because it was created by NASA.
Note that use of NASA logos, insignia and emblems are restricted per US law. | 30px |
| 40x40px | image = |
| 100px | Trying large left side image. - lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text |
| 100px | Trying large left side image. - lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text | 100px |
| No type and image=none |
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
| 40px | This file has been released into the public domain by the copyright holder, its copyright has expired, or it is ineligible for copyright. This applies worldwide. |
| GFDL | Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. |
| Creative Commons License Creative Commons Attribution iconCreative Commons Share Alike icon | This image is licensed under the Creative Commons Attribution ShareAlike License v. 2.0 as written for German law (which may or may not be entirely compatible with versions for other countries). |
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:
| 40px | This file has been released into the public domain by the copyright holder, its copyright has expired, or it is ineligible for copyright. This applies worldwide. | ||
| |||
With both a left and right image:
| Creative Commons License Creative Commons Attribution iconCreative Commons Share Alike icon | This image is licensed under the Creative Commons Attribution ShareAlike License v. 2.0 as written for German law (which may or may not be entirely compatible with versions for other countries). | |||
| ||||
With no images:
| This file has been released into the public domain by the copyright holder, its copyright has expired, or it is ineligible for copyright. This applies worldwide. | |||
| |||
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) |
|