Template:Sidebar/testcases: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
Line 8: Line 8:
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With no parameters}}
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With no parameters}}
| {{sidebar}}
| {{sidebar}}
|-
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With title parameter only}}
| {{sidebar|title=Lorem ipsum}}
|-
|-
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With header parameter only}}
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With header parameter only}}
| {{sidebar|header=Foo bar}}
| {{sidebar|header=Header}}
|-
|-
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With content parameter only}}
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With content parameter only}}
| {{sidebar|content=Example}}
| {{sidebar|content1=Content}}
|-
|-
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With footer parameter only}}
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With footer parameter only}}
| {{sidebar|footer=Placeholder}}
| {{sidebar|footer=Footer}}
|-
|-
|}
|}
Line 30: Line 27:
|-
|-
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With image parameter only}}
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With image parameter only}}
| style="padding-block:.5em;" | {{sidebar|image=Software Cover - The Lab}}
| style="padding-block:.5em;" | {{sidebar|image=Software Cover - The Lab.jpg}}
|-
|-
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With image parameter, imageformat and imagewidth parameter}}
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With image parameter and imagewidth parameter}}
| style="padding-block:.5em;" | {{sidebar|image=Missing entity icon|imageformat=png|imagewidth=64px}}
| style="padding-block:.5em;" | {{sidebar|image=Missing entity icon.png|imagewidth=64px}}
|-
|-
|}
|}
Line 44: Line 41:
! {{Dictionary/common|Preview}}
! {{Dictionary/common|Preview}}
|-
|-
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With most parameters}}
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With header, footer, section and content parameters}}
| style="padding-block:.5em;" | {{sidebar
                                | header      = Header
                                | section1    = Section
                                | content1    = Content 
                                | section2    = Section
                                | content2    = Content   
                                | footer      = Footer                         
                                }}
|-
|-
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With a variety of parameters}}
| style="padding-block:.5em;" | {{sidebar
| style="padding-block:.5em;" | {{sidebar
                                 | float      = none
                                 | float      = none
                                | title      = Lorem ipsum
                                 | image      = Missing entity icon (pink).png
                                 | image      = Missing entity icon (pink)
                                | imageformat = png  
                                 | imagewidth  = 64px
                                 | imagewidth  = 64px
                                 | header      = Foo bar
                                 | header      = Header
                                 | content    = Example     
                                 | section1    = Section 
                                 | footer      = Placeholder                          
                                | content1    = Content     
                                 | footer      = Footer                          
                                 }}
                                 }}
|-
|-
|-
|}
|}

Revision as of 20:55, 29 May 2023

Gnome app science.png
This is the template test cases page for Template:Sidebar. Purge this page in order to update the examples, if the template itself was recently edited.
If there are too many examples of a complicated template, later transclusions of such template may break due to the limitations of the Mediawiki software, or can cause the page itself to load very slow; See the HTML comment "NewPP limit Report" on the rendered page.
You can also use Special:ExpandTemplates to examine the results of template use cases.


Basic tests

Description Preview
With no parameters
With header parameter only
Header
With content parameter only
Content
With footer parameter only
Footer

Image tests

Description Preview
With image parameter only
[[File:Software Cover - The Lab.jpg
300px]]
With image parameter and imagewidth parameter
[[File:Missing entity icon.png
64px]]

Advanced tests

Description Preview
With header, footer, section and content parameters
Header
Section
Content
Section
Content
Footer
With a variety of parameters
Header
[[File:Missing entity icon (pink).png
64px]]
Section
Content
Footer