Template:Navbox/doc: Difference between revisions

From 118Wiki
Jump to navigation Jump to search
(initial documentation)
 
(examples)
Line 14: Line 14:
Full use:
Full use:
<pre>{{Navbox|EXPANDED=Expanded|WIDTH=Width|TEXTCOLOR=Text color|BACKGROUND=Background|ALIGN=Align|TITLE=Title|Contents}}</pre>
<pre>{{Navbox|EXPANDED=Expanded|WIDTH=Width|TEXTCOLOR=Text color|BACKGROUND=Background|ALIGN=Align|TITLE=Title|Contents}}</pre>
'''EXPANDED''' determines if the navigation box is expanded or collapsed (open or closed) when the page is opened. Enter ''yes'' to have the navigation box expanded. Any other text or not using the parameter will default to collapsed box.


'''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.
'''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.
Line 22: Line 24:


'''ALIGN''' determines the alignment of the contents. Defaults to left.
'''ALIGN''' determines the alignment of the contents. Defaults to left.
== Examples ==
<!-- Consider replacing some examples when actual navboxes made with this template -->
=== Basic navigation box ===
<pre>{{Navbox
|ALIGN=center
|TITLE=Species of the [[Borderlands]]
|[[Klingon]]s • [[Son'a]] • [[Suliban]] • [[Da'al]] • Thama • Nascaik • Demesians}}</pre>
{{Navbox
|ALIGN=center
|TITLE=Species of the [[Borderlands]]
|[[Klingon]]s • [[Son'a]] • [[Suliban]] • [[Da'al]] • Thama • Nascaik • Demesians}}
=== More complex navigation box ===
<pre>{{Navbox
|EXPANDED=yes
|WIDTH=400px
|ALIGN=center
|TEXTCOLOR=white
|BACKGROUND=#996633
|TITLE=Species of the [[Borderlands]]
|[[Klingon]]s • [[Son'a]] • [[Suliban]] • [[Da'al]] • Thama • Nascaik • Demesians}}</pre>
{{Navbox
|EXPANDED=yes
|WIDTH=400px
|ALIGN=center
|TEXTCOLOR=white
|BACKGROUND=#996633
|TITLE=Species of the [[Borderlands]]
|[[Klingon]]s • [[Son'a]] • [[Suliban]] • [[Da'al]] • Thama • Nascaik • Demesians}}
=== Alternate use ===
<pre>{{Navbox
|BACKGROUND={{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.}}</pre>
{{Navbox
|BACKGROUND={{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.}}


<includeonly>[[Category:Navigation templates|*]]__NOTOC__</includeonly>
<includeonly>[[Category:Navigation templates|*]]__NOTOC__</includeonly>
<noinclude>[[Category:Documentation subpages]]</noinclude>
<noinclude>[[Category:Documentation subpages]]</noinclude>

Revision as of 19:17, 17 September 2023

This template creates a collapsible vertical 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.

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|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. Enter yes to have the navigation box expanded. Any other text or not using the parameter will default to collapsed box.

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.

BACKGROUND 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.

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
|TEXTCOLOR=white
|BACKGROUND=#996633
|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
|BACKGROUND={{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.