Difference between revisions of "Template:Navbox/doc"

From Nookipedia, the Animal Crossing wiki
(Created page with "==Usage== <pre> {{Navbox | Title = | Link = | Icon = | IconSize = | Image = | TextColor = | PrimaryColor = |...")
 
m (Text replacement - "Mii Mask" to "Mii mask")
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{High Risk Template}}
 +
 
==Usage==
 
==Usage==
 
<pre>
 
<pre>
Line 7: Line 9:
 
  | IconSize      =  
 
  | IconSize      =  
 
  | Image          =  
 
  | Image          =  
| TextColor      =
 
 
  | PrimaryColor  =  
 
  | PrimaryColor  =  
 
  | SecondaryColor =  
 
  | SecondaryColor =  
| GroupColor    =
 
| RowColor      =
 
 
  | Width          =
 
  | Width          =
| State          =
 
 
| PlainList      =
 
  
 
  | Above          =
 
  | Above          =
| AboveLink      =
 
 
  | Group          =  
 
  | Group          =  
 
  | GroupLink      =  
 
  | GroupLink      =  
Line 28: Line 23:
 
</pre>
 
</pre>
  
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.
+
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. It is very complex, and has been designed to adapt to the many different needs of various navboxes across the wiki. This template is mobile-friendly and will appear with repositioned elements on mobile devices.
  
 
The following parameters primarily set the visual style of the template:
 
The following parameters primarily set the visual style of the template:
* <code>Title</code> sets the displayed heading of the navbox
+
* <code>Title</code> sets the displayed heading of the navbox.
* <code>Link</code> is an optional parameter that sets the page that the heading will link to.
+
* <code>Link</code> sets a linked page for the navbox title.
* <code>Icon</code> is an optional parameter that displays a small icon in the upper-left corner of the navbox.
+
* <code>Icon</code> is an optional parameter that allows an image or text to appear in the upper-left corner of the navbox.
* <code>IconSize</code> is an optional parameter that allows the size of the icon to be manually adjusted.
+
* <code>IconSize</code> is an optional parameter that allows a custom size for the icon to be specified.
* <code>Image</code> is an optional parameter that allows an image to be displayed in the right side of the navbox in Desktop view.
+
* <code>Image</code> sets the image file to be displayed on the right side of the navbox.
* <code>TextColor</code> sets the displayed colour of the heading text and group label text.
+
 
* <code>PrimaryColor</code> sets the displayed colour of the outer part of the navbox
+
* <code>PrimaryColor</code> sets the display colors of the infobox. Requires hue and saturation values in in '''HSL format''', as other colors on the template are adjusted dynamically based on these values.
* <code>SecondaryColor</code> sets the displayed colour of the inner part of the navbox
+
* <code>SecondaryColor</code> allows a complimentary color to be specified. Requires hue and saturation values in in '''HSL format''', as other colors on the template are adjusted dynamically based on these values.
* <code>GroupColor</code> sets the displayed colour of the groups, dividers and footer.
+
* <code>Width</code> allows a custom width to be specified for the navbox (for style reasons this parameter should normally not be used)
* <code>RowColor</code> sets the displayed colour of alternate rows.
 
* <code>Width</code> sets the width of the entire navbox. This should only be manually set if the navbox is only using the <code>PlainList</code> parameter.
 
* <code>State</code> toggles whether the navbox appears in a collapsed or uncollapsed state. <code>Hide</code> will result in a collapsed state, while <code>Show</code> will keep it uncollapsed.
 
  
 
The following parameters primarily set the content of the template:
 
The following parameters primarily set the content of the template:
*<code>PlainList</code> 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.
+
* <code>Above</code> sets a text heading to be displayed above the group and list.
 +
* <code>Group</code> sets a text heading for the group, which appears to the left of the list.
 +
* <code>GroupLink</code> sets sets a linked page for the group heading text.
 +
* <code>List</code> sets the content that appears in the list. This should always be wikilinks to articles, and each link should be separated with a bullet (•) symbol.
  
* <code>Above</code> creates a divider heading that is shown above the specified group.
+
The following parameters set the content of the navbox footer. This should be used to link to the topic's category, project page or relevant image category. It can also be used for broad topic links that don't fit into any of the groups in the navbox.
* <code>AboveLink</code> is an optional parameter that sets the page that the heading will link to.
+
* <code>Below</code> sets the text of a link that will appear in the footer.
* <code>Group</code> sets the displayed label of the specified group.
+
* <code>BelowLink</code> sets the linked page for the specified text.
* <code>GroupLink</code> is an optional parameter that sets the page that the group label will link to.
 
* <code>List</code> 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.
+
The infobox template supports up to 10 groups with lists and 5 footer links. When adding more than one, you must append the sequential number to the names of the parameters like so. Failing to this will result in display errors.
 
<pre>
 
<pre>
 
  | Above2        =
 
  | Above2        =
  | Group2        =  
+
  | Group2        =
  | Group2Link    =  
