Difference between revisions of "Template:Table cell"

From Nookipedia, the Animal Crossing wiki
(Adding No option)
(Tweaking colours for villager, islander and amiibo to be slightly less vibrant like the others are)
 
(12 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 
<noinclude>{| class="wikitable"
 
<noinclude>{| class="wikitable"
 
|-
 
|-
|</noinclude>style="background: #{{#switch: {{{1|}}}
+
|</noinclude>style="background: #{{#switch: {{lc:{{{1|}}}}}
|Yes          = 8de28d
+
|yes=8de28d
|No          = #FFCCCC
+
|no=ffcccc
|Villager    = 8de28d
+
|villager=aeeaae
|Islander    = 87ddfe
+
|islander=9ae2fe
|e+          = f4f77c
+
|amiibo=fbc79d
|e+ Islander  = 87ddfe
+
|nh1.9=ccccff
|amiibo      = f9ab6c
+
|nh2.0=c2d6cf
|Client      = fd9b9c
+
|cut=E6E6E6
|Contact      = f9e1a6
+
|bug=EDF9D2
|Cut          = E6E6E6
+
|fish=CCEEFF
|Bug          = EDF9D2
+
|sea creature=CCE1FF
|Fish        = CCEEFF
+
|green=8de28d
|Sea Creature = CCE1FF
+
|yellow=f4f77c
|Custom      = {{{color|}}}
+
|orange=f9ab6c
|#default     = E6E6E6
+
|red=ffcccc
  }}; color: {{#if: {{{game|}}} | <nowiki>#</nowiki>70b470 | black}}; vertical-align: {{#if: {{{game|}}} | bottom | middle}}; text-align: {{#if: {{{game|}}} | right | {{{align|center}}}}}; {{{style|}}}" class="table-yes" {{#if: {{{rowspan|}}}|rowspan="{{{rowspan}}}"}} | {{#if: {{{game|}}} | <div style{{=}}"vertical-align: middle; text-align:center">}}{{#switch: {{{1|}}}
+
|gray=E6E6E6
|Yes        = [[File:Green check.svg|20px|alt={{{1|Yes}}}|link=]]
+
|custom={{{color|}}}
|No          = [[File:Red x.png|20px|alt={{{1|Yes}}}|link=]]
+
|#default=E6E6E6
|Villager    = [[File:Tree icon.png|20px|alt={{{1|Yes}}}|link=Villager|Appears as a Villager]]
+
  }}; color: {{#if: {{{game|}}} | <nowiki>#</nowiki>70b470 | black}}; vertical-align: {{#if: {{{game|}}} | bottom | middle}}; text-align: {{#if: {{{game|}}} | right | {{{align|center}}}}}; {{{style|}}}" class="table-yes" {{#if: {{{rowspan|}}}|rowspan="{{{rowspan}}}"}} | {{#if: {{{game|}}} | <div style{{=}}"vertical-align: middle; text-align:center">}}{{#switch: {{lc:{{{1|}}}}}
|Islander    = [[File:Animal Island PG Icon.png|15px|alt={{{1|Yes}}}|link=Islander|Appears as an Islander]]
+
|yes=[[File:Green check.svg|20px|alt={{{1|Yes}}}|link={{{link|}}}]]
|e+          = [[File:E+ logo.png|20px|alt={{{1|Yes}}}|link=Doubutsu no Mori e+|Appears only in ''Doubutsu no Mori e+'']]
+
|no=[[File:Red x.png|20px|alt={{{1|Yes}}}|link={{{link|}}}]]
|e+ Islander = [[File:E+ logo.png|20px|alt={{{1|Yes}}}|link=Doubutsu no Mori e+|Appears only in ''Doubutsu no Mori e+'']][[File:Animal Island PG Icon.png|15px|alt={{{1|Yes}}}|link=Islander|Appears as an Islander]]
+
|villager=[[File:Tree icon.png|20px|alt={{{1|Yes}}}|link=Villager|Appears as a villager]]
|amiibo      = [[File:Amiibo Icon.png|32px|alt={{{1|Yes}}}|link=Welcome amiibo update|Appears in ''Welcome amiibo'']]
+
|islander=[[File:Animal Island PG Icon.png|15px|alt={{{1|Yes}}}|link=Islander|Appears as an islander]]
|Client      = [[File:ACHHD Happy Home Academy logo.png|30px|alt={{{1|Yes}}}|link=Villager|Appears as a Client]]
+
|amiibo=[[File:amiibo Icon.png|32px|alt={{{1|Yes}}}|link=Welcome amiibo update|Added with ''Welcome amiibo'' update]]
|Contact      = [[File:ACPC Campground logo.png|25px|alt={{{1|Yes}}}|link=Villager|Appears as a Contact]]
+
|nh1.9=[[File:Rilla NH Villager Icon.png|25px|alt{{{1|Yes}}}|link=Animal Crossing: New Horizons/Update history/1.9.0|Added with New Horizons v1.9 update]]
|Cut          = [[File:Acnl-silveraxe.png|25px|alt={{{1|Yes}}}|link=Villager|Data exists in game but is unused]]
+
|nh2.0=[[File:Brewster NH Character Icon.png|25px|alt={{{1|Yes}}}|link=Animal Crossing: New Horizons/Update history/2.0|Added with New Horizons v2.0 update]]
|Bug          = [[File:Bug NH Icon.png|30px|alt={{{1|Yes}}}|link=|Bug]]
+
|cut=[[File:Silver Axe NL Icon.png|25px|alt={{{1|Yes}}}|link=Villager|Data exists in game but is unused]]
|Fish        = [[File:Fish NH Icon.png|30px|alt={{{1|Yes}}}|link=|Fish]]
+
|bug=[[File:Bug NH Icon.png|30px|alt={{{1|Yes}}}|link=|Bug]]
|Sea Creature = [[File:Sea Creature NH Icon.png|30px|alt={{{1|Yes}}}|link=|Sea Creature]]
+
|fish=[[File:Fish NH Icon.png|30px|alt={{{1|Yes}}}|link=|Fish]]
|Custom      = {{{icon|}}}
+
|sea creature=[[File:Sea Creature NH Icon.png|30px|alt={{{1|Yes}}}|link=|Sea creatures]]
|#default     =
+
|green=[[File:Green Circle.png|20px|alt={{{1|Yes}}}|link=]]
 +
|yellow=[[File:Yellow Circle.png|20px|alt={{{1|Yes}}}|link=]]
 +
|orange=[[File:Orange Circle.png|20px|alt={{{1|Yes}}}|link=]]
 +
|red=[[File:Red Circle.png|20px|alt={{{1|Yes}}}|link=]]
 +
|gray=[[File:Gray Circle.png|20px|alt={{{1|Yes}}}|link=]]
 +
|custom={{{icon|}}}
 +
|#default=
 
  }} {{#if: {{{game|}}} |</div> <small>{{{game|}}}&nbsp;</small>}}<noinclude>
 
  }} {{#if: {{{game|}}} |</div> <small>{{{game|}}}&nbsp;</small>}}<noinclude>
 
|}
 
|}
 
{{Documentation}}[[Category:Templates]]</noinclude>
 
{{Documentation}}[[Category:Templates]]</noinclude>

Latest revision as of 17:10, April 19, 2024

Template documentation (view)


Usage

{{Table cell}}

This template is to be used to populate cells in tables with a pre-configured icon, background color, link and tooltip text. There is also the option to create a custom cell use a specified color and icon. By default, the template will create an empty gray-colored cell which is commonly used to denote a blank or non-applicable entry in a table.

As the template populates cells, it will only display correctly when it is used within tables.

The default parameter supports the following pre-configured types of cells:

Yes No Green Yellow Orange Red Gray Villager Islander amiibo nh1.9 nh2.0 Cut Bug Fish Sea Creature Default
Yes No Green Yellow Orange Red Gray Villager Islander amiibo Added with New Horizons v1.9 update nh2.0 Cut Bug Fish Sea Creature

The following optional parameters is also supported:

  • game will display the specified text in the lower right corner of the cell. This is intended to be used to display the abbreviation of games in the series.

If the cell type is set to Custom the following parameters can be used to create a customised cell:

  • Color sets the cell background to the specified HTML color
  • Icon sets the icon to the specified image file

Example

{{Table cell|Villager}}
Villager

Text can be added to display in the lower-right corner of the cell:

{{Table cell|Villager|game=AC}}
Villager
AC 

A custom cell can be created like so:

{{Table cell|Custom|color=cad3c5|icon=[[File:Tortimer NH Character Icon.png|20px|link=Tortimer|Tortimer!]]}}
Tortimer!