Vorlage:Navigation templates: Unterschied zwischen den Versionen

Aus skandinavien-wiki.net
imported>David Kernow
K (table heading size)
(Update to show "Navbox generic" now allows images, add column to second table to show difference in CSS padding for "NavFrame" (2px) and "navbox" (5px), added example of nesting collapsible tables.)
Zeile 2: Zeile 2:
|+ <span style="font-size:130%;">Navigation template feature comparison</span>
|+ <span style="font-size:130%;">Navigation template feature comparison</span>
! style="text-align:left; padding-left:4px;" | {{Tnavbar|Navigational_templates|plain=1}}
! style="text-align:left; padding-left:4px;" | {{Tnavbar|Navigational_templates|plain=1}}
! collapsible !! Header color<sup></sup>
! collapsible !! Header color<sup>1</sup>
! Image !! Groups !! Style parameter !! Example
! Image !! Groups !! Style parameter !! Example
|-
|-
Zeile 11: Zeile 11:
| align="left" | {{tl|Navigation with image}}
| align="left" | {{tl|Navigation with image}}
| {{yes2}} <tt>NavFrame</tt> || style="background-color:#efefef;" | NavHead
| {{yes2}} <tt>NavFrame</tt> || style="background-color:#efefef;" | NavHead
| {{yes2}} Left/right of body || {{no}} || {{no}} || {{tl|Cetaceans}}
| {{yes2}} Left/right, below title || {{no}} || {{no}} || {{tl|Cetaceans}}
|-
|-
<!--| align="left"| {{tl|Navigation with columns}}
<!--| align="left"| {{tl|Navigation with columns}}
Zeile 27: Zeile 27:
| align="left" | {{tl|Navbox generic}}
| align="left" | {{tl|Navbox generic}}
| {{yes2}} <tt>collapsible</tt> || style="background-color:#ccccff;" | navbox
| {{yes2}} <tt>collapsible</tt> || style="background-color:#ccccff;" | navbox
| {{no}} || {{yes}} || {{yes}} || {{tl|Dilbert}}
| {{yes2}} Right, below title (optional) || {{yes}} || {{yes}} || {{tl|Dilbert}}
|-
|- style="background-color:#BBBBBB;"
| align="left" | {{tl|Navbox generic with image}}
| align="left" | {{tl|Navbox generic with image}}<sup>2</sup>
| {{yes2}} <tt>collapsible</tt> || style="background-color:#ccccff;" | navbox  
| <tt>collapsible</tt> || navbox  
| {{yes2}} Right-hand side || {{yes}} || {{yes}} || {{tl|Jewish life}}
| Right, below title || Yes || Yes || {{tl|Jewish life}}
|-
|-
| align="left" | {{tl|NavigationBox}}
| align="left" | {{tl|NavigationBox}}
Zeile 53: Zeile 53:
| colspan="7" style="border-left-style:hidden; border-right-style:hidden;"|  
| colspan="7" style="border-left-style:hidden; border-right-style:hidden;"|  
|-
|-
| colspan="7" align="left" | <sup></sup> The background color for the header or title is inherited from the [[CSS]] class: <tt>navbox</tt> uses <span style="background-color:#ccf; color:#000000;">#ccf</span> and <tt>NavHead</tt> uses <span style="background-color:#efefef; color:#000000">#efefef</span> (as defined in [[MediaWiki:Common.css|Common.css]]). All the current navigation templates have a <tt>color</tt> parameter that will override these defaults.</div>
| colspan="7" align="left" | <sup>1</sup> The background color for the header or title is inherited from the [[CSS]] class: <tt>navbox</tt> uses <span style="background-color:#ccf; color:#000000;">#ccf</span> and <tt>NavHead</tt> uses <span style="background-color:#efefef; color:#000000">#efefef</span> (as defined in [[MediaWiki:Common.css|Common.css]]). All the current navigation templates have a <tt>color</tt> parameter that will override these defaults.<br> <sup>2</sup> {{tl|Navbox generic}} should be used instead of {{tl|Navbox generic with image}} as the former was updated to include the additional features of the latter.
|}
|}


