Difference between revisions of "Template:Navbox"

From QBWiki
Jump to navigation Jump to search
fix>AxelOxenstierna
 
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Navbox/core
+
<table cellspacing="0" style="border:1px solid #aaa; width:100%; margin:auto; clear:both; font-size:88%; text-align:center; padding:2px;  background:#fdfdfd;"><tr><td style="padding:2px;">
|name = {{{name<noinclude>|{{FULLPAGENAME}}</noinclude>}}}
+
<table cellspacing="0" class="nowraplinks  ;;">
|navbar = {{{navbar|}}}
+
<tr><th style="text-align:center; padding-left:1em; padding-right:1em;  background:#ccccff;  background:#ddddff;;{{{titlestyle|}}}" colspan=3>
|state = {{{state|autocollapse}}}
+
{{if|test={{{nav|}}}|then=<div style="float:left; width:6em;text-align:left;">{{tnavbar|{{{nav|}}}}}</div>}}
|title = {{{title|}}}
+
<span style="font-size:110%;">{{{title|}}}</span>
|image = {{{image|}}}
+
</th></tr>
|imageleft = {{{imageleft|}}}
+
<tr style="height:2px;"><td></td></tr>
 +
{{if|test={{{abovetext|}}}|then=<tr><td style="text-align:center; padding-left:1em; padding-right:1em;  background:#ddddff;  background:#e6e6ff;;" colspan="3">{{{abovetext|}}}</td></tr>}}
 +
<tr style="height:2px;"><td></td></tr>
 +
<tr>
 +
<td style="white-space:nowrap; text-align:right; font-weight:bold; padding-left:1em; padding-right:1em;  background:#ddddff;  background:#e6e6ff;;{{{groupstyle|}}};">{{{group1|}}}</td>
 +
<td style="text-align:left;border-left:2px solid #fdfdfd;width:100%;padding:0px;  background:transparent;;;" class="navbox-list navbox-odd">
 +
<div style="padding:0em 0.25em">{{{list1|}}}</div>
 +
</td>
 +
<td style="width:0%;padding:0px 0px 0px 2px;" rowspan=21>{{{image|}}}</td>
 +
</tr>
 +
