Vorlage:Navigation templates: Unterschied zwischen den Versionen

Aus skandinavien-wiki.net
(Default Header color by class not by navbox, make it more clear that it is class dependent)
(background colors for collapsible tables also inherited (from class=navbox), fix incorrect colors, show default font sizes)
Zeile 1: Zeile 1:
{| class="wikitable" style="margin-left:auto; margin-right:auto; width:auto; text-align:center; font-size:90%;"
{| class="wikitable" style="margin-left:auto; margin-right:auto; width:auto; text-align:center; font-size:90%;"
!style="text-align:left; padding-left:4px;"| {{Tnavbar|Navigational_templates|plain=1}}
|+ Navigation template feature comparison
! collapsible !! Image
! style="text-align:left; padding-left:4px;" | {{Tnavbar|Navigational_templates|plain=1}}
! Groups !! Default header color !! Style parameter !! Example
! collapsible !! Header color<sup>†</sup>
! Image !! Groups !! Style parameter !! Example
|-
| align="left" | {{tl|Navigation}}
| {{yes2}} <tt>NavFrame</tt> || style="background-color:#efefef;" | NavHead
| {{no}} || {{no}} || {{no}} || {{tl|OPEC}}
|-
| align="left" | {{tl|Navigation with image}}
| {{yes2}} <tt>NavFrame</tt> || style="background-color:#efefef;" | NavHead
| {{yes2}} Left/right of body || {{no}} || {{no}} || {{tl|Cetaceans}}
|-
|-
|align="left"| {{tl|Navigation}}
| align="left"| {{tl|Navigation with columns}}
| {{yes2}} <tt>NavFrame</tt>   || {{no}}
| {{yes2}} <tt>NavFrame</tt> || style="background-color:#efefef;" | NavHead
| {{no}} || inherit || {{no}} || {{tl|OPEC}}
| {{no}} || {{no}} || {{no}} ||  
|-
|-
|align="left"| {{tl|Navigation with image}}
| align="left" | {{tl|Dynamic navigation box}}
| {{yes2}} <tt>NavFrame</tt>   || {{yes2}} Left/right of body
| {{yes2}} <tt>collapsible</tt> || style="background-color:#ccccff;" | navbox
| {{no}} || inherit || {{no}} || {{tl|Cetaceans}}
| {{no}} || {{no}} || {{yes}} || {{tl|CSUHeads}}
|-
|-
|align="left"| {{tl|Navigation with columns}}
| align="left" | {{tl|Dynamic navigation box with image}}
| {{yes2}} <tt>NavFrame</tt>   || {{no}}
| {{yes2}} <tt>NavFrame</tt> || style="background-color:#efefef;" | NavHead
| {{no}} || inherit || {{no}} ||  
| {{yes2}} Upper left || {{no}} || {{no}} || {{tl|SlovakPMs}}
|-
|-
|align="left"| {{tl|Dynamic navigation box}}
| align="left" | {{tl|Navbox generic}}
| {{yes2}} <tt>collapsible</tt> || {{no}}
| {{yes2}} <tt>collapsible</tt> || style="background-color:#ccccff;" | navbox
| {{no}} || inherit || {{yes}} || {{tl|CSUHeads}}
| {{no}} || {{yes}} || {{yes}} || {{tl|Dilbert}}
|-
|-
|align="left"| {{tl|Dynamic navigation box with image}}
| align="left" | {{tl|Navbox generic with image}}
| {{yes2}} <tt>NavFrame</tt>   || {{yes2}} Upper left
| {{yes2}} <tt>collapsible</tt> || style="background-color:#ccccff;" | navbox
| {{no}} || inherit || {{no}} || {{tl|SlovakPMs}}
| {{yes2}} Right-hand side || {{yes}} || {{yes}} || {{tl|Jewish life}}
|-
|-
|align="left"| {{tl|Navbox generic}}
| align="left" | {{tl|NavigationBox}}
| {{yes2}} <tt>collapsible</tt> || {{no}}
| {{no}} || style="background-color:#ccccff;" | navbox
| {{yes}} || inherit || {{yes}} || {{tl|Dilbert}}
| {{yes2}} Right of title+body || {{no}} || {{no}} || {{tl|EPA}}
|-
|-
|align="left"| {{tl|Navbox generic with image}}
| colspan="7" style="border-left-style:hidden; border-right-style:hidden;"|  
| {{yes2}} <tt>collapsible</tt> || {{yes2}} Right-hand side
| {{yes}} || inherit || {{yes}} ||  
|-
|-
|align="left"| {{tl|NavigationBox}}
| align="left" | {{[[Commons:Template:NavigationBox|Commons:NavigationBox]]}}
| {{no}}                       || {{yes2}} Right of title+body
| {{no}} || style="background-color:#ccccff;" | #ccccff
| {{no}}  ||style="background-color:#ccccff;"| #ccccff || {{no}} || {{tl|EPA}}
| {{yes2}} Right of title+body || {{no}} || {{no}} ||
|-
|-
|colspan="7" style="border-left-style:hidden; border-right-style:hidden;"|  
| align="left" | {{[[Commons:Template:Dynamic navigation box|Commons:Dynamic navigation box]]}}
| {{yes2}} <tt>NavFrame</tt> || style="background-color:#ccccff;" | #ccccff
| {{no}} || {{no}} || {{no}} ||
|-
|-
|align="left"| {{[[Commons:Template:NavigationBox|Commons:NavigationBox]]}}
| align="left" | {{[[Commons:Template:Dynamic navigation box with image|Commons:Dynamic navigation box with image]]}}&nbsp;
| {{no}}                        || {{yes2}} Right of title+body
| {{yes2}} <tt>NavFrame</tt> || style="background-color:#efefef;" | NavHead
| {{no}}  ||style="background-color:#ccccff;"| #ccccff || {{no}} ||
| {{yes2}} Upper left || {{no}} || {{no}} ||
|-
|-
|align="left"| {{[[Commons:Template:Dynamic navigation box|Commons:Dynamic navigation box]]}}
| colspan="7" style="border-left-style:hidden; border-right-style:hidden;"|  
| {{yes2}} <tt>NavFrame</tt>    || {{no}}
| {{no}}  ||style="background-color:#ccccff;"| #ccccff || {{no}}  ||
|-
|-
|align="left"| {{[[Commons:Template:Dynamic navigation box with image|Commons:Dynamic navigation box with image]]}}&nbsp;
| 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>
| {{yes2}} <tt>NavFrame</tt>   || {{yes2}} Upper left
| {{no}}  || inherit || {{no}}  ||
|}
|}


