Difference between revisions of "Template:PGHouse"

From Nookipedia, the Animal Crossing wiki
(Converting hard widths to max-widths to allow for mobile scaling)
(Minor change to allow changing the link to a song (for Senor K.K./K.K. Mariachi, K.K. D&B, Go K.K. Rider).)
(6 intermediate revisions by 3 users not shown)
Line 23: Line 23:
 
{{#ifeq:{{NAMESPACE}}||{{#cargo_store:
 
{{#ifeq:{{NAMESPACE}}||{{#cargo_store:
 
_table=pg_house
 
_table=pg_house
|villager = {{#cargo_query:table=villager|fields=name|where=_pageTitle="{{PAGENAME}}"|no html}}
+
|villager = {{{name|{{PAGENAME}}}}}
 
|islander = {{#if:{{{islander|}}}|Yes|No}}
 
|islander = {{#if:{{{islander|}}}|Yes|No}}
 
|game = {{#if:{{{game|}}}|{{{game|}}}|PG}}
 
|game = {{#if:{{{game|}}}|{{{game|}}}|PG}}
Line 44: Line 44:
 
|notes =  
 
|notes =  
 
}}}}</includeonly><div class="house-flex-container" style="max-width: max-content; background: #B3DAE7; border: 2px solid #8CBCD1; text-align: center; {{roundy|8px}};">
 
}}}}</includeonly><div class="house-flex-container" style="max-width: max-content; background: #B3DAE7; border: 2px solid #8CBCD1; text-align: center; {{roundy|8px}};">
<div class="house-flex-item house-img" style="padding:5px;">{{#if:{{{ext|}}}|[[File:{{{ext|}}}|Exterior of {{PAGENAME}}'s house in {{{{{game|PG}}}|nolink}}]]|[[File:nia blue upload.png|link=Special:Upload]]}}</div>
+
<div class="house-flex-item house-img" style="padding:5px;">{{#if:{{{ext|}}}|[[File:{{{ext|}}}|Exterior of {{PAGENAME}}'s house in {{{{#ifexist:{{{game|}}}|{{{game|}}}|{{#switch: {{{game|}}}| DnM, DnM+ = DnM+| PG, DnMe+ = PG}}}}|nolink}}]]|[[File:nia blue upload.png|link=Special:Upload]]}}</div>
<div class="house-flex-item house-img" style="padding:5px;">{{#if:{{{int|}}}|[[File:{{{int|}}}|Interior of {{PAGENAME}}'s house in {{{{{game|PG}}}|nolink}}]]|[[File:nia blue upload.png|link=Special:Upload]]}}</div>
+
<div class="house-flex-item house-img" style="padding:5px;">{{#if:{{{int|}}}|[[File:{{{int|}}}|Interior of {{PAGENAME}}'s house in {{{{#ifexist:{{{game|}}}|{{{game|}}}|{{#switch: {{{game|}}}| DnM, DnM+ = DnM+| PG, DnMe+ = PG}}}}|nolink}}]]|[[File:nia blue upload.png|link=Special:Upload]]}}</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="max-width: 360px; padding:0px 6px 6px 3px; text-align:right;"
 
{| style="max-width: 360px; padding:0px 6px 6px 3px; text-align:right;"
Line 55: Line 55:
 
  | value
 
  | value
 
  | <nowiki />
 
  | <nowiki />
{{!}} [[File:{{{f{{#var: key }}-img|{{{furn{{#var: key }}|}}}_PG_Model.png}}}|24px|alt=|link=]]&nbsp;<span style="font-size:.85em">[[{{{f{{#var: key }}-link|Item:{{{furn{{#var: key }}|}}} (Animal Crossing)}}}|{{{furn{{#var: key }}|}}}]]{{#if: {{{f{{#var: key }}-count|}}} | <nowiki /> (x{{{f{{#var: key }}-count|}}}) | }}{{#if: {{{f{{#var: key }}-note|}}} | {{tt|*|{{{f{{#var: key }}-note|}}}}} }}</span>
+
{{!}} [[File:{{{f{{#var: key }}-img|{{{furn{{#var: key }}|}}}_PG_Model.png}}}|24px|alt=|link=]]&nbsp;<span style="font-size:.85em">[[{{{f{{#var: key }}-link|Item:{{{furn{{#var: key }}|}}} (Animal Crossing)}}}|{{{furn{{#var: key }}|}}}]]{{#if: {{{f{{#var: key }}-count|}}} | <nowiki /> (x{{{f{{#var: key }}-count|}}}) | }}{{#if: {{{f{{#var: key }}-note|}}} | {{Note|{{{f{{#var: key }}-note|}}}}} }}</span>
 
{{#ifexpr: {{#var: key }} mod 2 | | {{!-}} }}
 
{{#ifexpr: {{#var: key }} mod 2 | | {{!-}} }}
 
}}
 
}}
Line 68: Line 68:
 
  | value
 
  | value
 
  | <nowiki />
 
  | <nowiki />
{{!}} [[File:{{{r{{#var: key }}-img|{{{req{{#var: key }}|}}}_PG_Model.png}}}|24px|alt=|link=]]&nbsp;<span style="font-size:.85em">[[{{{r{{#var: key }}-link|Item:{{{req{{#var: key }}|}}} (Animal Crossing)}}}|{{{req{{#var: key }}|}}}]]{{#if: {{{r{{#var: key }}-count|}}} | <nowiki /> (x{{{freq{{#var: key }}-count|}}}) | }}{{#if: {{{r{{#var: key }}-note|}}} | {{tt|*|{{{r{{#var: key }}-note|}}}}} }}</span>
+
{{!}} [[File:{{{r{{#var: key }}-img|{{{req{{#var: key }}|}}}_PG_Model.png}}}|24px|alt=|link=]]&nbsp;<span style="font-size:.85em">[[{{{r{{#var: key }}-link|Item:{{{req{{#var: key }}|}}} (Animal Crossing)}}}|{{{req{{#var: key }}|}}}]]{{#if: {{{r{{#var: key }}-count|}}} | <nowiki /> (x{{{freq{{#var: key }}-count|}}}) | }}{{#if: {{{r{{#var: key }}-note|}}} | {{Note|{{{r{{#var: key }}-note|}}}}} }}</span>
 
{{#ifexpr: {{#var: key }} mod 2 | | {{!-}} }}
 
{{#ifexpr: {{#var: key }} mod 2 | | {{!-}} }}
 
}}
 
}}
Line 75: Line 75:
 
|-
 
|-
 
| style="padding: 3px; vertical-align:top;" | '''Wall:'''
 
| style="padding: 3px; vertical-align:top;" | '''Wall:'''
| style="background: #ffffff; padding: 0 0 0 7px; text-align:left;" | [[File:{{{wallpaper|}}}_PG.png|24px|alt=|link=]]&nbsp;<span style="font-size:.85em">[[Item:{{{wallpaper|}}} (Animal Crossing)|{{{wallpaper|}}}]]</span>
+
| style="background: #ffffff; padding: 0 0 0 7px; text-align:left;" | [[File:{{{wallpaper-img|{{{wallpaper|}}}_PG.png}}}|24px|alt=|link=]]&nbsp;<span style="font-size:.85em">[[{{{wall-link|Item:{{{wallpaper|}}} (Animal Crossing)}}}|{{{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;" | [[File:{{{floor|}}}_PG.png|24px|alt=|link=]]&nbsp;<span style="font-size:.85em">[[Item:{{{floor|}}} (Animal Crossing)|{{{floor|}}}]]</span>
+
| style="background: #ffffff; padding: 0 0 0 7px; text-align:left;" | [[File:{{{floor-img|{{{floor|}}}_PG.png}}}|24px|alt=|link=]]&nbsp;<span style="font-size:.85em">[[{{{floor-link|Item:{{{floor|}}} (Animal Crossing)}}}|{{{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|}}}|[[{{{music|}}}]]|No 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-link|{{{music|}}}}}}|{{{music|}}}]]|No music}} {{#if: {{{music-note|}}} | {{Note|{{{music-note|}}}}}}}
 
|}
 
|}
 
</div>
 
</div>
 
</div><includeonly>{{#if:{{{wallpaper|}}}||[[Category:ACGC house info missing]]}}{{#if:{{{floor|}}}||[[Category:ACGC house info missing]]}}</includeonly><noinclude><br>{{Documentation}}</noinclude>
 
</div><includeonly>{{#if:{{{wallpaper|}}}||[[Category:ACGC house info missing]]}}{{#if:{{{floor|}}}||[[Category:ACGC house info missing]]}}</includeonly><noinclude><br>{{Documentation}}</noinclude>

Revision as of 07:46, April 12, 2022

This template defines the table "pg_house". View table.

Nia blue upload.png
Nia blue upload.png
Items:
Requested
items:
Wall: 24px [[Item: (Animal Crossing)|]]
Floor: 24px [[Item: (Animal Crossing)|]]
Music: No music


No documentation for Template:PGHouse exists. Create it.