<!-----Remaining groups/lists----->
 +
{{if|test={{{group2|}}}{{{list2|}}}|then=
 +
<tr style="height:2px"><td></td></tr>
 +
<tr>
 +
<td style="white-space:nowrap; text-align:right; font-weight:bold; padding-left:1em; padding-right:1em;  background:#ddddff;  background:#e6e6ff;;{{{groupstyle|}}};">{{{group2|}}}</td>
 +
<td style="text-align:left;border-left:2px solid #fdfdfd;width:100%;padding:0px;  background:#f7f7f7;;;" class="navbox-list navbox-even">
 +
<div style="padding:0em 0.25em">{{{list2|}}}</div>
 +
</td>
 +
</tr>
 +
}}
 +
{{if|test={{{group3|}}}{{{list3|}}}|then=
 +
<tr style="height:2px"><td></td></tr>
 +
<tr>
 +
<td style="white-space:nowrap; text-align:right; font-weight:bold; padding-left:1em; padding-right:1em;  background:#ddddff;  background:#e6e6ff;;{{{groupstyle|}}};">{{{group3|}}}</td>
 +
<td style="text-align:left;border-left:2px solid #fdfdfd;width:100%;padding:0px;  background:transparent;;;" class="navbox-list navbox-even">
 +
<div style="padding:0em 0.25em">{{{list3|}}}</div>
 +
</td>
 +
</tr>
 +
}}
 +
{{if|test={{{group4|}}}{{{list4|}}}|then=
 +
<tr style="height:2px"><td></td></tr>
 +
<tr>
 +
<td style="white-space:nowrap; text-align:right; font-weight:bold; padding-left:1em; padding-right:1em;  background:#ddddff;  background:#e6e6ff;;{{{groupstyle|}}};">{{{group4|}}}</td>
 +
<td style="text-align:left;border-left:2px solid #fdfdfd;width:100%;padding:0px;  background:#f7f7f7;;;" class="navbox-list navbox-even">
 +
<div style="padding:0em 0.25em">{{{list4|}}}</div>
 +
</td>
 +
</tr>
 +
}}
 +
{{if|test={{{group5|}}}{{{list5|}}}|then=
 +
<tr style="height:2px"><td></td></tr>
 +
<tr>
 +
<td style="white-space:nowrap; text-align:right; font-weight:bold; padding-left:1em; padding-right:1em;  background:#ddddff;  background:#e6e6ff;;{{{groupstyle|}}};">{{{group5|}}}</td>
 +
<td style="text-align:left;border-left:2px solid #fdfdfd;width:100%;padding:0px;  background:transparent;;;" class="navbox-list navbox-even">
 +
<div style="padding:0em 0.25em">{{{list5|}}}</div>
 +
</td>
 +
</tr>
 +
}}
 +
{{if|test={{{group6|}}}{{{list6|}}}|then=
 +
<tr style="height:2px"><td></td></tr>
 +
<tr>
 +
<td style="white-space:nowrap; text-align:right; font-weight:bold; padding-left:1em; padding-right:1em;  background:#ddddff;  background:#e6e6ff;;{{{groupstyle|}}};">{{{group6|}}}</td>
 +
<td style="text-align:left;border-left:2px solid #fdfdfd;width:100%;padding:0px;  background:#f7f7f7;;;" class="navbox-list navbox-even">
 +
<div style="padding:0em 0.25em">{{{list6|}}}</div>
 +
</td>
 +
</tr>
 +
}}
 +
{{if|test={{{group7|}}}{{{list7|}}}|then=
 +
<tr style="height:2px"><td></td></tr>
 +
<tr>
 +
<td style="white-space:nowrap; text-align:right; font-weight:bold; padding-left:1em; padding-right:1em;  background:#ddddff;  background:#e6e6ff;;{{{groupstyle|}}};">{{{group7|}}}</td>
 +
<td style="text-align:left;border-left:2px solid #fdfdfd;width:100%;padding:0px;  background:transparent;;;" class="navbox-list navbox-even">
 +
<div style="padding:0em 0.25em">{{{list7|}}}</div>
 +
</td>
 +
</tr>
 +
}}
 +
{{if|test={{{group8|}}}{{{list8|}}}|then=
 +
<tr style="height:2px"><td></td></tr>
 +
<tr>
 +
<td style="white-space:nowrap; text-align:right; font-weight:bold; padding-left:1em; padding-right:1em;  background:#ddddff;  background:#e6e6ff;;{{{groupstyle|}}};">{{{group8|}}}</td>
 +
<td style="text-align:left;border-left:2px solid #fdfdfd;width:100%;padding:0px;  background:#f7f7f7;;;" class="navbox-list navbox-even">
 +
<div style="padding:0em 0.25em">{{{list8|}}}</div>
 +
</td>
 +
</tr>
 +
}}
 +
{{if|test={{{group9|}}}{{{list9|}}}|then=
 +
<tr style="height:2px"><td></td></tr>
 +
<tr>
 +
<td style="white-space:nowrap; text-align:right; font-weight:bold; padding-left:1em; padding-right:1em;  background:#ddddff;  background:#e6e6ff;;{{{groupstyle|}}};">{{{group9|}}}</td>
 +
<td style="text-align:left;border-left:2px solid #fdfdfd;width:100%;padding:0px;  background:transparent;;;" class="navbox-list navbox-even">
 +
<div style="padding:0em 0.25em">{{{list9|}}}</div>
 +
</td>
 +
</tr>
 +
}}
 +
{{if|test={{{group10|}}}{{{list10|}}}|then=
 +
<tr style="height:2px"><td></td></tr>
 +
<tr>
 +
<td style="white-space:nowrap; text-align:right; font-weight:bold; padding-left:1em; padding-right:1em;  background:#ddddff;  background:#e6e6ff;;{{{groupstyle|}}};">{{{group10|}}}</td>
 +
<td style="text-align:left;border-left:2px solid #fdfdfd;width:100%;padding:0px;  background:#f7f7f7;;;" class="navbox-list navbox-even">
 +
<div style="padding:0em 0.25em">{{{list10|}}}</div>
 +
</td>
 +
</tr>
 +
}}
 +
{{if|test={{{group11|}}}{{{list11|}}}|then=
 +
<tr style="height:2px"><td></td></tr>
 +
<tr>
 +
<td style="white-space:nowrap; text-align:right; font-weight:bold; padding-left:1em; padding-right:1em;  background:#ddddff;  background:#e6e6ff;;{{{groupstyle|}}};">{{{group11|}}}</td>
 +
<td style="text-align:left;border-left:2px solid #fdfdfd;width:100%;padding:0px;  background:transparent;;;" class="navbox-list navbox-even">
 +
<div style="padding:0em 0.25em">{{{list11|}}}</div>
 +
</td>
 +
</tr>
 +
}}
 +
{{if|test={{{group12|}}}{{{list12|}}}|then=
 +
<tr style="height:2px"><td></td></tr>
 +
<tr>
 +
<td style="white-space:nowrap; text-align:right; font-weight:bold; padding-left:1em; padding-right:1em;  background:#ddddff;  background:#e6e6ff;;{{{groupstyle|}}};">{{{group12|}}}</td>
 +
<td style="text-align:left;border-left:2px solid #fdfdfd;width:100%;padding:0px;  background:#f7f7f7;;;" class="navbox-list navbox-even">
 +
<div style="padding:0em 0.25em">{{{list12|}}}</div>
 +
</td>
 +
</tr>
 +
}}
 +
{{if|test={{{group13|}}}{{{list13|}}}|then=
 +
<tr style="height:2px"><td></td></tr>
 +
<tr>
 +
<td style="white-space:nowrap; text-align:right; font-weight:bold; padding-left:1em; padding-right:1em;  background:#ddddff;  background:#e6e6ff;;{{{groupstyle|}}};">{{{group13|}}}</td>
 +
<td style="text-align:left;border-left:2px solid #fdfdfd;width:100%;padding:0px;  background:transparent;;;" class="navbox-list navbox-even">
 +
<div style="padding:0em 0.25em">{{{list13|}}}</div>
 +
</td>
 +
</tr>
 +
}}
 +
{{if|test={{{group14|}}}{{{list14|}}}|then=
 +
<tr style="height:2px"><td></td></tr>
 +
<tr>
 +
<td style="white-space:nowrap; text-align:right; font-weight:bold; padding-left:1em; padding-right:1em;  background:#ddddff;  background:#e6e6ff;;{{{groupstyle|}}};">{{{group14|}}}</td>
 +
<td style="text-align:left;border-left:2px solid #fdfdfd;width:100%;padding:0px;  background:#f7f7f7;;;" class="navbox-list navbox-even">
 +
<div style="padding:0em 0.25em">{{{list14|}}}</div>
 +
</td>
 +
</tr>
 +
}}
 +
{{if|test={{{group15|}}}{{{list15|}}}|then=
 +
<tr style="height:2px"><td></td></tr>
 +
<tr>
 +
<td style="white-space:nowrap; text-align:right; font-weight:bold; padding-left:1em; padding-right:1em;  background:#ddddff;  background:#e6e6ff;;{{{groupstyle|}}};">{{{group15|}}}</td>
 +
<td style="text-align:left;border-left:2px solid #fdfdfd;width:100%;padding:0px;  background:transparent;;;" class="navbox-list navbox-even">
 +
<div style="padding:0em 0.25em">{{{list15|}}}</div>
 +
</td>
 +
</tr>
 +
}}
 +
