Difference between revisions of "Template:Tmbox/sandbox"

9,294 bytes added ,  15:01, 3 February 2009
m
1 revision
m (1 revision)
 
m (1 revision)
 
Line 1: Line 1:
<div style="float:left; text-align:left; width:6em;">{{Tnavbar|{{{2|}}}|{{#ifeq:{{{plain|}}}|1|plain|mini}}=1|fontcolor={{{fontcolor|}}}}}</div><span style="font-size:110%;{{#if:{{{fontcolor|}}}|color:{{{fontcolor|}}};}}">{{{1}}}</span><noinclude>
{{#ifeq:{{{small|}}}|yes
{{documentation}}
| {{tmbox/sandbox/core
{{pp-template|small=yes}}
  | small = yes
<!-- Add cats and interwikis to the /doc subpage, not here! -->
  | type  = {{{type|}}}
  | image = {{#if:{{{smallimage|}}}| {{{smallimage}}} | {{{image|}}} }}
  | imageright = {{#if:{{{smallimageright|}}} | {{{smallimageright}}} | {{{imageright|}}} }}
  | style = {{{style|}}}
  | textstyle = {{{textstyle|}}}
  | text  = {{#if:{{{smalltext|}}}| {{{smalltext}}} | {{{text}}} }}
  }}
| {{tmbox/sandbox/core
  | type  = {{{type|}}}
  | image = {{{image|}}}
  | imageright = {{{imageright|}}}
  | style = {{{style|}}}
  | textstyle = {{{textstyle|}}}
  | text  = {{{text}}}
  }}
}}<noinclude>
 
=== Sandbox for {{tl|tmbox}} ===
 
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 {{purge|purge this page}} to see the effect on the examples below.
 
The code in this test template works together with {{tl|tmbox/sandbox/core}}.
 
{{tmbox/sandbox
| type = speedy
| text = speedy
}}
{{tmbox/sandbox
| type = delete
| text = delete
}}
[[Image:Canis lupus laying.jpg|thumb|60px]]
{{tmbox/sandbox
| type = content
| text = 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
| imageright = [[Image:Nuvola apps bookcase.svg|40x40px]]
}}
{{tmbox/sandbox
| type = style
| text = 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
| imageright = [[Image:Nuvola apps bookcase.svg|40x40px]]
}}
{{tmbox/sandbox
| type = notice
| text = 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
| imageright = [[Image:Nuvola apps bookcase.svg|80px]]
}}
{{tmbox/sandbox
| type = move
| text = move
}}
{{shortcut|WP:TEST}}
{{tmbox/sandbox
| type = protection
| text = protection
}}
 
Some text just to test bottom margin.
 
=== Special ===
 
Some other parameter combinations.
 
{{tmbox/sandbox
| text  = No type and no image given ('''default''')
}}
 
{{tmbox/sandbox
| image = none
| text  = No type and '''image=none''' – No image is used and the '''text''' uses the whole message box area.
}}
 
{{tmbox/sandbox
| image =
| text  = image =
}}
 
{{tmbox/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
}}
 
{{tmbox/sandbox
| image = [[Image:Nuvola apps bookcase.svg|100px]]
| text = Trying large left and right 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]]
}}
 
=== Parameters ===
 
List of all parameters:  
 
<pre>
{{tmbox/sandbox
| type  = speedy / delete / content / style / notice / move / protection
| image = none / [[Image:Some image.svg|40px]]
| imageright = [[Image:Some image.svg|40px]]
| style = CSS value
| textstyle = CSS value
| text  = The message body text.
| small = yes / {{{small|}}}
| smallimage = none / [[Image:Some image.svg|30px]]
| smallimageright = none / [[Image:Some image.svg|30px]]
| smalltext  = A shorter message body text.
}}
</pre>
 
=== Examples of varying width ===
 
These examples were copied from the ombox, so their images and texts might seem strange. But we are just testing image cell widths here.
 
{{tmbox/sandbox
| type      = notice
| image      = [[Image:Blue check.svg|30px]]
| text      =
'''This page documents an English Wikipedia [[Wikipedia:Policies and guidelines|guideline]].''' It is a generally accepted standard that editors should follow, though it should be treated with [[Wikipedia:Use common sense|common sense]] and the [[Wikipedia:Ignore all rules|occasional exception]]. When editing this page, please ensure that your revision reflects [[Wikipedia:Consensus|consensus]]. When in doubt, discuss on the [[{{TALKPAGENAME}}|talk page]].
}}
 
{{tmbox/sandbox
| type      = notice
| image      = [[Image:Purple question mark.svg|50px]]
| text      =
'''The following is a ''proposed'' Wikipedia {{{type|[[Wikipedia:Policies and guidelines|policy, guideline,]] or process}}}.''' <br> The proposal may still be in development, under [[{{NAMESPACE}} talk:{{PAGENAME}}|discussion]], or in the process of gathering [[Wikipedia:Consensus|consensus]] for adoption. Thus references or links to this page should not describe it as "policy".
}}
 
{{tmbox/sandbox
| type      = notice
| image      = [[Image:Purple question mark.svg|70px]]
| imageright = {{shortcut|WP:SHORT}}
| text      =
'''The following is a ''proposed'' Wikipedia {{{type|[[Wikipedia:Policies and guidelines|policy, guideline,]] or process}}}.'''
}}
 
{{tmbox/sandbox
| type      = notice
| image      = [[Image:Crystal package settings.png|40px]]
| imageright = {{shortcut|WP:SHORT}}
| text      =
This page is a '''how-to guide''' detailing a practice or process on the English Wikipedia.
}}
 
=== Small message boxes ===
 
{{tmbox/sandbox
| type      = notice
| small      = yes
| text      =
type = notice, small = yes, no image set.
}}
{{tmbox/sandbox
| type      = notice
| small      = yes
| image      = [[Image:Imbox notice.png|40x40px]]
| text      =
type = notice, small = yes, image = <nowiki>[[Image:Imbox notice.png|40x40px]]</nowiki>
}}
{{tmbox/sandbox
| type      = notice
| small      = yes
| image      = [[Image:Imbox notice.png|30x30px]]
| imageright = [[Image:Nuvola apps bookcase.png|30x30px]]
| text      =
type = notice, small = yes, image = <nowiki>[[Image:Imbox notice.png|30x30px]], imageright = [[Image:Nuvola apps bookcase.png|30x30px]]</nowiki>
}}
{{tmbox/sandbox
| type      = notice
| small      = yes
| image      = [[Image:Information icon4.svg|30x30px]]
| imageright = [[Image:Nuvola apps bookcase.png|30x30px]]
| text      =
type = notice, small = yes, image = <nowiki>[[Image:Information icon4.svg|30x30px]], imageright = [[Image:Nuvola apps bookcase.png|30x30px]]</nowiki>
}}
{{tmbox/sandbox
| type      = style
| small      = yes
| text      =
type = style, small = yes, no image set.
}}
{{tmbox/sandbox
| type      = style
| small      = yes
| image      = [[Image:Imbox style.png|40x40px]]
| text      =
type = style, small = yes, image = <nowiki>[[Image:Imbox style.png|40x40px]]</nowiki>
}}
{{tmbox/sandbox
| type      = style
| small      = yes
| image      = [[Image:Broom icon.svg|30x30px]]
| text      =
type = style, small = yes, image = <nowiki>[[Image:Broom icon.svg|30x30px]]</nowiki>
}}
{{tmbox/sandbox
| type      = notice
| small      = yes
| image      = none
| text      =
type = notice, small = yes, image = none
}}
 
The small talkpage message boxes to the right use different images. Some use the 40px png images with optimised background, which makes their background look right even in some older web browsers. When those png images get rescaled to 30px they loose their optimised background and get somewhat blurred. For comparison some of the boxes to the right use the svg versions instead which doesn't get as blurred when scaled to 30px. If we decide to use 30px images for the small boxes then we perhaps should make a set of 30px png images with optimised background or perhaps use the svg images. But the blurring is really only noticeable in low screen resolutions so most users will never see a difference, and the old browsers that need the optimised background are not used much anymore, so we can probably use the rescaled png images as is for the small boxes. Since that means the simplest code for the template.
 
Some text to test box flow:
 
{{lorem ipsum|3}}
 
{{clear}}
 
=== Testing box flow ===
 
{{tmbox/sandbox
| type      = notice
| text      =
Box 1: type = notice, no small set, no image set.
}}
{{tmbox/sandbox
| type      = notice
| small      = yes
| text      =
Box 2: type = notice, small = yes, no image set.
}}
{{tmbox/sandbox
| type      = style
| small      = yes
| text      =
Box 3: type = style, small = yes, no image set.
}}
{{tmbox/sandbox
| type      = notice
| text      =
Box 4: type = notice, no small set, no image set.
}}
 
{{lorem ipsum|2}}
 
{{clear}}
 
=== Testing smallimage, smallimageright and smalltext ===
 
{{tmbox/sandbox
| text      = Long text.
| small      = yes
| smalltext  =
Smalltext: no image set, small = yes, smalltext set.
}}
{{tmbox/sandbox
| image      = [[Image:Nuvola apps bookcase.png|40px]]
| text      = image = <nowiki>[[Image:Nuvola apps bookcase.png|40px]]</nowiki>
| small      = yes
}}
{{tmbox/sandbox
| image      = none
| text      = image = none, smallimage = <nowiki>[[Image:Nuvola apps bookcase.png|30px]]</nowiki>
| small      = yes
| smallimage  = [[Image:Nuvola apps bookcase.png|30px]]
}}
{{tmbox/sandbox
| text      = smallimage = <nowiki>[[Image:Nuvola apps bookcase.png|30px]]</nowiki>
| small      = yes
| smallimage  = [[Image:Nuvola apps bookcase.png|30px]]
}}
{{tmbox/sandbox
| text      = smallimage = none
| small      = yes
| smallimage  = none
}}
{{tmbox/sandbox
| imageright      = none
| text      = imageright = none, smallimageright = <nowiki>[[Image:Nuvola apps bookcase.png|30px]]</nowiki>
| small     = yes
| smallimageright  = [[Image:Nuvola apps bookcase.png|30px]]
}}
{{tmbox/sandbox
| imageright      = [[Image:Nuvola apps bookcase.png|40px]]
| text      = imageright = <nowiki>[[Image:Nuvola apps bookcase.png|40px]]</nowiki>, smallimageright = none
| small      = yes
| smallimageright  = none
}}
 
{{lorem ipsum|3}}
 
{{clear}}
 
</noinclude>
</noinclude>
Budlight
Bots, Bureaucrats, Administrators
529

edits