+
  | Group2Link    =
  | List2          =  
+
  | List2          =
  
  | Below2         =
+
  | Below2         =  
  | Below2Link     =
+
  | Below2Link     =
 
</pre>
 
</pre>
  
Line 69: Line 62:
 
  | Title          = Fashion
 
  | Title          = Fashion
 
  | Icon          = Tops NH Icon cropped.png
 
  | Icon          = Tops NH Icon cropped.png
  | Image          = [[File:Gracie NLa.png|40px|link=]]
+
  | Image          = [[File:Gracie NLWa.png|40px|link=]]
| TextColor      = #722756
+
  | PrimaryColor  = 322 49
  | PrimaryColor  = #d88dbc
 
| SecondaryColor = #f8ecf4
 
| GroupColor    = #e3b5d4
 
| RowColor      = #f1dae9
 
  
 
  | Group          = Clothing
 
  | Group          = Clothing
Line 80: Line 69:
  
 
  | Group2        = Concepts
 
  | Group2        = Concepts
  | List2          = [[Design]]s • [[Look]] • [[Hairstyle]] • [[Mii Mask]]
+
  | List2          = [[Design]]s • [[Look]] • [[Hairstyle]] • [[Mii mask]]
  
 
  | Group3        = Merchants
 
  | Group3        = Merchants
Line 98: Line 87:
 
  | Title          = Fashion
 
  | Title          = Fashion
 
  | Icon          =  
 
  | Icon          =  
  | Image          = [[File:Gracie NLa.png|40px|link=]]
+
  | Image          = [[File:Gracie NLWa.png|40px|link=]]
| TextColor      = #722756
+
  | PrimaryColor  = 322 49
  | PrimaryColor  = #d88dbc
 
| SecondaryColor = #f8ecf4
 
| GroupColor    = #e3b5d4
 
| RowColor      = #f1dae9
 
  
 
<!-- CLOTHING -->
 
<!-- CLOTHING -->
Line 111: Line 96:
 
<!-- CONCEPTS -->
 
<!-- CONCEPTS -->
 
  | Group2        = Concepts
 
  | Group2        = Concepts
  | List2          = [[Design]]s • [[Look]] • [[Hairstyle]] • [[Mii Mask]]
+
  | List2          = [[Design]]s • [[Look]] • [[Hairstyle]] • [[Mii mask]]
  
 
<!-- MERCHANTS -->
 
<!-- MERCHANTS -->

Latest revision as of 01:48, November 8, 2022

Emotion Surprise NH Icon.png
This template is complex or is transcluded on a large number of pages.
Due to the sensitive nature of this template, caution is advised before editing. Any changes should first be tested in a sandbox. Please consider discussing planned changes on the talk page or with staff members before implementing them.
Emotion Surprise NH Icon.png
This template is complex or is transcluded on a large number of pages.
Due to the sensitive nature of this template, caution is advised before editing. Any changes should first be tested in a sandbox. Please consider discussing planned changes on the talk page or with staff members before implementing them.

Usage

{{Navbox
 | Title          = 
 | Link           = 
 | Icon           = 
 | IconSize       = 
 | Image          = 
 | PrimaryColor   = 
 | SecondaryColor = 
 | Width          =

 | Above          =
 | 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. It is very complex, and has been designed to adapt to the many different needs of various navboxes across the wiki. This template is mobile-friendly and will appear with repositioned elements on mobile devices.

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

  • Title sets the displayed heading of the navbox.
  • Link sets a linked page for the navbox title.
  • Icon is an optional parameter that allows an image or text to appear in the upper-left corner of the navbox.
  • IconSize is an optional parameter that allows a custom size for the icon to be specified.
  • Image sets the image file to be displayed on the right side of the navbox.
  • PrimaryColor sets the display colors of the infobox. Requires hue and saturation values in in HSL format, as other colors on the template are adjusted dynamically based on these values.
  • SecondaryColor allows a complimentary color to be specified. Requires hue and saturation values in in HSL format, as other colors on the template are adjusted dynamically based on these values.
  • Width allows a custom width to be specified for the navbox (for style reasons this parameter should normally not be used)

The following parameters primarily set the content of the template:

  • Above sets a text heading to be displayed above the group and list.
  • Group sets a text heading for the group, which appears to the left of the list.
  • GroupLink sets sets a linked page for the group heading text.
  • List sets the content that appears in the list. This should always be wikilinks to articles, and each link should be separated with a bullet (•) symbol.

The following parameters set the content of the navbox footer. This should be used to link to the topic's category, project page or relevant image category. It can also be used for broad topic links that don't fit into any of the groups in the navbox.

  • Below sets the text of a link that will appear in the footer.
  • BelowLink sets the linked page for the specified text.

The infobox template supports up to 10 groups with lists and 5 footer links. When adding more than one, you must append the sequential 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 NLWa.png|40px|link=]]
 | PrimaryColor   = 322 49

 | 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
}}