Template:Infobox 2.0

From Nookipedia, the Animal Crossing wiki
(Redirected from Template:Infobox)
No image available

Template documentation (view)


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

{{Infobox 2.0
 | colorclass      =

 | title           = 
 | lefticon        =
 | righticon       =

 | primarycolor    =
 | secondarycolor  =

 | leftlink        =
 | rightlink       =

 | subtitleabove   = 
 | subtitlebelow   =

 | image           =
 | caption         =
 | image2          =
 | caption2        =

 | leftlabel       =
 | leftdata        =
 | middlelabel     =
 | middledata      =
 | rightlabel      =
 | rightdata       =

 | calendar        =
 | calcolor        = 

 | widelabel       =
 | widedata        =

 | group           =
 | label           = 
 | data            = 
 | subdata         =

 | widebottomlabel =
 | widebottomdata  =

 | appearances     =
 | o-appearances   =

 | languages       =

 | strategywiki    =
}}

This template is intended to be used for all infoboxes, 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 infoboxes across the wiki. This template is mobile-friendly and should appear the same on mobile devices (it will be centered on small resolution screens).

Visual styles

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

  • colorclass sets the display colors of the infobox to a color class defined in MediaWiki:Common.css. A list of valid color classes can be found here. If this parameter is not defined, the infobox will fallback to the default hue and saturation values of 0 0%.
  • title sets the displayed heading of the infobox.
  • lefticon is an optional parameter that allows an image or text to appear in the upper-left corner of the infobox.
  • righticon is an optional parameter that allows an image or text to appear in the upper-right corner of the infobox.
The below parameters are deprecated. All infoboxes should use colorclass from now on.
  • 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.
  • overrideprimary allows the lightness of the primary color to be overridden with a custom percentage value. Should only be used if chosen color lightness is not suitable.
  • overridesecondary allows the lightness of the secondary color to be overridden with a custom percentage value. Should only be used if chosen color lightness is not suitable.
  • titlecolor sets the displayed colour that appears behind the heading text. Intended for use with villager infoboxes.
  • textcolor sets the displayed colour of the heading text. Intended for use with villager infoboxes.
  • calcolor sets the displayed colour of highlighted months on calendar, if it has been set to be shown (see below). Requires hue and saturation values in in HSL format, as other colors on the template are adjusted dynamically based on these values. Appending 2 defines the color of the second calendar (see below).
Content

The following parameters primarily set the content of the template:

  • image sets the image file to be displayed in the infobox.
  • caption sets a text caption to be displayed below the image.
  • image2 sets a second image file to be displayed in the infobox, below the first image.
  • caption2 sets a text caption to be displayed below the second image.
  • leftlink sets a link that appears on the upper-left side of the infobox with an arrow pointing left. Intended for navigation between related topics.
  • rightlink sets a link that appears on the upper-right side of the infobox with an arrow pointing right. Intended for navigation between related topics.
  • subtitleabove sets a subtitle that will appear below the heading, but above any images.
  • subtitlebelow sets a subtitle that will appear below images. Setting this to Gallery will automatically set this to a styled gallery page link.
Multi-column labels

The infobox can be set to show two or three adjacent columns of labels and data using the following parameters. It will appear with two columns if only left and right sides are specified, and three if the middle parameters are specified.

  • leftlabel
  • leftdata
  • middlelabel
  • middledata
  • rightlabel
  • rightdata

A second row may be specified via leftlabel2/leftdata2, etc.

Calendars

A calendar can be set to appear in the infobox and will highlight any specified months. The calendar will appear above and visually join wide labels if they are set to be shown. Appending 2 to these parameters will allow creation of a second calendar below the first one, which is primarily intended for distinguishing months between northern and southern hemispheres.

  • calendar sets the title for the calendar. Defaults to "Months".
Wide labels

The following parameters will create label/data pairs above the data, in a single column that spans the width of the infobox:

  • widelabel
  • widedata

Up to five rows may be created via widelabel2/widedata2, etc.

Labels

The following parameters will set the label to appear adjacent to the data, in two columns.

  • group will create a group label in a single column that spans the width of the infobox. This will also shade the labels in a slightly lighter colour, allowing the creation of "sub-labels".
  • labelspan can be set to wide to extend the width of the labels at the expense of the data column.
  • label
  • data
  • subdata allows an extra cell to be displayed to the right of the first level of data. At the present time, this is solely intended to display star signs in Template:Infobox Villager.
Wide labels at bottom

The following parameters will create label/data pairs below the data, in a single column that spans the width of the infobox:

  • widebottomlabel
  • widebottomdata

Up to six rows may be created via widebottomlabel2/widebottomdata2, etc.

Appearances

The following parameters will display which media the subject has appeared in, by checking the categories the page is included in. For both parameters, the category name must be specified, omitting the title of the media (e.g. just "characters" rather than "New Horizons characters")

  • appearances will display appearances in main series games.
  • o-appearances will display appearances in spin-off games and media.

For cases where the category name varies from game to game, one of the following parameters may be used to override the category designation for a specific title:

  • customcat-cf is used to override the category used for City Folk.
  • customcat-pc is used to override the category used for Pocket Camp.
Languages
  • languages setting to yes toggles the appearance of the languages sub-box, intended for names for the subject in other languages. The following parameters must be used to specify any parameters for the supported languages. Appending 2 to these parameters will allow creation of a second languages box below the first one.
Miscellaneous
  • StrategyWiki allows a link to be set to a corresponding on StrategyWiki

The infobox template supports up to 5 wide rows and 13 two-column rows. When adding more than one row, you must append the sequential number to the names of the parameters like so. Failing to this will result in display errors.

 | widelabel2     =
 | widedata2      =

 | label2         = 
 | data2          =