Zum Inhalt springen

Vorlage:Navigation templates: Unterschied zwischen den Versionen

updated info on nested templates, with links to examples
(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.)
(updated info on nested templates, with links to examples)
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>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.
| 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 61: Zeile 63:
!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<sup>1</sup>
! Classes used<sup>1</sup>
! Collapses when !! Custom initial&nbsp;state !! Nesting
! Collapses when !! Custom initial&nbsp;state !! Nesting<sup>2</sup>
! Header color<sup>2</sup> !! Font size<sup>2</sup> !! Padding<sup>2</sup>
! Header color<sup>3</sup> !! Font size<sup>3</sup> !! Padding<sup>3</sup>
|-
|-
| align="left" | [[Wikipedia:NavFrame|NavFrame div]]
| align="left" | [[Wikipedia:NavFrame|NavFrame div]]
Zeile 71: Zeile 73:
| 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}} || {{yes2}}Yes<sup>3</sup>
| 2+ of the same || {{yes}} || {{yes}}
| style="background-color:#ccccff;"| #ccccff || navbox: 90% || 5px
| style="background-color:#ccccff;"| #ccccff || navbox: 90% || 5px
|-
|-
| 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}}.
| 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> Both types can be nested, with different results. Clicking "show" on a [http://en.wikipedia.org/w/index.php?title=Template:Niger-Congo-speaking&oldid=89634749 nested NavFrame template] or an [http://en.wikipedia.org/w/index.php?title=Template:Niger-Congo-speaking&oldid=110162188 outer NavFrame template with nested Collapsible templates] will open it with inner boxes collapsed, while
a [http://en.wikipedia.org/w/index.php?title=Template:Niger-Congo-speaking&oldid=110166620 nested Collapsible template] will open with the inner boxes expanded.<br>
<sup>3</sup> Defaults can be changed, for example {{tl|Navigation}} contains: <code><nowiki><div class="NavContent" style="font-size:0.9em"></nowiki></code>.
|}<noinclude>
|}<noinclude>


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