Template:Navbox/doc

< Template:Navbox
Revision as of 11:26, 9 January 2024 by Jovenan (talk | contribs) (Template Data redone)
Note: This template is currently under construction.
This notice was placed here by Jovenan, so go bug her to finish the page if nothing's happening.

This template creates a collapsible horizontal navigation box, i.e. a box containing links to articles related to the subject. Alternatively, the template can be used for any content, such as text or images. The template can be used as a basis of other templates or on its own on an article.

Note that the collapsibility does not work in mobile view. The box will still appear.

Usage

Minimal use:

{{Navbox|TITLE=Title|Contents}}

The text within the template without parameter creates the contents of the navigation box.

Enter the parameter TITLE for the title of the navigation box.

Other parameters are optional.

Full use:

{{Navbox
|EXPANDED=Expanded
|WIDTH=Width
|TEXTCOLOR=Text color
|TITLEBACKGROUND=Title background
|BACKGROUND=Background
|ALIGN=Align
|TITLE=Title
|Contents}}

EXPANDED determines if the navigation box is expanded or collapsed (open or closed) when the page is opened. Any text (such as "yes", "true", "1") causes the box to be initially opened. Leave empty if that is not desired.

WIDTH determines the width of the navigation box. Enter the width in pixels (e.g. 150px), as percentage of the width of the article (e.g. 80%) or in other supported measures. Defaults to full width.

TEXTCOLOR determines the color of the title. Enter the color in HTML names (e.g. white) or in hex code (e.g. #FEF7FC). Defaults to the black.

COLOR determines the background color of the title. Enter the color in HTML names (e.g. black) or in hex code (e.g. #B57EDC). Defaults to #efefef, which is a shade of light grey.

BACKGROUND determines the background color of the content. Enter the color in HTML names (e.g. black) or in hex code (e.g. #B57EDC). Defaults to white.

ALIGN determines the alignment of the contents. Defaults to left.

Examples

Basic navigation box

{{Navbox
|ALIGN=center
|TITLE=Species of the [[Borderlands]]
|[[Klingon]]s • [[Son'a]] • [[Suliban]] • [[Da'al]] • Thama • Nascaik • Demesians}}
Species of the Borderlands

KlingonsSon'aSulibanDa'al • Thama • Nascaik • Demesians

More complex navigation box

{{Navbox
|EXPANDED=yes
|WIDTH=400px
|ALIGN=center
|COLOR=#996633
|TEXTCOLOR=white
|TITLE=Species of the [[Borderlands]]
|[[Klingon]]s • [[Son'a]] • [[Suliban]] • [[Da'al]] • Thama • Nascaik • Demesians}}
Species of the Borderlands

KlingonsSon'aSulibanDa'al • Thama • Nascaik • Demesians

Alternate use

{{Navbox
|COLOR={{Color|Blue}}
|TEXTCOLOR=white
|WIDTH=80%
|TITLE=Shoreleave
|[[File:Classo.jpg|thumb|Rura Penthe is Class D, such as the moon above.]]
After the mission in the Muppetverse, the crew of the USS ''Diana'' went to a shore leave on Rura Pethe. Exhausted by the events of the previous mission, Jo Venan decided to use the opportunity for relaxation, as opposed to joining the other officers in exploring their holiday destination. As such, she remained mostly onboard the ship.

Later on the shoreleave, Jo visited Doctor Kila for her annual medical check. The Doctor was concerned of Jo's elevated heart rate, deciding to order her to go through some extra tests. Eventually, they found out Jo had an unusually large and warm heart, and no further operations were required.}}
Shoreleave
Rura Penthe is Class D, such as the moon above.

After the mission in the Muppetverse, the crew of the USS Diana went to a shore leave on Rura Pethe. Exhausted by the events of the previous mission, Jo Venan decided to use the opportunity for relaxation, as opposed to joining the other officers in exploring their holiday destination. As such, she remained mostly onboard the ship.

Later on the shoreleave, Jo visited Doctor Kila for her annual medical check. The Doctor was concerned of Jo's elevated heart rate, deciding to order her to go through some extra tests. Eventually, they found out Jo had an unusually large and warm heart, and no further operations were required.

Template data

Template Data

Creates collapsible navigation box

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Contents1

Contents shown in the box

Contentsuggested
Titletitle Title TITLE

Title of the box

Stringrequired
Widthwidth Width WIDTH

Width of the box. Use CSS measure units, e.g. pixels (px), em, %.

Example
500px
Lineoptional
Colorcolor Color COLOR

Background color of the title. Use any color naming system recognized in CSS, e.g. HTLM names or HEX

Default
#efefef
Example
blue
Lineoptional
Background colorbackground Background BACKGROUND

Background color of the contents. Use any color naming system recognized in CSS, e.g. HTLM names or HEX.

Default
white
Lineoptional
Title text colortextcolor Textcolor TEXTCOLOR

Title text color. Use any color naming system recognized in CSS, e.g. HTLM names or HEX.

Default
black
Lineoptional
Text alignmentalign Align ALIGN

Alignment of the text in contents, left, right, center, justify

Suggested values
left right center justify
Default
left
Lineoptional
Expandedexpanded Expanded EXPANDED

If not empty, the box will appear expanded (open) when the page is opened. Leave empty if you want the box to be closed when the page is opened.

Stringoptional
Box CSS Stylebstyle Bstyle BSTYLE

Open CSS styling for the template main box, supersedes other template main box style options

Stringoptional
Title CSS Styletstyle Tstyle TSTYLE

Open CSS styling for the title box, supersedes other title box style options

Stringoptional
Content CSS Stylecstyle Cstyle CSTYLE

Open CSS styling for the content box, supersedes other content box style options

Stringoptional