Template:Navbox: Difference between revisions

From Ukikipedia
Jump to navigation Jump to search
m (Copied the above5 to above6, cause I needed that for the Challenges NavBox... Not sure if we truly want it though)
(Added a description for the usage and added to the Navbox and formatting templates)
 
Line 1: Line 1:
<!--
<!--


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={{#if:{{{vtabs|}}}||</div>}}|none=|#default=<table class="navbox {{{bodyclass|}}}" cellspacing="0" <!--
-->{{#switch:{{{border|{{{1|}}}}}}|subgroup|child={{#if:{{{vtabs|}}}||</div>}}|none=|#default=<table class="navbox {{{bodyclass|}}}" cellspacing="0" <!--
Line 285: Line 288:


--><noinclude>
--><noinclude>
[[Category:Templates|Navbox]]
The Navbox is used for creating a navigation box like the template <code><nowiki>{{Level courses}}</nowiki></code>. The behind-the-scenes code for this is very complicated, and should not be edited without a discussion (also because it would impact a lot of pages).
 
== Usage ==
To use this template we start by using the following (we want to keep the styling the same across pages).
 
<code><nowiki>
{{Navbox</nowiki><br>
| name  = Level courses<br>
| state = <nowiki>{{{state|uncollapsed}}}</nowiki><br>
| liststyle  = padding: 0.25em;<br>
| titlestyle = background: #0a53e7; color: white;<br>
| abovestyle = background: #5485E7; color: white;<br>
| groupstyle = background: #85A8FF; color: white;<br>
| evenstyle  = background: #E2F1FC;<br>
| oddstyle  = background: #EFF8FE;<br>
</code>
The code above is mostly for styling purposes, so this should always be copied to each navigation box.
 
 
Below you can see the things that are allowed to be edited.
The first, <code>title</code> gives the title of the Navbox. The first part between square brackets <code>[[]]</code> is used for the link to the main page of the Navbox. The part between the <code><nowiki><font></font></nowiki></code> gives the title displayed by the system.<br>
<code>above''n''</code> displays the bar across for a subsection, for our purposes we want these things '''bold'''.<br>
<code>group''n''</code> is the name of the <code>list''n''</code>.<br>
Only <code>title</code> and <code>list''n''</code> are required.
 
<code>| title = <nowiki>[[List_of_Courses|<font color="white">Courses</font>]]</nowiki><br>
| above1 = <nowiki>'''Main Courses'''</nowiki><br>
| group1  = First Floor<br>
| list1  = <nowiki>[[Bob-omb Battlefield]] • [[Whomp's Fortress]] • [[Jolly Roger Bay]] • [[Cool, Cool Mountain]] • [[Big Boo's Haunt]]</nowiki><br>
}}</code><br>
(for now, the highest you can go with <code>above''n''</code> is <code>above6</code>.)
 
 
[[Category:Navbox templates]]
[[Category:Formatting templates]]
</noinclude>
</noinclude>

Latest revision as of 19:32, 10 April 2019

The Navbox is used for creating a navigation box like the template {{Level courses}}. The behind-the-scenes code for this is very complicated, and should not be edited without a discussion (also because it would impact a lot of pages).

Usage

To use this template we start by using the following (we want to keep the styling the same across pages).

{{Navbox
| name = Level courses
| state = {{{state|uncollapsed}}}
| liststyle = padding: 0.25em;
| titlestyle = background: #0a53e7; color: white;
| abovestyle = background: #5485E7; color: white;
| groupstyle = background: #85A8FF; color: white;
| evenstyle = background: #E2F1FC;
| oddstyle = background: #EFF8FE;
The code above is mostly for styling purposes, so this should always be copied to each navigation box.


Below you can see the things that are allowed to be edited. The first, title gives the title of the Navbox. The first part between square brackets [[]] is used for the link to the main page of the Navbox. The part between the <font></font> gives the title displayed by the system.
aboven displays the bar across for a subsection, for our purposes we want these things bold.
groupn is the name of the listn.
Only title and listn are required.

| title = [[List_of_Courses|<font color="white">Courses</font>]]
| above1 = '''Main Courses'''
| group1 = First Floor
| list1 = [[Bob-omb Battlefield]] • [[Whomp's Fortress]] • [[Jolly Roger Bay]] • [[Cool, Cool Mountain]] • [[Big Boo's Haunt]]
}}

(for now, the highest you can go with aboven is above6.)