Template:Navbox: Difference between revisions
From Tears of Themis Wiki
imported>Harmonea (Initial credit to DragaliaLost wiki) |
imported>Harmonea (flex conversion copied from Lakelimbo of Wikirby) |
||
Line 3: | Line 3: | ||
Please do not edit without discussion first as this is a VERY complex template. | Please do not edit without discussion first as this is a VERY complex template. | ||
-->{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=</div>|none=|#default=< | -->{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=</div>|none=|#default=<div class="navbox {{{bodyclass|}}}" <!-- | ||
-->style="{{{bodystyle|}}};{{{style|}}}">< | -->style="{{{bodystyle|}}};{{{style|}}}"><div style="padding:2px">}}<!-- | ||
-->< | --><div class="nowraplinks {{#if:{{{title|}}}|{{#switch:{{{state|}}}|plain|off=|<!-- | ||
-->#default=mw-collapsible {{#if:{{{state|}}}|{{{state}}}|mw-collapsed}}}}}} {{#switch:{{{border|{{{1|}}}}}}|<!-- | -->#default=mw-collapsible {{#if:{{{state|}}}|{{{state}}}|mw-collapsed}}}}}} {{#switch:{{{border|{{{1|}}}}}}|<!-- | ||
-->subgroup|child|none=navbox-subgroup" style="width:100%;{{{bodystyle|}}};{{{style|}}}|<!-- | -->subgroup|child|none=navbox-subgroup" style="width:100%;{{{bodystyle|}}};{{{style|}}}|<!-- | ||
-->#default=" style="width:100%;background:transparent;color:inherit}};{{{innerstyle|}}};" data-expandtext="show" data-collapsetext="hide"><!-- | -->#default=" style="width:100%;background:transparent;color:inherit}};{{{innerstyle|}}};" data-expandtext="show" data-collapsetext="hide"><!-- | ||
---Title and Navbar--- | ---Title and Navbar--- | ||
-->{{#if:{{{title|}}}| | -->{{#if:{{{title|}}}|{{#if:{{{titlegroup|}}}|<!-- | ||
-->< | --><div class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{titlegroupstyle|}}}">{{{titlegroup|}}}</div><!-- | ||
-->< | --><div style="border-left:2px solid #fdfdfd;width:100%;|<div style="}}{{{basestyle|}}};{{{titlestyle|}}}" <!-- | ||
-->class="navbox-title"><!-- | -->class="navbox-title"><!-- | ||
Line 30: | Line 28: | ||
--><span class="{{{titleclass|}}}" style="font-size:{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=100|#default=110}}%;"><!-- | --><span class="{{{titleclass|}}}" style="font-size:{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=100|#default=110}}%;"><!-- | ||
-->{{{title}}}</span></ | -->{{{title}}}</span></div>}}<!-- | ||
---Above--- | ---Above--- | ||
-->{{#if:{{{above|}}}|<!-- | -->{{#if:{{{above|}}}|<div class="row"<!-- | ||
-->{{#if:{{{title|}}}| | -->{{#if:{{{title|}}}|style="margin-top:2px"}}><div class="col-sm-12 col-md-12 navbox-abovebelow" style="<!-- | ||
-->{{{basestyle|}}}; {{{abovestyle|}}}"><!-- | |||
-- | -->{{{above}}}</div></div>}}<!-- | ||
---Body--- | ---Body--- | ||
---First group/list and | ---First group/list and leftimage (due to flex, right image has been moved to the bottom)--- | ||
-->{{#if:{{{list1|}}}|{{#if:{{{title|}}}{{{above|}}}| | -->{{#if:{{{list1|}}}|<div class="row"<!-- | ||
-->{{#if:{{{title|}}}{{{above|}}}|style="margin-top:2px"}}><!-- | |||
-->{{#if:{{{imageleft|}}}|<!-- | -->{{#if:{{{imageleft|}}}|<!-- | ||
-->< | --><div class="col-sm-12 col-md-2" style="align-self:center; text-align:center;{{{imageleftstyle|}}}"><!-- | ||
-->{{{imageleft}}}</div>}}<!-- | |||
-->{{{imageleft}}}</ | |||
-->{{#if:{{{group1|}}}|< | --><div class="col-sm-12 col-md-{{#expr:12{{#if:{{{imageleft|}}}|-2}}{{#if:{{{image|}}}|-2}}}}"><div class="row"><!-- | ||
-->{{{group1}}}</ | -->{{#if:{{{group1|}}}|<div class="col-sm-12 col-md-2 navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group1style|}}}"><!-- | ||
-->{{#if:{{{groupwidth|}}}|| | -->{{{group1}}}</div><div class="col-sm-12 col-md-10" style="text-align:left;border-left-width:2px;border-left-style:solid;|<div class="col-sm-12 col-md-12" style="}}<!-- | ||
-->{{#if:{{{groupwidth|}}}||}};{{{liststyle|}}};{{{oddstyle|}}};padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}};{{{list1style|}}}"><!-- | |||
-->{{{list1}}}</div></div><!-- | |||
-->{{ | |||
---Remaining groups/lists--- | |||
--- | -->{{#if:{{{list2|}}}|<div class="row" <!-- | ||
-->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}|style="margin-top:2px">}}<!-- | |||
-->{{#if:{{{group2|}}}|<div class="col-sm-12 col-md-2 navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group2style|}}}"><!-- | |||
-->{{{group2}}}</div><div class="col-sm-12 col-md-10" style="text-align:left;border-left-width:2px;border-left-style:solid;|<div class="col-sm-12 col-md-12" style="}}<!-- | |||
-->{{#if:{{{groupwidth|}}}||}};{{{liststyle|}}};{{{oddstyle|}}};padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}};{{{list1style|}}}"><!-- | |||
-->{{{list2}}}</div></div>}}<!-- | |||
-->{{#if:{{{ | -->{{#if:{{{list3|}}}|<div class="row" <!-- | ||
-->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}| | -->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}{{{list2|}}}|style="margin-top:2px">}}<!-- | ||
-->{{#if:{{{ | -->{{#if:{{{group3|}}}|<div class="col-sm-12 col-md-2 navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group2style|}}}"><!-- | ||
-->{{{ | -->{{{group3}}}</div><div class="col-sm-12 col-md-10" style="text-align:left;border-left-width:2px;border-left-style:solid;|<div class="col-sm-12 col-md-12" style="}}<!-- | ||
-->{{#if:{{{groupwidth|}}}|| | -->{{#if:{{{groupwidth|}}}||}};{{{liststyle|}}};{{{oddstyle|}}};padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}};{{{list1style|}}}"><!-- | ||
-->{{{list3}}}</div></div>}}<!-- | |||
--> | |||
-->{{#if:{{{ | -->{{#if:{{{list4|}}}|<div class="row" style="margin-top:2px"><!-- | ||
-->{{#if:{{{group4|}}}|<div class="col-sm-12 col-md-2 navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group2style|}}}"><!-- | |||
-->{{#if:{{{ | -->{{{group4}}}</div><div class="col-sm-12 col-md-10" style="text-align:left;border-left-width:2px;border-left-style:solid;|<div class="col-sm-12 col-md-12" style="}}<!-- | ||
-->{{{ | -->{{#if:{{{groupwidth|}}}||}};{{{liststyle|}}};{{{oddstyle|}}};padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}};{{{list1style|}}}"><!-- | ||
-->{{#if:{{{groupwidth|}}}|| | -->{{{list4}}}</div></div>}}<!-- | ||
--> | |||
-->{{#if:{{{ | -->{{#if:{{{list5|}}}|<div class="row" style="margin-top:2px"><!-- | ||
-->{{#if:{{{group5|}}}|<div class="col-sm-12 col-md-2 navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group2style|}}}"><!-- | |||
-->{{#if:{{{ | -->{{{group5}}}</div><div class="col-sm-12 col-md-10" style="text-align:left;border-left-width:2px;border-left-style:solid;|<div class="col-sm-12 col-md-12" style="}}<!-- | ||
-->{{{ | -->{{#if:{{{groupwidth|}}}||}};{{{liststyle|}}};{{{oddstyle|}}};padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}};{{{list1style|}}}"><!-- | ||
-->{{#if:{{{groupwidth|}}}|| | -->{{{list5}}}</div></div>}}<!-- | ||
--> | |||
{{{ | |||
-->{{#if:{{{ | -->{{#if:{{{list6|}}}|<div class="row" style="margin-top:2px"><!-- | ||
-->{{#if:{{{group6|}}}|<div class="col-sm-12 col-md-2 navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group2style|}}}"><!-- | |||
-->{{#if:{{{ | -->{{{group6}}}</div><div class="col-sm-12 col-md-10" style="text-align:left;border-left-width:2px;border-left-style:solid;|<div class="col-sm-12 col-md-12" style="}}<!-- | ||
-->{{{ | -->{{#if:{{{groupwidth|}}}||}};{{{liststyle|}}};{{{oddstyle|}}};padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}};{{{list1style|}}}"><!-- | ||
-->{{#if:{{{groupwidth|}}}|| | -->{{{list6}}}</div></div>}}<!-- | ||
--> | |||
{{{ | |||
-->{{#if:{{{ | -->{{#if:{{{list7|}}}|<div class="row" style="margin-top:2px"><!-- | ||
-->{{#if:{{{group7|}}}|<div class="col-sm-12 col-md-2 navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group2style|}}}"><!-- | |||
-->{{#if:{{{ | -->{{{group7}}}</div><div class="col-sm-12 col-md-10" style="text-align:left;border-left-width:2px;border-left-style:solid;|<div class="col-sm-12 col-md-12" style="}}<!-- | ||
-->{{{ | -->{{#if:{{{groupwidth|}}}||}};{{{liststyle|}}};{{{oddstyle|}}};padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}};{{{list1style|}}}"><!-- | ||
-->{{#if:{{{groupwidth|}}}|| | -->{{{list7}}}</div></div>}}<!-- | ||
--> | |||
{{{ | |||
-->{{#if:{{{ | -->{{#if:{{{list8|}}}|<div class="row" style="margin-top:2px"><!-- | ||
-->{{#if:{{{group8|}}}|<div class="col-sm-12 col-md-2 navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group2style|}}}"><!-- | |||
-->{{#if:{{{ | -->{{{group8}}}</div><div class="col-sm-12 col-md-10" style="text-align:left;border-left-width:2px;border-left-style:solid;|<div class="col-sm-12 col-md-12" style="}}<!-- | ||
-->{{{ | -->{{#if:{{{groupwidth|}}}||}};{{{liststyle|}}};{{{oddstyle|}}};padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}};{{{list1style|}}}"><!-- | ||
-->{{#if:{{{groupwidth|}}}|| | -->{{{list8}}}</div></div>}}<!-- | ||
--> | |||
{{{ | |||
-->{{#if:{{{ | -->{{#if:{{{list9|}}}|<div class="row" style="margin-top:2px"><!-- | ||
-->{{#if:{{{group9|}}}|<div class="col-sm-12 col-md-2 navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group2style|}}}"><!-- | |||
-->{{#if:{{{ | -->{{{group9}}}</div><div class="col-sm-12 col-md-10" style="text-align:left;border-left-width:2px;border-left-style:solid;|<div class="col-sm-12 col-md-12" style="}}<!-- | ||
-->{{{ | -->{{#if:{{{groupwidth|}}}||}};{{{liststyle|}}};{{{oddstyle|}}};padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}};{{{list1style|}}}"><!-- | ||
-->{{#if:{{{groupwidth|}}}|| | -->{{{list9}}}</div></div>}}<!-- | ||
--> | |||
{{{ | |||
-->{{#if:{{{ | -->{{#if:{{{list10|}}}|<div class="row" style="margin-top:2px"><!-- | ||
-->{{#if:{{{group10|}}}|<div class="col-sm-12 col-md-2 navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group2style|}}}"><!-- | |||
-->{{#if:{{{ | -->{{{group10}}}</div><div class="col-sm-12 col-md-10" style="text-align:left;border-left-width:2px;border-left-style:solid;|<div class="col-sm-12 col-md-12" style="}}<!-- | ||
-->{{{ | -->{{#if:{{{groupwidth|}}}||}};{{{liststyle|}}};{{{oddstyle|}}};padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}};{{{list1style|}}}"><!-- | ||
-->{{#if:{{{groupwidth|}}}|| | -->{{{list10}}}</div></div>}}<!-- | ||
--> | |||
{{{ | |||
-->{{#if:{{{ | -->{{#if:{{{list11|}}}|<div class="row" style="margin-top:2px"><!-- | ||
-->{{#if:{{{group11|}}}|<div class="col-sm-12 col-md-2 navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group2style|}}}"><!-- | |||
-->{{#if:{{{ | -->{{{group11}}}</div><div class="col-sm-12 col-md-10" style="text-align:left;border-left-width:2px;border-left-style:solid;|<div class="col-sm-12 col-md-12" style="}}<!-- | ||
-->{{{ | -->{{#if:{{{groupwidth|}}}||}};{{{liststyle|}}};{{{oddstyle|}}};padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}};{{{list1style|}}}"><!-- | ||
-->{{#if:{{{groupwidth|}}}|| | -->{{{list11}}}</div></div>}}<!-- | ||
--> | |||
{{{ | |||
-->{{#if:{{{ | -->{{#if:{{{list12|}}}|<div class="row" style="margin-top:2px"><!-- | ||
-->{{#if:{{{group12|}}}|<div class="col-sm-12 col-md-2 navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group2style|}}}"><!-- | |||
-->{{#if:{{{ | -->{{{group12}}}</div><div class="col-sm-12 col-md-10" style="text-align:left;border-left-width:2px;border-left-style:solid;|<div class="col-sm-12 col-md-12" style="}}<!-- | ||
-->{{{ | -->{{#if:{{{groupwidth|}}}||}};{{{liststyle|}}};{{{oddstyle|}}};padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}};{{{list1style|}}}"><!-- | ||
-->{{#if:{{{groupwidth|}}}|| | -->{{{list12}}}</div></div>}}<!-- | ||
--> | |||
{{{ | |||
-->{{#if:{{{ | -->{{#if:{{{list13|}}}|<div class="row" style="margin-top:2px"><!-- | ||
-->{{#if:{{{group13|}}}|<div class="col-sm-12 col-md-2 navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group2style|}}}"><!-- | |||
-->{{#if:{{{ | -->{{{group13}}}</div><div class="col-sm-12 col-md-10" style="text-align:left;border-left-width:2px;border-left-style:solid;|<div class="col-sm-12 col-md-12" style="}}<!-- | ||
-->{{{ | -->{{#if:{{{groupwidth|}}}||}};{{{liststyle|}}};{{{oddstyle|}}};padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}};{{{list1style|}}}"><!-- | ||
-->{{#if:{{{groupwidth|}}}|| | -->{{{list13}}}</div></div>}}<!-- | ||
--> | |||
{{{ | |||
-->{{#if:{{{ | -->{{#if:{{{list14|}}}|<div class="row" style="margin-top:2px"><!-- | ||
-->{{#if:{{{group14|}}}|<div class="col-sm-12 col-md-2 navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group2style|}}}"><!-- | |||
-->{{#if:{{{ | -->{{{group14}}}</div><div class="col-sm-12 col-md-10" style="text-align:left;border-left-width:2px;border-left-style:solid;|<div class="col-sm-12 col-md-12" style="}}<!-- | ||
-->{{{ | -->{{#if:{{{groupwidth|}}}||}};{{{liststyle|}}};{{{oddstyle|}}};padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}};{{{list1style|}}}"><!-- | ||
-->{{#if:{{{groupwidth|}}}|| | -->{{{list14}}}</div></div>}}<!-- | ||
--> | |||
{{{ | |||
-->{{#if:{{{ | -->{{#if:{{{list15|}}}|<div class="row" style="margin-top:2px"><!-- | ||
-->{{#if:{{{group15|}}}|<div class="col-sm-12 col-md-2 navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group2style|}}}"><!-- | |||
-->{{#if:{{{ | -->{{{group15}}}</div><div class="col-sm-12 col-md-10" style="text-align:left;border-left-width:2px;border-left-style:solid;|<div class="col-sm-12 col-md-12" style="}}<!-- | ||
-->{{{ | -->{{#if:{{{groupwidth|}}}||}};{{{liststyle|}}};{{{oddstyle|}}};padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}};{{{list1style|}}}"><!-- | ||
-->{{#if:{{{groupwidth|}}}|| | -->{{{list15}}}</div></div>}}<!-- | ||
--> | |||
{{{ | |||
-->{{#if:{{{ | -->{{#if:{{{list16|}}}|<div class="row" style="margin-top:2px"><!-- | ||
-->{{#if:{{{group16|}}}|<div class="col-sm-12 col-md-2 navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group2style|}}}"><!-- | |||
-->{{#if:{{{ | -->{{{group16}}}</div><div class="col-sm-12 col-md-10" style="text-align:left;border-left-width:2px;border-left-style:solid;|<div class="col-sm-12 col-md-12" style="}}<!-- | ||
-->{{{ | -->{{#if:{{{groupwidth|}}}||}};{{{liststyle|}}};{{{oddstyle|}}};padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}};{{{list1style|}}}"><!-- | ||
-->{{#if:{{{groupwidth|}}}|| | -->{{{list16}}}</div></div>}}<!-- | ||
--> | |||
{{{ | |||
-->{{#if:{{{ | -->{{#if:{{{list17|}}}|<div class="row" style="margin-top:2px"><!-- | ||
-->{{#if:{{{group17|}}}|<div class="col-sm-12 col-md-2 navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group2style|}}}"><!-- | |||
-->{{#if:{{{ | -->{{{group17}}}</div><div class="col-sm-12 col-md-10" style="text-align:left;border-left-width:2px;border-left-style:solid;|<div class="col-sm-12 col-md-12" style="}}<!-- | ||
-->{{{ | -->{{#if:{{{groupwidth|}}}||}};{{{liststyle|}}};{{{oddstyle|}}};padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}};{{{list1style|}}}"><!-- | ||
-->{{#if:{{{groupwidth|}}}|| | -->{{{list17}}}</div></div>}}<!-- | ||
--> | |||
{{{ | |||
-->{{#if:{{{ | -->{{#if:{{{list18|}}}|<div class="row" style="margin-top:2px"><!-- | ||
-->{{#if:{{{group18|}}}|<div class="col-sm-12 col-md-2 navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group2style|}}}"><!-- | |||
-->{{#if:{{{ | -->{{{group18}}}</div><div class="col-sm-12 col-md-10" style="text-align:left;border-left-width:2px;border-left-style:solid;|<div class="col-sm-12 col-md-12" style="}}<!-- | ||
-->{{{ | -->{{#if:{{{groupwidth|}}}||}};{{{liststyle|}}};{{{oddstyle|}}};padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}};{{{list1style|}}}"><!-- | ||
-->{{#if:{{{groupwidth|}}}|| | -->{{{list18}}}</div></div>}}<!-- | ||
--> | |||
{{{ | |||
-->{{#if:{{{ | -->{{#if:{{{list19|}}}|<div class="row" style="margin-top:2px"><!-- | ||
-->{{#if:{{{group19|}}}|<div class="col-sm-12 col-md-2 navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group2style|}}}"><!-- | |||
-->{{#if:{{{ | -->{{{group19}}}</div><div class="col-sm-12 col-md-10" style="text-align:left;border-left-width:2px;border-left-style:solid;|<div class="col-sm-12 col-md-12" style="}}<!-- | ||
-->{{{ | -->{{#if:{{{groupwidth|}}}||}};{{{liststyle|}}};{{{oddstyle|}}};padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}};{{{list1style|}}}"><!-- | ||
-->{{#if:{{{groupwidth|}}}|| | -->{{{list19}}}</div></div>}}<!-- | ||
--> | |||
{{{ | |||
-->{{#if:{{{ | -->{{#if:{{{list20|}}}|<div class="row" style="margin-top:2px"><!-- | ||
-->{{#if:{{{group20|}}}|<div class="col-sm-12 col-md-2 navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group2style|}}}"><!-- | |||
-->{{#if:{{{ | -->{{{group20}}}</div><div class="col-sm-12 col-md-10" style="text-align:left;border-left-width:2px;border-left-style:solid;|<div class="col-sm-12 col-md-12" style="}}<!-- | ||
-->{{{ | -->{{#if:{{{groupwidth|}}}||}};{{{liststyle|}}};{{{oddstyle|}}};padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}};{{{list1style|}}}"><!-- | ||
-->{{#if:{{{groupwidth|}}}|| | -->{{{list20}}}</div></div>}}<!-- | ||
--> | |||
{{{ | |||
-- | ---Right image--- | ||
--></div>{{#if:{{{image|}}}|<!-- | |||
--><div class="col-sm-12 col-md-2" style="align-self:center; text-align:center;{{{imagestyle|}}}"><!-- | |||
--> | -->{{{image}}}</div>}}<!-- | ||
--> | |||
--></div>}}<!-- | |||
---Below--- | ---Below--- | ||
-->{{#if:{{{below|}}}|<!-- | -->{{#if:{{{below|}}}|<div class="row" <!-- | ||
-->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}{{{list2|}}}{{{list3|}}}| | -->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}{{{list2|}}}{{{list3|}}}|style="margin-top:2px"}}><!-- | ||
-->< | --><div class="col-sm-12 col-md-12 navbox-abovebelow" style="{{{basestyle|}}};{{{belowstyle|}}}"><!-- | ||
-- | -->{{{below}}}</div></div>}}<!-- | ||
--></ | --></div>{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=<div>|none=|#default=</div></div>}} | ||
<noinclude>{{doc}}[[Category:Navigation templates]]</noinclude> | <noinclude>{{doc}}[[Category:Navigation templates]]</noinclude> |
Revision as of 11:09, 6 February 2022
Usage
Please remove the parameters that are left blank.
{{Navbox | name = {{subst:PAGENAME}}{{subst:void|Don't change anything on this line. It will change itself when you save.}} | title = | listclass = hlist | state = {{{state|}}} | above = | image = | group1 = | list1 = | group2 = | list2 = <!-- ... --> | group20 = | list20 = | below = }}
Parameter list
The navbox uses lowercase parameter names, as shown in the box (above). The required name and title will create a one-line box if other parameters are omitted.
Notice "group1" (etc.) is optional, as are sections named "above/below".
The basic and most common parameters are as follows (see below for the full list):
name
– the name of the template.title
– text in the title bar, such as: [[Widget stuff]].listclass
– a CSS class for the list cells, usuallyhlist
for horizontal lists. Alternatively, use bodyclass for the whole box.state
– controls when a navbox is expanded or collapsed.titlestyle
– a CSS style for the title-bar, such as:background: gray;
groupstyle
– a CSS style for the group-cells, such as:background: #eee;
above
– text to appear above the group/list section (could be a list of overall wikilinks).image
– an optional right-side image, coded as the whole image. Typically it is purely decorative, so it should be coded as[[File:XX.jpg|80px|link=|alt=]]
.imageleft
– an optional left-side image (code the same as the "image" parameter).groupn
– the left-side text before list-n (if group-n omitted, list-n starts at left of box).listn
– text listing wikilinks using a wikilist format.below
– optional text to appear below the group/list section.
Parameter descriptions
The following is a complete list of parameters for using {{Navbox}}
. In most cases, the only required parameters are name
, title
, and list1
.
Setup parameters
- name
- The name of the template, which is needed for the "V • T • E" ("View • Talk • Edit") links to work properly on all pages where the template is used. You can enter
{{subst:PAGENAME}}
for this value as a shortcut. The name parameter is only mandatory if atitle
is specified, and theborder
parameter is not set, and thenavbar
parameter is not used to disable the navbar. - state [
mw-collapsed, mw-expanded, autocollapse, plain, off
]
- Defaults to
mw-collapsed
. If set tomw-collapsed
, the navbox will always start out in a collapsed state. - If set to
mw-expanded
, the navbox will always start out in an expanded state. - If set to
autocollapse
, the navbox will start out collapsed if there are two or more tables on the same page that use other collapsible tables. Otherwise, the navbox will be expanded. - If set to
plain
, the navbox will always be expanded with no [hide] link on the right, and the title will remain centered (by using padding to offset the V • T • E links). - If set to
off
, the navbox will always be expanded with no [hide] link on the right, but no padding will be used to keep the title centered. This is for advanced use only; the "plain" option should suffice for most applications where the [show]/[hide] button needs to be hidden.
- To show the box when standalone (non-included) but then auto-hide contents when in an article, put "expanded" inside
<noinclude|>
...</noinclude|>
tags. This setting will force the box visible when standalone (even when followed by other boxes), displaying "[hide]", but then it will auto-collapse the box when stacked inside an article:| state =
<noinclude|>
expanded</noinclude|>
- Often times, editors will want a default initial state for a navbox, which may be overridden in an article. Here is the trick to do this:
- In your intermediate template, create a parameter also named "state" as a pass-through like this:
| state = {{{state<includeonly>|your_desired_initial_state</includeonly>}}}
- The
<includeonly>
|
will make the template expanded when viewing the template page by itself.
- navbar
- If set to
plain
, the V • T • E links on the left side of the titlebar will not be displayed, and padding will be automatically used to keep the title centered. Useoff
to remove the V • T • E links, but not apply padding (this is for advanced use only; the "plain" option should suffice for most applications where a navbar is not desired). It is highly recommended that one not hide the navbar, in order to make it easier for users to edit the template, and to keep a standard style across pages. - border
The above documentation is transcluded from Template:Navbox/doc. (edit | history)