跳转到内容

Template:Navbox/testcases

维基百科,自由的百科全书

Except for the side by side comparisons, these all use the {{sandbox version}} of the {{Navbox}} (and subsequently {{Navbar}}) code; please ensure that all of them look correct here before saving sandbox tests to the live template.

Basic tests

[编辑]
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}

Subgroup tests

[编辑]

Container tests

[编辑]

Style tests

[编辑]
左右对比
{{Navbox}}{{Navbox/sandbox}}

Group width tests

[编辑]

Using new groupwidth parameter

[编辑]


[编辑]
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}


Missing parameter tests

[编辑]
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}

Row striping tests

[编辑]


Additional tests

[编辑]
  1. Test margin with references
  2. Second reference
  3. Third reference

Using Navbox with columns / Navbox with collapsible groups

[编辑]

Span hack

[编辑]
左右对比
{{Navbox}}{{Navbox/sandbox}}

Lists with in-list images

[编辑]
左右对比
{{Navbox}}{{Navbox/sandbox}}
左右对比
{{Navbox}}{{Navbox/sandbox}}

Horizontal/plain lists

[编辑]
{{Navbox|listclass=hlist|above=* Item 1
** Item 1.1
** Item 1.2|group1=List 1|aboveclass=hlist|belowclass=hlist|name=Template:Navbox/testcases|category=no|list1=* Item 1
** Item 1.1
** Item 1.2|imageclass=plainlist|title=hlist & plainlist|below=* Item 1
** Item 1.1
** Item 1.2}}

{{Navbox}}

<div class="navbox-styles">'"`UNIQ--templatestyles-0000015E-QINU`"''"`UNIQ--templatestyles-0000015F-QINU`"'</div><div role="navigation" class="navbox" aria-labelledby="hlist_&amp;amp;_plainlist" style="padding:3px"><table class="nowraplinks mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tr><th scope="col" class="collapsible-title navbox-title" colspan="2">'"`UNIQ--templatestyles-0000015C-QINU`"''"`UNIQ--templatestyles-0000015D-QINU`"'<div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view">[[Template:Navbox/testcases|<abbr title="-{zh-hans:查看;zh-hant:檢視;}-该模板">-{zh-hans:查;zh-hant:閱;}-</abbr>]]</li><li class="nv-talk">[[Template talk:Navbox/testcases|<abbr title="讨论该模板">论</abbr>]]</li><li class="nv-edit">[[Special:EditPage/Template:Navbox/testcases|<abbr title="编辑该模板">编</abbr>]]</li></ul></div><div id="hlist_&amp;amp;_plainlist" style="font-size:110%;margin:0 5em">hlist & plainlist</div></th></tr><tr><td class="navbox-abovebelow hlist" colspan="2"><div>
* Item 1
** Item 1.1
** Item 1.2
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">List 1</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0px"><div style="padding:0em 0.25em">
* Item 1
** Item 1.1
** Item 1.2
</div></td></tr><tr><td class="navbox-abovebelow hlist" colspan="2"><div>
* Item 1
** Item 1.1
** Item 1.2
</div></td></tr></table></div>

{{Navbox/sandbox}}

<div class="navbox-styles">'"`UNIQ--templatestyles-00000162-QINU`"''"`UNIQ--templatestyles-00000163-QINU`"'</div><div role="navigation" class="navbox" aria-labelledby="hlist_&amp;amp;_plainlist" style="padding:3px"><table class="nowraplinks mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tr><th scope="col" class="collapsible-title navbox-title" colspan="2">'"`UNIQ--templatestyles-00000160-QINU`"''"`UNIQ--templatestyles-00000161-QINU`"'<div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view">[[Template:Navbox/testcases|<abbr title="-{zh-hans:查看;zh-hant:檢視;}-该模板">-{zh-hans:查;zh-hant:閱;}-</abbr>]]</li><li class="nv-talk">[[Template talk:Navbox/testcases|<abbr title="讨论该模板">论</abbr>]]</li><li class="nv-edit">[[Special:EditPage/Template:Navbox/testcases|<abbr title="编辑该模板">编</abbr>]]</li></ul></div><div id="hlist_&amp;amp;_plainlist" style="font-size:110%;margin:0 5em">hlist & plainlist</div></th></tr><tr><td class="navbox-abovebelow hlist" colspan="2"><div>
* Item 1
** Item 1.1
** Item 1.2
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">List 1</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0px"><div style="padding:0em 0.25em">
* Item 1
** Item 1.1
** Item 1.2
</div></td></tr><tr><td class="navbox-abovebelow hlist" colspan="2"><div>
* Item 1
** Item 1.1
** Item 1.2
</div></td></tr></table></div>

Currently doesn't find it in list1class

[编辑]
{{Navbox|name=Template:Navbox/testcases|list1class=hlist|list1=* Item 1
** Item 1.1
** Item 1.2|title=list in list1class?|category=no|group1=List 1}}

{{Navbox}}

