Difference between revisions of "Template:Infobox Town"

From Nookipedia, the Animal Crossing wiki
(Switching to CSS colour class)
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{Infobox 2.0
 
{{Infobox 2.0
 +
| colorclass    = color-town
 
  | title          = {{{name|{{PAGENAME}}}}}
 
  | title          = {{{name|{{PAGENAME}}}}}
 
  | primarycolor  = 107 29
 
  | primarycolor  = 107 29
  | image          = [[File:{{{map|Nia.png}}}|{{{imagesize|200px}}}]]
+
  | image          = {{#if:{{{map|}}}|[[File:{{{map}}}|{{#if:{{{crisp-map|}}}|class=sprite{{!}}}}{{{map-imagesize|{{{imagesize|200px}}}}}}]]|{{#if:{{{photo|}}}|[[File:{{{photo}}}|{{#if:{{{crisp-photo|}}}|class=sprite{{!}}}}{{{photo-imagesize|{{{imagesize|200px}}}}}}]]}}}}
 
  | caption        = {{{caption|}}}
 
  | caption        = {{{caption|}}}
  | image2        = {{#if:{{{photo|}}}|[[File:{{{photo}}}|{{{imagesize|200px}}}]]}}
+
  | image2        = {{#if:{{{map|}}}|{{#if:{{{photo|}}}|[[File:{{{photo}}}|{{#if:{{{crisp-photo|}}}|class=sprite{{!}}}}{{{photo-imagesize|{{{imagesize|200px}}}}}}]]}}}}
 
  | caption2      = {{{caption2|}}}
 
  | caption2      = {{{caption2|}}}
  
Line 11: Line 12:
 
  | widelabel2    = Creator Code
 
  | widelabel2    = Creator Code
 
  | widedata2      = {{{creator code|}}}
 
  | widedata2      = {{{creator code|}}}
 +
| widelabel3    = Friend Code
 +
| widedata3      = {{{friend code|}}}
  
 
  | label          = Game
 
  | label          = Game
Line 16: Line 19:
 
  | label2        = {{#ifeq:{{{game|}}}|{{NL}}|Mayor|Player}}
 
  | label2        = {{#ifeq:{{{game|}}}|{{NL}}|Mayor|Player}}
 
  | data2          = {{{mayor|}}}  
 
  | data2          = {{{mayor|}}}  
  | label3        = Creation date  
+
  | {{#ifeq:{{{game|}}}|{{NL}}||NULL}}label3         = Player
  | data3         = {{{created|}}}  
+
| {{#ifeq:{{{game|}}}|{{NL}}||NULL}}data3          = {{{player|}}}
  | label4         = Native fruit
+
| label4         = Creation date  
  | data4         = {{#if:{{{nativefruit|}}}|{{#switch:{{{nativefruit|Apples}}}| Apples = [[File:Fruit Apple NH Icon.png|20px|link=]] Apples | Pears = [[File:Fruit Pear NH Icon.png|20px|link=]] Pears | Cherries = [[File:Fruit Cherry NH Icon.png|20px|link=]] Cherries | Oranges = [[File:Fruit Orange NH Icon.png|20px|link=]] Oranges | Peaches = [[File:Fruit Peach NH Icon.png|20px|link=]] Peaches}}|}}
+
  | data4         = {{{created|}}}  
  | label5         = Hemisphere
+
  | label5         = Native fruit
  | data5         = {{#switch: {{{hemisphere|}}} |Northern = [[File:Northern Hemisphere icon.png|20px|link=]] [[Northern Hemisphere|Northern]]|Southern = [[File:Southern Hemisphere icon.png|20px|link=]] [[Southern Hemisphere|Southern]]}}
+
  | data5         = {{#if:{{{nativefruit|}}}|{{#switch:{{{nativefruit|Apples}}}| Apples = [[File:Fruit Apple NH Icon.png|20px|link=]] Apples | Pears = [[File:Fruit Pear NH Icon.png|20px|link=]] Pears | Cherries = [[File:Fruit Cherry NH Icon.png|20px|link=]] Cherries | Oranges = [[File:Fruit Orange NH Icon.png|20px|link=]] Oranges | Peaches = [[File:Fruit Peach NH Icon.png|20px|link=]] Peaches | Lemons = [[File:Lemon PC Icon.png|20px|link=]] Lemons | Grapes = [[File:Grapes PC Icon.png|20px|link=]] Grapes | Lychees = [[File:Lychee PC Icon.png|20px|link=]] Lychees}}|}}
  | label6         = Status
+
  | label6         = Hemisphere
  | data6         = {{#if:{{{status|}}}|<div style="margin: 0 auto; text-align:center; width:150px; height: 20px; {{roundy|9px}} background: #{{#switch: {{{status|}}} |Bot = 8E8E8E |Active = 84ED68 |Around = D2ECBE |Hiatus = A38949 |Inactive = ADC0F5}}">'''{{#switch: {{{status|}}} |Bot = Bot |Active = Active |Around = Around |Hiatus = Hiatus |Inactive = Inactive}}'''</div>}}}}<noinclude>
+
  | data6         = {{#if:{{{hemisphere|}}}|{{#switch:{{{hemisphere|Northern}}} |Northern = [[File:Northern Hemisphere icon.png|20px|link=]] [[Hemisphere|Northern]]|Southern = [[File:Southern Hemisphere icon.png|20px|link=]] [[Hemisphere|Southern]]}}|}}
{{clear}}
+
  | label7         = Status
 +
  | data7         = {{#if:{{{status|}}}|<div style="margin: 0 auto; text-align:center; width:150px; height: 20px; {{roundy|9px}} background: #{{#switch: {{{status|}}} |Bot = 8E8E8E |Active = 84ED68 |Around = D2ECBE |Hiatus = A38949 |Inactive = ADC0F5}}">'''{{#switch: {{{status|}}} |Bot = Bot |Active = Active |Around = Around |Hiatus = Hiatus |Inactive = Inactive}}'''</div>}}}}<noinclude>
 +
{{Clear}}
 +
 
 
==Usage==
 
==Usage==
<pre>
+
===General Template===
 +
<pre>{{Infobox Town
 +
|name =
 +
|map =
 +
|map-imagesize =
 +
|photo =
 +
|photo-imagesize =
 +
|dream code =
 +
|creator code =
 +
|friend code =
 +
|game =
 +
|mayor =
 +
|player = (only for New Leaf)
 +
|created =
 +
|nativefruit = (Apples, Pears, Cherries, Oranges, Peaches) (Lemons, Grapes, Lychees)
 +
|hemisphere = (Northern, Southern)
 +
|status = (Bot, Active, Around, Hiatus, Inactive)
 +
}}</pre>
 +
===Example===
 
{{Infobox Town
 
{{Infobox Town
|name=  
+
|name = Sundale
|map=  
+
|map = NH Map.jpg
|photo=  
+
|map-imagesize = 300px
|imagesize=  
+
|photo = Mystery Island 20 NH.jpg
|game=  
+
|photo-imagesize = 300px
|created=  
+
|dream code = DA-0123-4567-8910
|mayor=  
+
|creator code = MA-0123-4567-8910
|dream code=
+
|game = {{NH}}
|hemisphere=
+
|mayor = Sunny
|status=
+
|created = March 20, 2020
|nativefruit=  
+
|nativefruit = Apples
 +
|hemisphere = Southern
 +
|status = Around
 
}}
 
}}
</pre>
+
<pre>{{Infobox Town
<noinclude>
+
|name = Sundale
[[Category:Personal templates]]
+
|map = NH Map.jpg
 +
|map-imagesize = 300px
 +
|photo = Mystery Island 20 NH.jpg
 +
|photo-imagesize = 300px
 +
|dream code = DA-0123-4567-8910
 +
|creator code = MA-0123-4567-8910
 +
|game = {{NH}}
 +
|mayor = Sunny
 +
|created = March 20, 2020
 +
|nativefruit = Apples
 +
|hemisphere = Southern
 +
|status = Around
 +
}}</pre>
 +
[[Category:Personal templates]][[Category:Infobox templates]]</noinclude>

Latest revision as of 03:51, May 18, 2024

No image available

Usage

General Template

{{Infobox Town
|name = 
|map = 
|map-imagesize = 
|photo = 
|photo-imagesize = 
|dream code = 
|creator code = 
|friend code = 
|game = 
|mayor = 
|player = (only for New Leaf)
|created = 
|nativefruit = (Apples, Pears, Cherries, Oranges, Peaches) (Lemons, Grapes, Lychees)
|hemisphere = (Northern, Southern)
|status = (Bot, Active, Around, Hiatus, Inactive)
}}

Example

NH Map.jpg
Mystery Island 20 NH.jpg
Dream Address
DA-0123-4567-8910
Creator Code
MA-0123-4567-8910
Game Animal Crossing: New Horizons
Player Sunny
Creation date March 20, 2020
Native fruit Fruit Apple NH Icon.png Apples
Hemisphere Southern Hemisphere icon.png Southern
Status
Around
{{Infobox Town
|name = Sundale
|map = NH Map.jpg
|map-imagesize = 300px
|photo = Mystery Island 20 NH.jpg
|photo-imagesize = 300px
|dream code = DA-0123-4567-8910
|creator code = MA-0123-4567-8910
|game = {{NH}}
|mayor = Sunny
|created = March 20, 2020
|nativefruit = Apples
|hemisphere = Southern
|status = Around
}}