Template:KeitaArea: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(25 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
{{ | <body> | ||
<div class="infobox"> | |||
<div class="infobox-header"> | |||
{{{Name|{{PAGENAME}}}}} - {{{Region|Unknown}}} | |||
< | </div> | ||
<div class="infobox-content"> | |||
<!-- Map section - handles both single and multiple maps --> | |||
{{#if:{{{Maps|}}} | | |||
<!-- Multiple maps display when Maps parameter is provided --> | |||
<div class="multiple-maps"> | |||
<p class="maps-title">Area Maps</p> | |||
<div | <div class="maps-grid"> | ||
<!-- Define array from Maps parameter --> | |||
[[ | {{#arraydefine:mapArray|{{{Maps}}}}} | ||
<!-- Loop through each map in the array --> | |||
{{#loop: i | 1 | {{#arraysize:mapArray}} | | |||
<!-- Calculate 0-based index --> | |||
{{#vardefine:index|{{#expr:{{#var:i}} - 1}}}} | |||
<!-- Create div for each map --> | |||
<div class="map-item"> | |||
[[File:{{#arrayindex:mapArray|{{#var:index}}}}.png|200px|alt={{#arrayindex:mapArray|{{#var:index}}}}|class=map-thumbnail]] | |||
<p class="map-caption">{{#arrayindex:mapArray|{{#var:index}}}}</p> | |||
</div> | |||
}} | |||
</div> | |||
</div> | |||
| | |||
<!-- Single map display when Map parameter is provided, or default to page name --> | |||
{{#if:{{{Map|}}} | | |||
<div class="single-map"> | |||
<p class="map-title">Area Map</p> | |||
[[File:{{{Map}}}.png|400px|alt={{{Name|{{PAGENAME}}}}} Map|class=map-image]] | |||
</div> | |||
| | |||
<!-- Default map (uses page name as filename) --> | |||
<div class="single-map"> | |||
<p class="map-title">Area Map</p> | |||
[[File:{{PAGENAME}}.png|400px|alt={{PAGENAME}} Map|class=map-image]] | |||
</div> | |||
}} | |||
}} | |||
<div class="minimap-area"> | |||
<p class="MinimapLocation">Minimap Location</p> | |||
[[File:{{{Minimap}}}.gif|200px|alt={{{Name|{{PAGENAME}}}}} | |||
Minimap|class=map-image minimap]] | |||
</div> | |||
}} | |||
<hr /> | |||
<!-- Gym section, shown only if Badge is provided --> | |||
{{#if: {{{Badge|}}} | | |||
<div class="infobox-section"> | |||
<h3>{{{Name|{{PAGENAME}}}}} Gym</h3> | |||
<div class="infoxbox_table_container"> | |||
<table> | |||
<tr> | |||
<td>Gym-leader</td> | |||
<td>{{{GymLeader|Unknown}}}</td> | |||
</tr> | |||
<tr> | |||
<td>Type</td> | |||
<td>[[{{{GymType|Unknown}}}_(type)|{{{GymType|Unknown}}}]]</td> | |||
</tr> | |||
<tr> | |||
<td>Badge</td> | |||
<td>{{{Badge|Unknown}}}</td> | |||
</tr> | |||
</table> | |||
</div> | |||
</div> | |||
}} | |||
<!-- Resources section, shown only if NPCs, Items, or BerryTrees > 0 --> | |||
{{#vardefine:resources|{{#expr:{{{NPCs|0}}}+{{{Items|0}}}+{{{BerryTrees|0}}}}}}} | |||
{{#ifexpr: {{#var:resources}} > 0 | | |||
<div class="infobox-section"> | |||
<h3>Resources</h3> | |||
<div class="infoxbox_table_container"> | |||
<table> | |||
<tr> | |||
<td>Battle NPCs</td> | |||
<td>{{{NPCs|0}}}</td> | |||
</tr> | |||
<tr> | |||
<td>Ground Items</td> | |||
<td>{{{Items|0}}}</td> | |||
</tr> | |||
<tr> | |||
<td>Berry Trees</td> | |||
<td>{{{BerryTrees|0}}}</td> | |||
</tr> | |||
</table> | |||
</div> | |||
</div> | |||
}} {{#if: {{{North|}}} {{{East|}}} {{{West|}}} {{{South|}}} | | |||
<div class="infobox-section"> | |||
<h3>Adjacent areas</h3> | |||
</div> | |||
<div class="center-grid-keita"> | |||
<div class="grid-keita"> | |||
<!-- North box: always shown, with placeholder if no map --> | |||
<div class="north box"> | |||
{{#if: {{{North|}}} | [[{{{North}}}]] | /// }} | |||
</div> | |||
<!-- West box: always shown, with placeholder if no map --> | |||
<div class="west box"> | |||
{{#if: {{{West|}}} | [[{{{West}}}]] | /// }} | |||
</div> | |||
<!-- Central plus sign --> | |||
<div class="plus">[[File:Arrow.webp|20px|link=|alt=Arrow]]</div> | |||
<!-- East box: always shown, with placeholder if no map --> | |||
<div class="east box"> | |||
{{#if: {{{East|}}} | [[{{{East}}}]] | /// }} | |||
</div> | |||
<!-- South box: always shown, with placeholder if no map --> | |||
<div class="south box"> | |||
{{#if: {{{South|}}} | [[{{{South}}}]] | /// }} | |||
</div> | |||
</div> | </div> | ||
</div> | |||
}} | |||
</div> | </div> | ||
</div> | |||
<!-- Categories --> | |||
[[Category:Locations]] {{#if: {{{Region|}}} | [[Category:{{{Region}}} | |||
areas]]}} {{#if: {{{Badge|}}} | [[Category:Gyms]]}} | |||
</body> | |||
</includeonly> |