Zeile 60: Zeile 60:
|-
|-
!style="text-align:left; padding-left:4px;"| {{Tnavbar|Navigational_templates|plain=1}}
!style="text-align:left; padding-left:4px;"| {{Tnavbar|Navigational_templates|plain=1}}
! Classes used
! Classes used<sup>1</sup>
! Collapses when !! Custom initial&nbsp;state !! Nesting
! Collapses when !! Custom initial&nbsp;state !! Nesting
! Header color !! Font size
! Header color<sup>2</sup> !! Font size<sup>2</sup> !! Padding<sup>2</sup>
|-
|-
| align="left" | [[Wikipedia:NavFrame|NavFrame div]]
| align="left" | [[Wikipedia:NavFrame|NavFrame div]]
| NavFrame, NavHead, NavContent
| NavFrame, NavHead, NavContent
| 3+ of the same || {{no}} || {{yes}}
| 3+ of the same || {{no}} || {{yes}}
| style="background-color:#efefef;" | #efefef || NavFrame: 95%<br>NavHead: 100%<br>NavContent: 100%
| style="background-color:#efefef;" | #efefef || NavFrame: 95%<br>NavHead: 100%<br>NavContent: 100% || 2px
|-
|-
| align="left" | [[Wikipedia:NavFrame#Collapsible tables|Collapsible table]]
| align="left" | [[Wikipedia:NavFrame#Collapsible tables|Collapsible table]]
| collapsible, navbox
| collapsible, navbox
| 2+ of the same || {{yes}} || {{no}}
| 2+ of the same || {{yes}} || {{yes2}}Yes<sup>3</sup>
| style="background-color:#ccccff;"| #ccccff || navbox: 90%
| style="background-color:#ccccff;"| #ccccff || navbox: 90% || 5px
|-
|-
| colspan="7" align="left" | Note: [[CSS]] classes are defined in [[MediaWiki:Common.css|Common.css]] and [[JavaScript]] for collapsible templates is located in [[MediaWiki:Common.js|Common.js]].
| colspan="8" align="left" | <sup>1</sup> [[CSS]] classes are defined in [[MediaWiki:Common.css|Common.css]] and [[JavaScript]] for collapsible templates is located in [[MediaWiki:Common.js|Common.js]].<br> <sup>2</sup> Defaults can be changed, for example {{tl|Navigation}} contains: <code><nowiki><div class="NavContent" style="font-size:0.9em"></nowiki></code>.<br> <sup>3</sup> For an example of nesting with Collapsible tables, see {{tl|Natural satellites of the Solar System}}.
|}<noinclude>
|}<noinclude>


[[Category:Navigational templates| {{PAGENAME}}]]
[[Category:Navigational templates| {{PAGENAME}}]]
</noinclude>
</noinclude>

Version vom 22. Februar 2007, 16:48 Uhr

Navigation template feature comparison
Vorlage:Tnavbar collapsible Header color1 Image Groups Style parameter Example
{{Navigation}} Vorlage:Yes2 NavFrame NavHead Vorlage:No Vorlage:No Vorlage:No {{OPEC}}
{{Navigation with image}} Vorlage:Yes2 NavFrame NavHead Vorlage:Yes2 Left/right, below title Vorlage:No Vorlage:No {{Cetaceans}}
{{Dynamic navigation box}} Vorlage:Yes2 collapsible navbox Vorlage:No Vorlage:No Vorlage:Yes {{CSUHeads}}
{{Dynamic navigation box with image}} Vorlage:Yes2 NavFrame NavHead Vorlage:Yes2 Upper left Vorlage:No Vorlage:No {{SlovakPMs}}
{{Navbox generic}} Vorlage:Yes2 collapsible navbox Vorlage:Yes2 Right, below title (optional) Vorlage:Yes Vorlage:Yes {{Dilbert}}
{{Navbox generic with image}}2 collapsible navbox Right, below title Yes Yes {{Jewish life}}
{{NavigationBox}} Vorlage:No navbox Vorlage:Yes2 Right of title+body Vorlage:No Vorlage:No {{EPA}}
{{Commons:NavigationBox}} Vorlage:No #ccccff Vorlage:Yes2 Right of title+body Vorlage:No Vorlage:No
{{Commons:Dynamic navigation box}} Vorlage:Yes2 NavFrame #ccccff Vorlage:No Vorlage:No Vorlage:No
{{Commons:Dynamic navigation box with image}}  Vorlage:Yes2 NavFrame NavHead Vorlage:Yes2 Upper left Vorlage:No Vorlage:No
1 The background color for the header or title is inherited from the CSS class: navbox uses #ccf and NavHead uses #efefef (as defined in Common.css). All the current navigation templates have a color parameter that will override these defaults.
2 {{Navbox generic}} should be used instead of {{Navbox generic with image}} as the former was updated to include the additional features of the latter.
NavFrame div vs. collapsible table
Vorlage:Tnavbar Classes used1 Collapses when Custom initial state Nesting Header color2 Font size2 Padding2
NavFrame div NavFrame, NavHead, NavContent 3+ of the same Vorlage:No Vorlage:Yes #efefef NavFrame: 95%
NavHead: 100%
NavContent: 100%
2px
Collapsible table collapsible, navbox 2+ of the same Vorlage:Yes Vorlage:Yes2Yes3 #ccccff navbox: 90% 5px
1 CSS classes are defined in Common.css and JavaScript for collapsible templates is located in Common.js.
2 Defaults can be changed, for example {{Navigation}} contains: <div class="NavContent" style="font-size:0.9em">.
3 For an example of nesting with Collapsible tables, see {{Natural satellites of the Solar System}}.