<!-----Below----->
 +
{{if|test={{{belowtext|}}}|then=<tr style="height:2px;"><td></td></tr>
 +
<tr><td style="text-align:center; padding-left:1em; padding-right:1em;  background:#ddddff;  background:#e6e6ff;" colspan="3">{{{belowtext|}}}</td></tr>}}
 +
 +
</table>
 +
</td></tr></table><noinclude>This template is not the same as [[wikipedia:Template:Navbox]], even though the use is similar.
  
|imagespan = {{#expr:{{#if:{{{body|}}}{{{list1|}}}|1|0}} +{{#if:{{{list2|}}}|1|0}} +{{#if:{{{list3|}}}|1|0}} +{{#if:{{{list4|}}}|1|0}} +{{#if:{{{list5|}}}|1|0}} +{{#if:{{{list6|}}}|1|0}} +{{#if:{{{list7|}}}|1|0}} +{{#if:{{{list8|}}}|1|0}} +{{#if:{{{list9|}}}|1|0}} +{{#if:{{{list10|}}}|1|0}} +{{#if:{{{list11|}}}|1|0}} +{{#if:{{{list12|}}}|1|0}} +{{#if:{{{list13|}}}|1|0}} +{{#if:{{{list14|}}}|1|0}} +{{#if:{{{list15|}}}|1|0}} +{{#if:{{{list16|}}}|1|0}} +{{#if:{{{list17|}}}|1|0}} +{{#if:{{{list18|}}}|1|0}} +{{#if:{{{list19|}}}|1|0}} +{{#if:{{{list20|}}}|1|0}}}}
+
This template has been edited to use pure-wiki code, and not requiring any specific extension found on Wikipedia.
  
|span = {{#if:{{{group1|}}}{{{group2|}}}{{{group3|}}}{{{group4|}}}{{{group5|}}}{{{group6|}}}{{{group7|}}}{{{group8|}}}{{{group9|}}}{{{group10|}}}{{{group11|}}}{{{group12|}}}{{{group13|}}}{{{group14|}}}{{{group15|}}}{{{group16|}}}{{{group17|}}}{{{group18|}}}{{{group19|}}}{{{group20|}}}{{{imageleft|}}}|{{#if:{{{image|}}}|3|2}}|{{#if:{{{image|}}}|2|1}}}}
+
It has also been heavily simplified. Expand with more parameters if you (really) want to.
  
|nogroups = {{#if:{{{group1|}}}{{{group2|}}}{{{group3|}}}{{{group4|}}}{{{group5|}}}{{{group6|}}}{{{group7|}}}{{{group8|}}}{{{group9|}}}{{{group10|}}}{{{group11|}}}{{{group12|}}}{{{group13|}}}{{{group14|}}}{{{group15|}}}{{{group16|}}}{{{group17|}}}{{{group18|}}}{{{group19|}}}{{{group20|}}}|false|true}}
+
Courtesy of [http://robowiki.net/wiki/Template:Navbox Robowiki]
  
|bodystyle = {{{style|}}}{{{bodystyle|}}}
 
|titlestyle = {{{titlestyle|}}}
 
|abovestyle = background:#ddddff;{{{abovestyle|}}}
 
|belowstyle = background:#ddddff;{{{belowstyle|}}}
 
  
|above = {{{above|}}}
+
{{Navbox
|below = {{{below|}}}
+
|title=[[Movement]]
 +
|group1=[[Movement]]
 +
|list1=[[WaveSurfing]]{{dot}}[[PatternMovement]]{{dot}}[[CornerMovement]]
 +
|list13=Last list
 +
}}
  
|gs = white-space:nowrap;background:#ddddff;text-align:right;{{{groupstyle|}}}
+
<pre>
|os = width:100%;font-size:95%;{{{liststyle|}}}{{{oddstyle|}}}
+
{{Navbox
|es = width:100%;font-size:95%;background:#f7f7f7;{{{liststyle|}}}{{{evenstyle|}}}
+
|title=[[Movement]]
 +
|group1=[[Movement]]
 +
|list1=[[WaveSurfing]]{{dot}}[[PatternMovement]]{{dot}}[[CornerMovement]]
 +
|list13=Last list
 +
}}</pre>
  
|g1 = {{{group1|}}}
+
Other parameters are:
|g2 = {{{group2|}}}
+
* <tt>|nav={{{MAINPAGENAME}}}</tt> (Set if you want to include {{tl|tnavbar}} to the left of the title)
|g3 = {{{group3|}}}
+
* <tt>|abovetext=</tt> (Additional text below title but above groups)
|g4 = {{{group4|}}}
+
* <tt>|belowtext=</tt> (Additional text below groups)
|g5 = {{{group5|}}}
+
* <tt>|image=</tt> (Image to the right of the groups)
|g6 = {{{group6|}}}
+
* <tt>|groupstyle=</tt> (Customizable the style of the groupboxen)
|g7 = {{{group7|}}}
+
* <tt>|titlestyle=</tt> (Customizable the style of the titlebox)
|g8 = {{{group8|}}}
 
|g9 = {{{group9|}}}
 
|g10 = {{{group10|}}}
 
|g11 = {{{group11|}}}
 
|g12 = {{{group12|}}}
 
|g13 = {{{group13|}}}
 
|g14 = {{{group14|}}}
 
|g15 = {{{group15|}}}
 
|g16 = {{{group16|}}}
 
|g17 = {{{group17|}}}
 
|g18 = {{{group18|}}}
 
|g19 = {{{group19|}}}
 
|g20 = {{{group20|}}}
 
  
|l1 = {{{body|}}}{{{list1|}}}{{{category|}}}
+
See [[wikipedia:Template:Navbox]] for examples.
|l2 = {{{list2|}}}
 
|l3 = {{{list3|}}}
 
|l4 = {{{list4|}}}
 
|l5 = {{{list5|}}}
 
|l6 = {{{list6|}}}
 
|l7 = {{{list7|}}}
 
|l8 = {{{list8|}}}
 
|l9 = {{{list9|}}}
 
|l10 = {{{list10|}}}
 
|l11 = {{{list11|}}}
 
|l12 = {{{list12|}}}
 
|l13 = {{{list13|}}}
 
|l14 = {{{list14|}}}
 
|l15 = {{{list15|}}}
 
|l16 = {{{list16|}}}
 
|l17 = {{{list17|}}}
 
|l18 = {{{list18|}}}
 
|l19 = {{{list19|}}}
 
|l20 = {{{list20|}}}
 
 
 
}}<noinclude>
 
{{pp-template|small=yes}}
 

Latest revision as of 11:51, 22 December 2020

This template is not the same as wikipedia:Template:Navbox, even though the use is similar.

This template has been edited to use pure-wiki code, and not requiring any specific extension found on Wikipedia.

It has also been heavily simplified. Expand with more parameters if you (really) want to.

Courtesy of Robowiki


{{Navbox
|title=[[Movement]]
|group1=[[Movement]]
|list1=[[WaveSurfing]]{{dot}}[[PatternMovement]]{{dot}}[[CornerMovement]]
|list13=Last list
}}

Other parameters are:

  • |nav={{{MAINPAGENAME}}} (Set if you want to include {{tnavbar}}
to the left of the title)
  • |abovetext= (Additional text below title but above groups)
  • |belowtext= (Additional text below groups)
  • |image= (Image to the right of the groups)
  • |groupstyle= (Customizable the style of the groupboxen)
  • |titlestyle= (Customizable the style of the titlebox)

See wikipedia:Template:Navbox for examples.