Difference between revisions of "Template:Navbox Collection"

From Nookipedia, the Animal Crossing wiki
(Remove fixed height)
m (caps)
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<includeonly><div>
 
<includeonly><div>
 
{{{!}} width=100% {{!}}
 
{{{!}} width=100% {{!}}
{{!}}width=32px align="center" valign="middle" style="background: #{{#switch: {{{Type|Sea Creature}}}  
+
{{!}}width=32px height=28px align="center" valign="middle" style="background: #{{#switch: {{{Type|Sea Creature}}}  
 
  | Art          = f0d3c1
 
  | Art          = f0d3c1
 
  | Fossil      = f5e5bc
 
  | Fossil      = f5e5bc
Line 10: Line 10:
 
  | Shell        = ffe099
 
  | Shell        = ffe099
 
  | Music        =  
 
  | Music        =  
 +
| Tool        = f9e9cf
 
  | {{{CustomColor|ffffff}}}  
 
  | {{{CustomColor|ffffff}}}  
}}; {{roundyleft|10px}} {{!}} [[File:{{{Icon|Menu Critterpedia NH Icon.png}}}|{{{Size|28px}}}|link={{#if:{{{NameLink|}}}|{{{NameLink|}}}|{{{Name}}}}}]]  
+
}}; {{#switch: {{{Type|}}}
 +
| Music    =
 +
| #default = {{roundyleft|10px}}
 +
}} {{!}} [[File:{{{Icon|Menu Critterpedia NH Icon.png}}}|{{{Size|28px}}}|link={{#if:{{{NameLink|}}}|{{{NameLink|}}}|{{{Name}}}}}|alt={{#switch:{{{Type|}}}|Music = {{!}}class=roundyimage| #default = }}]]  
 
{{!}} width=80% align="center" valign="middle" style="background: #{{#switch: {{{Type|Sea Creature}}}  
 
{{!}} width=80% align="center" valign="middle" style="background: #{{#switch: {{{Type|Sea Creature}}}  
 
  | Art          = f0d3c1
 
  | Art          = f0d3c1
Line 20: Line 24:
 
  | Sea Creature = cce1ff
 
  | Sea Creature = cce1ff
 
  | Shell        = ffe099
 
  | Shell        = ffe099
  | Music        =  
+
  | Music        = e0d1dd
 +
| Tool        = f9e9cf
 
  | {{{CustomColor|ffffff}}}  
 
  | {{{CustomColor|ffffff}}}  
}}; {{roundyright|10px}}{{!}} {{#if:{{{Japanese|}}}|''|}}{{#if:{{{NameLink|}}}|[[{{{NameLink}}}|{{{Name}}}]]|[[{{{Name|Critterpedia}}}]]}}
+
}}; {{#switch: {{{Type|}}}
 +
| Music    = {{roundy|10px}}
 +
| #default = {{roundyright|10px}}
 +
}}{{!}} {{#if:{{{Japanese|}}}|''|}}{{#if:{{{NameLink|}}}|[[{{{NameLink}}}|{{{Name}}}]]|[[{{{Name|Critterpedia}}}]]}}
 
{{!}}}</div></includeonly><noinclude>{{Documentation}}[[Category:Navbox templates]]</noinclude>
 
{{!}}}</div></includeonly><noinclude>{{Documentation}}[[Category:Navbox templates]]</noinclude>

Revision as of 04:44, October 24, 2021

Template documentation (view)


Usage

{{Navbox Collection
| Name   = 
| Icon   = 
| Size   = 
| Type   = 
}}

This template is intended for use with Template:Navbox and supersedes Template:CollectionNavList. It populates navlists with a bubble containing the name and icon of an item. The bubbles are arranged responsively, so there is no need to separate them into different rows (and doing so will break the grid arrangement).

The parameters are as follows:

  • Name sets the displayed name and link of an item
    • NameLink is an optional parameter that allows you to set a link that is different to the displayed name (necessary for disambiguated articles)
  • Icon allows an image file to be specified that will be displayed on the left side of the bubble.
  • Size scales the icon to the specified size in pixels. Larger images should be set to a small size so as to not stretch the height of the bubble.
  • Type sets the color of the background. The following types are supported:
    • Art
    • Fossil
    • Gyroid
    • Bug
    • Fish
    • Sea Creature
    • Shell
    • Music
    • CustomColor allows you to set a custom HTML color and defaults to ffffff

The following optional parameters can also be used to modify the display of this template:

  • Japanese setting this to yes will italicise the displayed name, which indicates that the name has not been localized from Japanese.

Example

{{Navbox Collection
| Name   = Red Snapper
| Icon   = Red Snapper NH Icon.png
| Size   = 26px
| Type   = Fish
}}
{{Navbox Collection
| Name = Anchovy
| NameLink = Anchovy (fish)
| Icon = Anchovy (Fish) NH Icon.png
| Size = 30px
| Type = Fish
}}