<div class="navbox-styles">'"`UNIQ--templatestyles-00000167-QINU`"''"`UNIQ--templatestyles-00000168-QINU`"'</div><div role="navigation" class="navbox" aria-labelledby="list_in_list1class?" style="padding:3px"><table class="nowraplinks mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tr><th scope="col" class="collapsible-title navbox-title" colspan="2">'"`UNIQ--templatestyles-00000165-QINU`"''"`UNIQ--templatestyles-00000166-QINU`"'<div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view">[[Template:Navbox/testcases|<abbr title="-{zh-hans:查看;zh-hant:檢視;}-该模板">-{zh-hans:查;zh-hant:閱;}-</abbr>]]</li><li class="nv-talk">[[Template talk:Navbox/testcases|<abbr title="讨论该模板">论</abbr>]]</li><li class="nv-edit">[[Special:EditPage/Template:Navbox/testcases|<abbr title="编辑该模板">编</abbr>]]</li></ul></div><div id="list_in_list1class?" style="font-size:110%;margin:0 5em">list in list1class?</div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">List 1</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0px"><div style="padding:0em 0.25em">
* Item 1
** Item 1.1
** Item 1.2
</div></td></tr></table></div>

{{Navbox/sandbox}}

<div class="navbox-styles">'"`UNIQ--templatestyles-0000016B-QINU`"''"`UNIQ--templatestyles-0000016C-QINU`"'</div><div role="navigation" class="navbox" aria-labelledby="list_in_list1class?" style="padding:3px"><table class="nowraplinks mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tr><th scope="col" class="collapsible-title navbox-title" colspan="2">'"`UNIQ--templatestyles-00000169-QINU`"''"`UNIQ--templatestyles-0000016A-QINU`"'<div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view">[[Template:Navbox/testcases|<abbr title="-{zh-hans:查看;zh-hant:檢視;}-该模板">-{zh-hans:查;zh-hant:閱;}-</abbr>]]</li><li class="nv-talk">[[Template talk:Navbox/testcases|<abbr title="讨论该模板">论</abbr>]]</li><li class="nv-edit">[[Special:EditPage/Template:Navbox/testcases|<abbr title="编辑该模板">编</abbr>]]</li></ul></div><div id="list_in_list1class?" style="font-size:110%;margin:0 5em">list in list1class?</div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">List 1</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0px"><div style="padding:0em 0.25em">
* Item 1
** Item 1.1
** Item 1.2
</div></td></tr></table></div>

Save the TemplateStyles

[编辑]
{{Navbox|name=Template:Navbox/testcases|category=no|list1=<div class="plainlist " >
* Item 1
** Item 1.1
** Item 1.2

</div>|title=Does the TemplateStyles move where it should|group1=List 1}}

{{Navbox}}

<div class="navbox-styles">'"`UNIQ--templatestyles-00000172-QINU`"''"`UNIQ--templatestyles-00000173-QINU`"''"`UNIQ--templatestyles-0000016D-QINU`"'</div><div role="navigation" class="navbox" aria-labelledby="Does_the_TemplateStyles_move_where_it_should" style="padding:3px"><table class="nowraplinks mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tr><th scope="col" class="collapsible-title navbox-title" colspan="2">'"`UNIQ--templatestyles-00000170-QINU`"''"`UNIQ--templatestyles-00000171-QINU`"'<div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view">[[Template:Navbox/testcases|<abbr title="-{zh-hans:查看;zh-hant:檢視;}-该模板">-{zh-hans:查;zh-hant:閱;}-</abbr>]]</li><li class="nv-talk">[[Template talk:Navbox/testcases|<abbr title="讨论该模板">论</abbr>]]</li><li class="nv-edit">[[Special:EditPage/Template:Navbox/testcases|<abbr title="编辑该模板">编</abbr>]]</li></ul></div><div id="Does_the_TemplateStyles_move_where_it_should" style="font-size:110%;margin:0 5em">Does the TemplateStyles move where it should</div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">List 1</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0px"><div style="padding:0em 0.25em"><div class="plainlist " >
* Item 1
** Item 1.1
** Item 1.2

</div></div></td></tr></table></div>

{{Navbox/sandbox}}

<div class="navbox-styles">'"`UNIQ--templatestyles-00000176-QINU`"''"`UNIQ--templatestyles-00000177-QINU`"''"`UNIQ--templatestyles-0000016D-QINU`"'</div><div role="navigation" class="navbox" aria-labelledby="Does_the_TemplateStyles_move_where_it_should" style="padding:3px"><table class="nowraplinks mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tr><th scope="col" class="collapsible-title navbox-title" colspan="2">'"`UNIQ--templatestyles-00000174-QINU`"''"`UNIQ--templatestyles-00000175-QINU`"'<div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view">[[Template:Navbox/testcases|<abbr title="-{zh-hans:查看;zh-hant:檢視;}-该模板">-{zh-hans:查;zh-hant:閱;}-</abbr>]]</li><li class="nv-talk">[[Template talk:Navbox/testcases|<abbr title="讨论该模板">论</abbr>]]</li><li class="nv-edit">[[Special:EditPage/Template:Navbox/testcases|<abbr title="编辑该模板">编</abbr>]]</li></ul></div><div id="Does_the_TemplateStyles_move_where_it_should" style="font-size:110%;margin:0 5em">Does the TemplateStyles move where it should</div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">List 1</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0px"><div style="padding:0em 0.25em"><div class="plainlist " >
* Item 1
** Item 1.1
** Item 1.2

</div></div></td></tr></table></div>

Longterm: Div version

[编辑]