Difference between revisions of "Template:House Info"

From Nookipedia, the Animal Crossing wiki
(Adding game-specific missing interior photo categories)
(Converting hard widths to max-widths to allow for mobile scaling)
 
(16 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly>{{#ifeq: {{{game|}}} | NH | {{House Info/CargoAttachNH}}}}
+
<div class="house-flex-container" style="max-width: max-content; background: #B3DAE7; border: 2px solid #8CBCD1; text-align: center; {{roundy|8px}};">
{{#ifeq: {{{game|}}} | NH | {{#cargo_store:
+
<div class="house-flex-item house-img" style="padding:5px;">{{#ifexist:File:House of {{PAGENAME}} {{{game|}}} Model.png|[[File:House of {{PAGENAME}} {{{game|}}} Model.png]]|{{#ifexist:File:House of {{PAGENAME}} {{{game|}}} Exterior.png|[[File:House of {{PAGENAME}} {{{game|}}} Exterior.png]]|{{#if:{{{ext|}}}|[[File:{{{ext|}}}]]|[[File:nia blue upload.png|link=Special:Upload]]<includeonly>[[Category:Villagers missing an exterior photo]]</includeonly>{{#ifeq: {{{game|}}} | NH | <includeonly>[[Category:Villagers missing a New Horizons exterior photo]]</includeonly> | }}{{#ifeq: {{{game|}}} | NL | <includeonly>[[Category:Villagers missing a New Leaf exterior photo]]</includeonly> | }}{{#ifeq: {{{game|}}} | PG | <includeonly>[[Category:Villagers missing an Animal Crossing exterior photo]]</includeonly> | }}{{#ifeq: {{{game|}}} | DnM | <includeonly>[[Category:Villagers missing a Doubutsu no Mori exterior photo]]</includeonly>}}}}}}}}</div>
_table=nh_house
+
<div class="house-flex-item house-img" style="padding:5px;">{{#if:{{{int|}}}|[[File:{{{int|}}}]]|{{#if:{{{image|}}}|[[File:{{{image|}}}]]<includeonly>[[Category:Pages with an outdated house template]]</includeonly>|[[File:nia blue upload.png|link=Special:Upload]]<includeonly>[[Category:Villagers missing an interior photo]]</includeonly>{{#ifeq: {{{game|}}} | NH | <includeonly>[[Category:Villagers missing a New Horizons interior photo]]</includeonly> | }}{{#ifeq: {{{game|}}} | NL | <includeonly>[[Category:Villagers missing a New Leaf interior photo]]</includeonly> | }}{{#ifeq: {{{game|}}} | PG | <includeonly>[[Category:Villagers missing an Animal Crossing interior photo]]</includeonly> | }}{{#ifeq: {{{game|}}} | DnM | <includeonly>[[Category:Villagers missing a Doubutsu no Mori interior photo]]</includeonly> | }}}}}}</div>
|villager = {{#sub: {{PAGENAME}} | 0 | {{#expr: {{#pos: {{PAGENAME}} | (}} - 1}}}}
 
|villager_link = {{PAGENAME}}
 
|interior = {{#if:{{{int|}}}|{{{int|}}}|{{#if:{{{image|}}}|{{{image|}}}}}}}
 
|exterior = {{#ifexist:File:House of {{PAGENAME}} NH Model.png|House of {{PAGENAME}} NH Model.png|{{#ifexist:File:House of {{PAGENAME}} {{{game|}}} Exterior.png|House of {{PAGENAME}} NH Exterior.png|{{#if:{{{ext|}}}|{{{ext|}}}}}}}}}
 
|wallpaper = {{{wallpaper|}}}
 
|wallpaper_img = {{#if:{{{wallpaper-img|}}}|{{{wallpaper-img|}}}|{{#ifexist:File:{{{wallpaper|}}}_NH_Icon.png|{{{wallpaper|}}}_NH_Icon.png|{{#ifexist:File:{{{wallpaper|}}}_HHD_Icon.png|{{{wallpaper|}}}_HHD_Icon.png}}}}}}
 
|flooring = {{{floor|}}}
 
|flooring_img = {{#if:{{{floor-img|}}}|{{{floor-img|}}}|{{#ifexist:File:{{{floor|}}}_NH_Icon.png|{{{floor|}}}_NH_Icon.png|{{#ifexist:File:{{{floor|}}}_HHD_Icon.png|{{{floor|}}}_HHD_Icon.png}}}}}}
 
|music = {{{music|}}}
 
|music_note = {{{music-note|}}}
 
|items = [ {{#forargs: furn | key | value | {{#ifexpr: {{#var: key}} > 1 | , }} {"name": "{{{furn{{#var: key}}|}}}", "count": {{{f{{#var: key}}-count|1}}}, "img": "{{{f{{#var: key}}-img|}}}", "note": "{{{furn{{#var: key }}-note|}}}"}
 
}} ]
 
|notes =
 
}}}}</includeonly>
 
<div class="house-flex-container" style="width: max-content; background: #B3DAE7; border: 2px solid #8CBCD1; text-align: center; {{roundy|8px}};">
 
<div class="house-flex-item house-img" style="padding:5px;">{{#ifexist:File:House of {{PAGENAME}} {{{game|}}} Model.png|[[File:House of {{PAGENAME}} {{{game|}}} Model.png|360px]]|{{#ifexist:File:House of {{PAGENAME}} {{{game|}}} Exterior.png|[[File:House of {{PAGENAME}} {{{game|}}} Exterior.png|360px]]|{{#if:{{{ext|}}}|[[File:{{{ext|}}}|360px]]|[[File:nia blue upload.png|link=Special:Upload]]}}}}}}</div>
 
<div class="house-flex-item house-img" style="padding:5px;">{{#if:{{{int|}}}|[[File:{{{int|}}}]]|{{#if:{{{image|}}}|[[File:{{{image|}}}|360px]]<includeonly>[[Category:Pages with an outdated house template]]</includeonly>|[[File:nia blue upload.png|link=Special:Upload]]<includeonly>[[Category:Villagers missing an interior photo]]</includeonly>{{#ifeq: {{{game|}}} | NH | <includeonly>[[Category:Villagers missing a New Horizons interior photo]]</includeonly> | }}{{#ifeq: {{{game|}}} | NL | <includeonly>[[Category:Villagers missing a New Leaf interior photo]]</includeonly> | }}{{#ifeq: {{{game|}}} | PG | <includeonly>[[Category:Villagers missing an Animal Crossing interior photo]]</includeonly> | }}{{#ifeq: {{{game|}}} | DnM | <includeonly>[[Category:Villagers missing a Doubutsu no Mori interior photo]]</includeonly> | }}}}}}</div>
 
 
<div class="house-flex-item" style="display: table-cell; vertical-align: middle;">
 
<div class="house-flex-item" style="display: table-cell; vertical-align: middle;">
{| style="width: 360px; padding:0px 6px 6px 3px; text-align:right;"
+
{| style="max-width: 360px; padding:0px 6px 6px 3px; text-align:right;"
| style="padding: 3px; vertical-align:top;" | '''Style:'''
 
| style="background: #ffffff; padding: 0 0 0 10px; text-align:left; {{roundytop|8px}};" | {{{style|No style}}}
 
|-
 
 
| style="padding: 3px; vertical-align:top;" | '''Items:'''
 
| style="padding: 3px; vertical-align:top;" | '''Items:'''
| style="background: #ffffff; padding: 0 3px 0 7px; text-align:{{#if:{{{furniture|}}}|left|center}};" | {{#if:{{{furniture|}}}|{{{furniture|}}}<includeonly>[[Category:Pages with an outdated house template]]</includeonly>|
+
| style="background: #ffffff; padding: 0 3px 0 7px; {{roundytop|8px}}; text-align:{{#if:{{{furniture|}}}|left|center}};" | {{#if:{{{furniture|}}}|{{{furniture|}}}<includeonly>[[Category:Pages with an outdated house template]]</includeonly>|
 
<div style="display:inline-block;">{{(!}} style{{=}}"text-align:left;"
 
<div style="display:inline-block;">{{(!}} style{{=}}"text-align:left;"
 
{{#forargs: furn
 
{{#forargs: furn
Line 31: Line 11:
 
  | value
 
  | value
 
  | <nowiki />
 
  | <nowiki />
{{#if:{{{f{{#var: key }}-img|}}}|{{!}} [[File:{{{f{{#var: key }}-img|}}}|24px|link=]]|{{#if:{{{furn{{#var: key }}|}}}|{{!}} {{#switch:{{{game|}}}|DnM|DnM+|PG|GC|DnMe+|e+|E+={{#ifexist:File:{{{furn{{#var: key }}|}}}_PG_Icon.png|[[File:{{{furn{{#var: key }}|}}}_PG_Icon.png|24px|link=]]|{{#ifexist:File:{{{furn{{#var: key }}|}}}_HHD_Icon.png|[[File:{{{furn{{#var: key }}|}}}_HHD_Icon.png|24px|link=]]|{{MIA|24px}}}}}}|WW={{#ifexist:File:{{{furn{{#var: key }}|}}}_WW.png|[[File:{{{furn{{#var: key }}|}}}_WW.png|24px|link=]]|{{#ifexist:File:{{{furn{{#var: key }}|}}}_HHD_Icon.png|[[File:{{{furn{{#var: key }}|}}}_HHD_Icon.png|24px|link=]]|{{MIA|24px}}}}}}|#default={{#ifexist:File:{{{furn{{#var: key }}|}}}_{{{game|HHD}}}_Icon.png|[[File:{{{furn{{#var: key }}|}}}_{{{game|HHD}}}_Icon.png|24px|link=]]|{{#ifexist:File:{{{furn{{#var: key }}|}}}_HHD_Icon.png|[[File:{{{furn{{#var: key }}|}}}_HHD_Icon.png|24px|link=]]|{{MIA|24px}}}}}}}}|}}}}&nbsp;<span style="font-size:.85em">{{#ifeq:{{{game|}}}|NH|[[Item:{{{furn{{#var: key }}|}}} (New Horizons)|{{{furn{{#var: key }}|}}}]]|{{{furn{{#var: key }}|}}}}}{{#if: {{{furn{{#var: key }}-note|}}} | {{tt|*|{{{furn{{#var: key }}-note|}}}}} }}</span>
+
{{#if:{{{f{{#var: key }}-img|}}}|{{!}} [[File:{{{f{{#var: key }}-img|}}}|24px|alt=|link=]]|{{#if:{{{furn{{#var: key }}|}}}|{{!}} {{#switch:{{{game|}}}|DnM|DnM+|PG|GC|DnMe+|e+|E+={{#ifexist:File:{{{furn{{#var: key }}|}}}_PG_Icon.png|[[File:{{{furn{{#var: key }}|}}}_PG_Icon.png|24px|alt=|link=]]|{{#ifexist:File:{{{furn{{#var: key }}|}}}_HHD_Icon.png|[[File:{{{furn{{#var: key }}|}}}_HHD_Icon.png|24px|alt=|link=]]|{{MIA|24px}}}}}}|WW={{#ifexist:File:{{{furn{{#var: key }}|}}}_WW.png|[[File:{{{furn{{#var: key }}|}}}_WW.png|24px|alt=|link=]]|{{#ifexist:File:{{{furn{{#var: key }}|}}}_HHD_Icon.png|[[File:{{{furn{{#var: key }}|}}}_HHD_Icon.png|24px|alt=|link=]]|{{MIA|24px}}}}}}|#default={{#ifexist:File:{{{furn{{#var: key }}|}}}_{{{game|HHD}}}_Icon.png|[[File:{{{furn{{#var: key }}|}}}_{{{game|HHD}}}_Icon.png|24px|alt=|link=]]|{{#ifexist:File:{{{furn{{#var: key }}|}}}_HHD_Icon.png|[[File:{{{furn{{#var: key }}|}}}_HHD_Icon.png|24px|alt=|link=]]|{{MIA|24px}}}}}}}}|}}}}&nbsp;<span style="font-size:.85em">{{#ifeq:{{{game|}}}|NH|[[Item:{{{furn{{#var: key }}|}}} (New Horizons)|{{{furn{{#var: key }}|}}}]]|{{{furn{{#var: key }}|}}}}}{{#if: {{{furn{{#var: key }}-note|}}} | {{tt|*|{{{furn{{#var: key }}-note|}}}}} }}</span>
 
{{#ifexpr: {{#var: key }} mod 2 | | {{!-}} }}
 
{{#ifexpr: {{#var: key }} mod 2 | | {{!-}} }}
 
}}
 
}}
Line 37: Line 17:
 
}}
 
}}
 
|-
 
|-
| style="padding: 3px; vertical-align:top;" | '''Wallpaper:'''
+
| style="padding: 3px; vertical-align:top;" | '''Wall:'''
| style="background: #ffffff; padding: 0 0 0 7px; text-align:left;" | {{#if:{{{wallpaper-img|}}}|[[File:{{{wallpaper-img|}}}|24px|link=]]|{{#ifexist:File:{{{wallpaper|}}}_{{{game|HHD}}}_Icon.png|[[File:{{{wallpaper|}}}_{{{game|HHD}}}_Icon.png|24px|link=]]|{{#ifexist:File:{{{wallpaper|}}}_HHD_Icon.png|[[File:{{{wallpaper|}}}_HHD_Icon.png|24px|link=]]|{{MIA|24px}}}}}}}}&nbsp;<span style="font-size:.85em">{{#ifeq:{{{game|}}}|NH|[[Item:{{{wallpaper|No Wallpaper}}} (New Horizons)|{{{wallpaper|No Wallpaper}}}]]|{{{wallpaper|No Wallpaper}}}}}</span>
+
| style="background: #ffffff; padding: 0 0 0 7px; text-align:left;" | {{#if:{{{wallpaper-img|}}}|[[File:{{{wallpaper-img|}}}|24px|alt=|link=]]|{{#ifexist:File:{{{wallpaper|}}}_{{{game|HHD}}}_Icon.png|[[File:{{{wallpaper|}}}_{{{game|HHD}}}_Icon.png|24px|alt=|link=]]|{{#ifexist:File:{{{wallpaper|}}}_HHD_Icon.png|[[File:{{{wallpaper|}}}_HHD_Icon.png|24px|alt=|link=]]|{{MIA|24px}}}}}}}}&nbsp;<span style="font-size:.85em">{{#ifeq:{{{game|}}}|NH|[[Item:{{{wallpaper|No Wallpaper}}} (New Horizons)|{{{wallpaper|No Wallpaper}}}]]|{{{wallpaper|No Wallpaper}}}}}</span>
 
|-
 
|-
 
| style="padding: 3px; vertical-align:top;" | '''Floor:'''
 
| style="padding: 3px; vertical-align:top;" | '''Floor:'''
| style="background: #ffffff; padding: 0 0 0 7px; text-align:left;" | {{#if:{{{floor-img|}}}|[[File:{{{floor-img|}}}|24px|link=]]|{{#ifexist:File:{{{floor|}}}_{{{game|HHD}}}_Icon.png|[[File:{{{floor|}}}_{{{game|HHD}}}_Icon.png|24px|link=]]|{{#ifexist:File:{{{floor|}}}_HHD_Icon.png|[[File:{{{floor|}}}_HHD_Icon.png|24px|link=]]|{{MIA|24px}}}}}}}}&nbsp;<span style="font-size:.85em">{{#ifeq:{{{game|}}}|NH|[[Item:{{{floor|No Floor}}} (New Horizons)|{{{floor|No Floor}}}]]|{{{floor|No Floor}}}}}</span>
+
| style="background: #ffffff; padding: 0 0 0 7px; text-align:left;" | {{#if:{{{floor-img|}}}|[[File:{{{floor-img|}}}|24px|alt=|link=]]|{{#ifexist:File:{{{floor|}}}_{{{game|HHD}}}_Icon.png|[[File:{{{floor|}}}_{{{game|HHD}}}_Icon.png|24px|alt=|link=]]|{{#ifexist:File:{{{floor|}}}_HHD_Icon.png|[[File:{{{floor|}}}_HHD_Icon.png|24px|alt=|link=]]|{{MIA|24px}}}}}}}}&nbsp;<span style="font-size:.85em">{{#ifeq:{{{game|}}}|NH|[[Item:{{{floor|No Floor}}} (New Horizons)|{{{floor|No Floor}}}]]|{{{floor|No Floor}}}}}</span>
 
|-
 
|-
 
| style="padding: 3px; vertical-align:top;" | '''Music:'''
 
| style="padding: 3px; vertical-align:top;" | '''Music:'''
| style="background: #ffffff; padding: 0 0 0 10px; text-align:left; {{roundybl|8px}}; {{roundybr|8px}}" | {{#if: {{{music|}}} | {{#ifeq: {{{music|}}} | No music | No music | [[{{{music|}}}]]}}}} {{#if: {{{music-note|}}} | {{Note|{{{music-note|}}}}}}}
+
| style="background: #ffffff; padding: 0 0 0 10px; text-align:left; {{roundybl|8px}}; {{roundybr|8px}}" | {{#if:{{{music|}}}|[[{{{music|}}}]]|No music}} {{#if: {{{music-note|}}} | {{Note|{{{music-note|}}}}}}}
 
|}
 
|}
 
</div>
 
</div>
 
</div><includeonly>{{#ifeq:{{{game|}}}|NH|{{#if:{{{wallpaper|}}}||[[Category:ACNH house info missing]]}}{{#if:{{{floor|}}}||[[Category:ACNH house info missing]]}}{{#if:{{{music|}}}||[[Category:ACNH house info missing]]}}}}</includeonly><noinclude><br>{{Documentation}}</noinclude>
 
</div><includeonly>{{#ifeq:{{{game|}}}|NH|{{#if:{{{wallpaper|}}}||[[Category:ACNH house info missing]]}}{{#if:{{{floor|}}}||[[Category:ACNH house info missing]]}}{{#if:{{{music|}}}||[[Category:ACNH house info missing]]}}}}</includeonly><noinclude><br>{{Documentation}}</noinclude>

Latest revision as of 17:53, October 22, 2021

Nia blue upload.png
Nia blue upload.png
Items:
Wall: SpringLeaf.png No Wallpaper
Floor: SpringLeaf.png No Floor
Music: No music


Template documentation (view)


Usage

{{House
|game          = (game abbreviation e.g. NH)
|ext           = (image location, without 'File:' prefix)
|int           = (image location, without 'File:' prefix)
|style         =
|furn1         =
|f1-img        = (optional, to specify file with non-standard name, without 'File:' prefix)
...
|furn14        =
|wallpaper     =
|wallpaper-img = (optional, to specify file with non-standard name, without 'File:' prefix)
|floor         = 
|floor-img     = (optional, to specify file with non-standard name, without 'File:' prefix)
|music         =
}}
  • image parameter is depreciated. Replace with int if seen.

Notes

  • 01/11/20 - The furniture parameter has been depreciated. Instead the parameters f1 through f14 are to be used to list the furniture items individually. Doing this will create a more visual list of the furniture in the villager's home using furniture icons. The furniture names should be properly spelled and capitalized, otherwise the template will fail to find the correct image associated with the furniture item. Additionally, the imagesize parameter is no longer functional.
  • 03/29/20 - Added game parameter which will allow specification of icons from specific games. The file name still needs to be in the standard format for proper display (e.g. Blue Bed NH Icon.png)
  • 03/30/20 - Added int and ext parameters for interior and exterior images respectively. int replaces image. If no exterior image has been specified, the template will attempt to find one at File:House of {{PAGENAME}} {{{game|NH}}} Exterior.png.
  • 04/05/20 - Template may now categorize villager pages into one or more of the following categories: Category:Pages with an outdated house template, Category:Villagers missing an exterior photo, Category:Villagers missing an interior photo. Template no longer categorizes pages into Category:Image wanted.
  • 04/14/20 - Template will now use E+ item images for DnMe+ and prior. WW images will also display by default if 'WW' is designated as the game.
  • 06/09/10 - f# params have been replaced with furn#; this enables us to use the Loops extension to generate each furniture listing, instead of having 23 copies of the same code.