Template:Navbox/doc

From Nookipedia, the Animal Crossing wiki
< Template:Navbox
Revision as of 13:41, March 24, 2020 by Dorsal Axe (talk | contribs) (Created page with "==Usage== <pre> {{Navbox | Title = | Link = | Icon = | IconSize = | Image = | TextColor = | PrimaryColor = |...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Usage

{{Navbox
 | Title          = 
 | Link           = 
 | Icon           = 
 | IconSize       = 
 | Image          = 
 | TextColor      = 
 | PrimaryColor   = 
 | SecondaryColor = 
 | GroupColor     = 
 | RowColor       = 
 | Width          =
 | State          =

 | PlainList      =

 | Above          =
 | AboveLink      =
 | Group          = 
 | GroupLink      = 
 | List           = 

 | Below          =
 | BelowLink      =
}}

This template is intended to be used for all navboxes, as it allows them to be easily created and maintained and gives them a consistent visual style and functionality. A mobile-friendly version is displayed when viewing Nookipedia in Mobile view, which adjusts the positioning of elements and leaves out the image parameter to save space on smaller screens.

The following parameters primarily set the visual style of the template:

  • Title sets the displayed heading of the navbox
  • Link is an optional parameter that sets the page that the heading will link to.
  • Icon is an optional parameter that displays a small icon in the upper-left corner of the navbox.
  • IconSize is an optional parameter that allows the size of the icon to be manually adjusted.
  • Image is an optional parameter that allows an image to be displayed in the right side of the navbox in Desktop view.
  • TextColor sets the displayed colour of the heading text and group label text.
  • PrimaryColor sets the displayed colour of the outer part of the navbox
  • SecondaryColor sets the displayed colour of the inner part of the navbox
  • GroupColor sets the displayed colour of the groups, dividers and footer.
  • RowColor sets the displayed colour of alternate rows.
  • Width sets the width of the entire navbox. This should only be manually set if the navbox is only using the PlainList parameter.
  • State toggles whether the navbox appears in a collapsed or uncollapsed state. Hide will result in a collapsed state, while Show will keep it uncollapsed.

The following parameters primarily set the content of the template:

  • PlainList omits the group cells and simply shows a single list in a centered alignment. This is useful if the navbox is only showing a few links and grouping them is unnecessary. It's not recommended to use this in conjunction with additional groups as it may result in visual errors.
  • Above creates a divider heading that is shown above the specified group.
  • AboveLink is an optional parameter that sets the page that the heading will link to.
  • Group sets the displayed label of the specified group.
  • GroupLink is an optional parameter that sets the page that the group label will link to.
  • List is the content to be displayed adjacent to the specified group, typically links to other pages.

The navbox template supports up to 10 groups and corresponding lists, and up to 5 links in the footer. When adding more than one group or link to the footer, you must append the number to the names of the parameters like so. Failing to this will result in display errors.

 | Above2         =
 | Group2         = 
 | Group2Link     = 
 | List2          = 

 | Below2          =
 | Below2Link      =

Example

{{Navbox
 | Title          = Fashion
 | Icon           = Tops NH Icon cropped.png
 | Image          = [[File:Gracie NLa.png|40px|link=]]
 | TextColor      = #722756
 | PrimaryColor   = #d88dbc
 | SecondaryColor = #f8ecf4
 | GroupColor     = #e3b5d4
 | RowColor       = #f1dae9

 | Group          = Clothing
 | List           = [[Clothes]] • [[Accessories]] • [[Bottoms]] • [[Dress|Dresses]] • [[Headgear]] • [[Shoes]] • [[Socks]] • [[Tops]] • [[Umbrellas]] • [[Wigs]]

 | Group2         = Concepts
 | List2          = [[Design]]s • [[Look]] • [[Hairstyle]] • [[Mii Mask]]

 | Group3         = Merchants
 | List3          = [[Able Sisters]] • [[GracieGrace]] • [[Kicks (shop)|Kicks]] • [[Shampoodle]]

 | Group4         = Designers
 | List4          = [[Gracie]] • [[Harriet]] • [[Kicks]] • [[Label]] • [[Mabel]] • [[Sable]]

 | Below          = Category
 | BelowLink      = :Category:Furniture
 | Below2         = Project
 | Below2Link     = Nookipedia:Project Fashion
}}