Difference between revisions of "Template:Navigation templates"

From BESA® Wiki
Jump to: navigation, search
(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)
Line 1: Line 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}}
+
| align="left" | {{tl|Navigation}}
| {{yes2}} <tt>NavFrame</tt>   || {{no}}
+
| {{yes2}} <tt>NavFrame</tt> || style="background-color:#efefef;" | NavHead
| {{no}} || inherit || {{no}} || {{tl|OPEC}}
+
| {{no}} || {{no}} || {{no}} || {{tl|OPEC}}
 
|-
 
|-
|align="left"| {{tl|Navigation with image}}
+
| align="left" | {{tl|Navigation with image}}
| {{yes2}} <tt>NavFrame</tt>   || {{yes2}} Left/right of body
+
| {{yes2}} <tt>NavFrame</tt> || style="background-color:#efefef;" | NavHead
| {{no}} || inherit || {{no}} || {{tl|Cetaceans}}
+
| {{yes2}} Left/right of body || {{no}} || {{no}} || {{tl|Cetaceans}}
 
|-
 
|-
|align="left"| {{tl|Navigation with columns}}
+
| align="left"| {{tl|Navigation with columns}}
| {{yes2}} <tt>NavFrame</tt>   || {{no}}
+
| {{yes2}} <tt>NavFrame</tt> || style="background-color:#efefef;" | NavHead
| {{no}} || inherit || {{no}} ||  
+
| {{no}} || {{no}} || {{no}} ||  
 
|-
 
|-
|align="left"| {{tl|Dynamic navigation box}}
+
| align="left" | {{tl|Dynamic navigation box}}
| {{yes2}} <tt>collapsible</tt> || {{no}}
+
| {{yes2}} <tt>collapsible</tt> || style="background-color:#ccccff;" | navbox
| {{no}} || inherit || {{yes}} || {{tl|CSUHeads}}
+
| {{no}} || {{no}} || {{yes}} || {{tl|CSUHeads}}
 
|-
 
|-
|align="left"| {{tl|Dynamic navigation box with image}}
+
| align="left" | {{tl|Dynamic navigation box with image}}
| {{yes2}} <tt>NavFrame</tt>   || {{yes2}} Upper left
+
| {{yes2}} <tt>NavFrame</tt> || style="background-color:#efefef;" | NavHead
| {{no}} || inherit || {{no}} || {{tl|SlovakPMs}}
+
| {{yes2}} Upper left || {{no}} || {{no}} || {{tl|SlovakPMs}}
 
|-
 
|-
|align="left"| {{tl|Navbox generic}}
+
| align="left" | {{tl|Navbox generic}}
| {{yes2}} <tt>collapsible</tt> || {{no}}
+
| {{yes2}} <tt>collapsible</tt> || style="background-color:#ccccff;" | navbox
| {{yes}} || inherit || {{yes}} || {{tl|Dilbert}}
+
| {{no}} || {{yes}} || {{yes}} || {{tl|Dilbert}}
 
|-
 
|-
|align="left"| {{tl|Navbox generic with image}}
+
| align="left" | {{tl|Navbox generic with image}}
| {{yes2}} <tt>collapsible</tt> || {{yes2}} Right-hand side
+
| {{yes2}} <tt>collapsible</tt> || style="background-color:#ccccff;" | navbox
| {{yes}} || inherit || {{yes}} ||  
+
| {{yes2}} Right-hand side || {{yes}} || {{yes}} || {{tl|Jewish life}}
 
|-
 
|-
|align="left"| {{tl|NavigationBox}}
+
| align="left" | {{tl|NavigationBox}}
| {{no}}                       || {{yes2}} Right of title+body
+
| {{no}} || style="background-color:#ccccff;" | navbox
| {{no}} ||style="background-color:#ccccff;"| #ccccff || {{no}} || {{tl|EPA}}
+
| {{yes2}} Right of title+body || {{no}} || {{no}} || {{tl|EPA}}
 