{|class="wikitable" style="margin-left:auto; margin-right:auto; text-align:center; font-size:90%;"
{|class="wikitable" style="margin-left:auto; margin-right:auto; text-align:center; font-size:90%;"
|+ NavFrame div vs. Collapsible table
|-
!style="text-align:left; padding-left:4px;"| {{Tnavbar|Navigational_templates|plain=1}}
!style="text-align:left; padding-left:4px;"| {{Tnavbar|Navigational_templates|plain=1}}
! CSS class
! Classes used
! collapses when<sup>†</sup> !! custom initial&nbsp;state !! Default header color !! Nesting
! Collapses when !! Custom initial&nbsp;state !! Nesting
! Header color !! Font size
|-
|-
|align="left"| <tt>NavFrame</tt>
| align="left" | [[Wikipedia:NavFrame|NavFrame div]]
| [[Wikipedia:NavFrame|NavFrame]]
| NavFrame, NavHead, NavContent
| 3+ of the same || {{no}} ||style="background-color:#efefef;"| #efefef || {{yes}}
| 3+ of the same || {{no}} || {{yes}}
| style="background-color:#efefef;" | #efefef || NavFrame: 95%<br>NavHead: 100%<br>NavContent: 100%
|-
|-
|align="left"| <tt>collapsible</tt>
| align="left" | [[Wikipedia:NavFrame#Collapsible tables|Collapsible table]]
| navbox, [[Wikipedia:NavFrame#Collapsible tables|collapsible]]
| collapsible, navbox
| 2+ of the same || {{yes}} ||style="background-color:#ccccff;"| #ccccff || {{no}}
| 2+ of the same || {{yes}} || {{no}}
| style="background-color:#ccccff;"| #ccccff || navbox: 90%
|-
|-
|colspan="5" align="left"| <small>† For the technically minded, see [[MediaWiki:Common.js]].</small>
| 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]].
|}<noinclude>
|}<noinclude>


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

Version vom 19. Februar 2007, 21:08 Uhr

Navigation template feature comparison
Vorlage:Tnavbar collapsible Header color 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 of body Vorlage:No Vorlage:No {{Cetaceans}}
{{Navigation with columns}} Vorlage:Yes2 NavFrame NavHead Vorlage:No Vorlage:No Vorlage:No
{{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:No Vorlage:Yes Vorlage:Yes {{Dilbert}}
{{Navbox generic with image}} Vorlage:Yes2 collapsible navbox Vorlage:Yes2 Right-hand side Vorlage:Yes Vorlage: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
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.
NavFrame div vs. Collapsible table
Vorlage:Tnavbar Classes used Collapses when Custom initial state Nesting Header color Font size
NavFrame div NavFrame, NavHead, NavContent 3+ of the same Vorlage:No Vorlage:Yes #efefef NavFrame: 95%
NavHead: 100%
NavContent: 100%
Collapsible table collapsible, navbox 2+ of the same Vorlage:Yes Vorlage:No #ccccff navbox: 90%
Note: CSS classes are defined in Common.css and JavaScript for collapsible templates is located in Common.js.