|-
 
|-
|colspan="7" style="border-left-style:hidden; border-right-style:hidden;"|  
+
| colspan="7" style="border-left-style:hidden; border-right-style:hidden;"|  
 
|-
 
|-
|align="left"| {{[[Commons:Template:NavigationBox|Commons: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}} ||
+
| {{yes2}} Right of title+body || {{no}} || {{no}} ||
 
|-
 
|-
|align="left"| {{[[Commons:Template:Dynamic navigation box|Commons:Dynamic navigation box]]}}
+
| align="left" | {{[[Commons:Template:Dynamic navigation box|Commons:Dynamic navigation box]]}}
| {{yes2}} <tt>NavFrame</tt>   || {{no}}
+
| {{yes2}} <tt>NavFrame</tt> || style="background-color:#ccccff;" | #ccccff
| {{no}}  ||style="background-color:#ccccff;"| #ccccff || {{no}} ||
+
| {{no}} || {{no}} || {{no}} ||
 
|-
 
|-
|align="left"| {{[[Commons:Template:Dynamic navigation box with image|Commons:Dynamic navigation box with image]]}}&nbsp;
+
| align="left" | {{[[Commons:Template:Dynamic navigation box with image|Commons:Dynamic navigation box with image]]}}&nbsp;
| {{yes2}} <tt>NavFrame</tt>   || {{yes2}} Upper left
+
| {{yes2}} <tt>NavFrame</tt> || style="background-color:#efefef;" | NavHead
| {{no}} || inherit || {{no}} ||
+
| {{yes2}} Upper left || {{no}} || {{no}} ||
 +
|-
 +
| 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>
 
|}
 
|}
  
 
{|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>

Revision as of 20:08, 19 February 2007

Navigation template feature comparison
Template:Tnavbar collapsible Header color Image Groups Style parameter Example
{{Navigation}} Template:Yes2 NavFrame NavHead Template:No Template:No Template:No {{OPEC}}
{{Navigation with image}} Template:Yes2 NavFrame NavHead Template:Yes2 Left/right of body Template:No Template:No {{Cetaceans}}
{{Navigation with columns}} Template:Yes2 NavFrame NavHead Template:No Template:No Template:No
{{Dynamic navigation box}} Template:Yes2 collapsible navbox Template:No Template:No Template:Yes {{CSUHeads}}
{{Dynamic navigation box with image}} Template:Yes2 NavFrame NavHead Template:Yes2 Upper left Template:No Template:No {{SlovakPMs}}
{{Navbox generic}} Template:Yes2 collapsible navbox Template:No Template:Yes Template:Yes {{Dilbert}}
{{Navbox generic with image}} Template:Yes2 collapsible navbox Template:Yes2 Right-hand side Template:Yes Template:Yes {{Jewish life}}
{{NavigationBox}} Template:No navbox Template:Yes2 Right of title+body Template:No Template:No {{EPA}}
{{Commons:NavigationBox}} Template:No #ccccff Template:Yes2 Right of title+body Template:No Template:No
{{Commons:Dynamic navigation box}} Template:Yes2 NavFrame #ccccff Template:No Template:No Template:No
{{Commons:Dynamic navigation box with image}}  Template:Yes2 NavFrame NavHead Template:Yes2 Upper left Template:No Template: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.</div>
NavFrame div vs. Collapsible table
Template:Tnavbar Classes used Collapses when Custom initial state Nesting Header color Font size
NavFrame div NavFrame, NavHead, NavContent 3+ of the same Template:No Template:Yes #efefef NavFrame: 95%
NavHead: 100%
NavContent: 100%
Collapsible table collapsible, navbox 2+ of the same Template:Yes Template:No #ccccff navbox: 90%
Note: CSS classes are defined in Common.css and JavaScript for collapsible templates is located in Common.js.