|
|
| (29 intermediate revisions by the same user not shown) |
| Line 1: |
Line 1: |
| <noinclude>This is used to tabulate all basic area data.</noinclude> | | <noinclude> |
| <includeonly> | | This template tabulates all basic area data. |
| {{#vardefine:border|#{{{{{Type}}}_color_dark}}}}
| | Usage: {{AreaInfoBox |
| {{#vardefine:background|#{{{{{Type}}}_color}}}}
| | | Type = |
| {{#vardefine:cell|#{{{{{Type}}}_color_light}}}}
| | | Region = |
| | | Maps = |
| | | Location = |
| | | Badge = |
| | | Leader = |
| | | GymType = |
| | | BattleNPCs = |
| | | Items = |
| | | BerryTrees = |
| | | North = |
| | | West = |
| | | South = |
| | | East = |
| | }} |
| | </noinclude><includeonly>{{! |
| | MUTE TEMPLATESTYLES}}{{! |
| | -- Logic and Variable Definitions First -- |
| | }}{{#vardefine:location|{{#ifexist:File:{{PAGENAME}}.gif|{{PAGENAME}}|{{{Location|}}}}}}}{{! |
| | -- Main Container -- |
| | }}{{#tag:div| |
|
| |
|
| <table class="informational-box" align="right" style="width: 43%; background-color: {{#var:background}}; border: 5px solid {{#var:border}}; border-radius: 25px; padding: 5px; text-align: center;"> | | {{#if:{{{Maps|}}} |
| <!-- Header row -->
| | | <div class="keita-infobox-section"> |
| | <h2 class="keita-infobox-section-title">Overview Collage</h2> |
| | <div class="keita-infobox-gallery"> |
| | {{#loop: map | {{#explode:{{{Maps}}}|,}} | |
| | <div class="keita-infobox-gallery-item"> |
| | [[File:{{#var:map}}.png|100px|link={{#var:map}}]] |
| | <span>{{#var:map}}</span> |
| | </div> |
| | }} |
| | </div> |
| | </div> |
| | | <div class="keita-infobox-section"> |
| | <h2 class="keita-infobox-section-title">Overview</h2> |
| | [[File:{{PAGENAME}}.png|400px]] |
| | </div> |
| | }} |
| | |
| | {{#if:{{#var:location}} | |
| | <div class="keita-infobox-section"> |
| | <h2 class="keita-infobox-section-title">Location</h2> |
| | [[File:{{#var:location}}.gif|200px]] |
| | <p class="keita-infobox-caption">A positional vantage point of {{PAGENAME}} in {{{Region}}}.</p> |
| | </div> |
| | }} |
| | |
| | {{#if:{{{Badge|}}} | |
| | <div class="keita-infobox-section"> |
| | <h2 class="keita-infobox-section-title">[[File:{{{Badge}}}_Badge_Icon.png|30px]] {{PAGENAME}} Gym</h2> |
| | <table class="keita-info-rows"> |
| | <tr> |
| | <th>Gym Leader</th> |
| | <td>{{{Leader}}}</td> |
| | </tr> |
| <tr> | | <tr> |
| <td colspan="3" style="background-color: {{#var:cell}}; border-radius: 25px; border: 3px solid {{#var:border}}; color: {{#var:border}}; font-weight: bold; font-size: 20px;">
| | <th>Type Specialty</th> |
| {{PAGENAME}} - [[{{{Region}}}|<span style="color:{{#var:border}};">{{{Region}}}</span>]]
| | <td>[[{{{GymType}}}_(type)|{{{GymType}}}]]</td> |
| </td>
| |
| </tr> | | </tr> |
|
| |
| <!-- Maps or Overview section -->
| |
| <tr> | | <tr> |
| {{#if:{{{Maps|}}} |
| | <th>Badge</th> |
| {{#arraydefine:maps|{{{Maps}}}}}
| | <td>{{{Badge}}} Badge</td> |
| <td colspan="3">
| |
| <table style="text-align: center; width: 100%; padding: 6px; color:{{#var:border}};">
| |
| <tr>
| |
| <td colspan="5" style="color: {{#var:border}}; margin-bottom: 5px; font-weight: bold; border-radius: 25px; border: 3px solid {{#var:border}}; background-color:{{#var:cell}}; padding: 4px;">Overviewing collage</td>
| |
| </tr>
| |
| <tr>
| |
| {{#vardefine:placeholder|1}}
| |
| {{#loop: iterations|1|{{#arraysize:maps}}|
| |
| {{#vardefine:vector|{{#expr:{{#var:iterations}} - 1}}}}
| |
| <td width="33%" style="background-color: {{#var:cell}}; border-radius: 25px; border: 3px solid {{#var:border}};">
| |
| <table width="100%" style="text-align: center; padding: 3px;">
| |
| <tr>
| |
| <td>[[File:{{#arrayindex:maps|{{#var:vector}}}}.png|100px]]</td>
| |
| </tr>
| |
| <tr>
| |
| <td>{{#arrayindex:maps|{{#var:vector}}}}</td>
| |
| </tr>
| |
| </table>
| |
| </td>
| |
| {{#ifexpr:{{#var:iterations}} / 3 = {{#var:placeholder}} |
| |
| {{#vardefine:placeholder|{{#expr:{{#var:placeholder}} + 1}}}}
| |
| </tr><tr>
| |
| }}
| |
| }}
| |
| </tr>
| |
| </table>
| |
| </td>
| |
| |
| |
| <td colspan="3" style="background-color: {{#var:cell}}; border-radius: 25px; border: 3px solid {{#var:border}}; padding: 6px;">
| |
| <p style="color: {{#var:border}}; margin-bottom: 5px; font-weight: bold;">Overview</p>
| |
| [[File:{{PAGENAME}}.png|400px]]
| |
| </td>
| |
| }}
| |
| </tr> | | </tr> |
| | </table> |
| | </div> |
| | }} |
|
| |
|
| <!-- Location section -->
| | {{#ifexpr: {{{Items|0}}} + {{{BerryTrees|0}}} + {{{BattleNPCs|0}}} > 0 | |
| {{#ifexist:File:{{PAGENAME}}.gif|
| | <div class="keita-infobox-section"> |
| {{#vardefine:location|{{PAGENAME}}}}
| | <h2 class="keita-infobox-section-title">Resources</h2> |
| | | | <table class="keita-info-rows"> |
| {{#if:{{{Location|}}}|
| | {{#if:{{{BattleNPCs|}}}| |
| {{#vardefine:location|{{{Location}}}}}
| | <tr> |
| }}
| | <th>Battleable NPCs</th> |
| | <td>{{{BattleNPCs}}}</td> |
| | </tr> |
| }} | | }} |
| {{#if:{{#var:location}}| | | {{#if:{{{Items|}}}| |
| <tr>
| | <tr> |
| <td colspan="3" style="background-color: {{#var:cell}}; border-radius: 25px; border: 3px solid {{#var:border}};">
| | <th>Ground Items</th> |
| <p style="color: {{#var:border}}; margin-bottom: 5px; font-weight: bold;">Location</p>
| | <td>{{{Items}}}</td> |
| [[File:{{#var:location}}.gif|200px]]
| | </tr> |
| <p style="font-color: 10px; margin-top: 4px;">A positional vantage point of {{PAGENAME}} in {{{Region}}}.</p>
| |
| </td>
| |
| </tr>
| |
| }} | | }} |
| | | {{#if:{{{BerryTrees|}}}| |
| <!-- Gym Information section -->
| | <tr> |
| {{#if:{{{Badge|}}} | | | <th>Berry Trees</th> |
| {{#vardefine:badge|{{{Badge}}}}}
| | <td>{{{BerryTrees}}}</td> |
| {{#vardefine:leader|{{{Leader|}}}}}
| | </tr> |
| <tr>
| |
| <td colspan="3" style="border-radius: 25px; margin: auto auto; background-color: {{#var:cell}}; border: 3px solid {{#var:border}};">
| |
| <table style="width: 100%; padding: 7px;">
| |
| <tr>
| |
| <td colspan="3">
| |
| [[File:{{{Badge}}}_Badge_Icon.png]]
| |
| <p style="margin-bottom: 5px; margin: auto auto; color: {{#var:border}}; font-weight: bold; font-size: 18px;">{{PAGENAME}} Gym</p>
| |
| </td>
| |
| </tr>
| |
| <tr>
| |
| <td style="border-radius: 25px; padding: 5px;">
| |
| <div style="background-color: {{#var:border}}; border-radius: 25px; font-weight: bold; color: {{#var:cell}}; padding: 3px; margin-bottom: 7px;">Gym-leader</div>
| |
| <div style="background-color: #FFFFFF; border-radius: 25px; padding: 3px;">{{{Leader}}}</div>
| |
| </td>
| |
| <td style="border-radius: 25px; padding: 5px;">
| |
| <div style="background-color: {{#var:border}}; border-radius: 25px; font-weight: bold; color: {{#var:cell}}; padding: 3px; margin-bottom: 7px;">Type specialty</div>
| |
| <div style="background-color: #FFFFFF; border-radius: 25px; padding: 3px;">[[{{{GymType}}}_(type)|{{{GymType}}}]]</div>
| |
| </td>
| |
| <td style="border-radius: 25px; padding: 5px;">
| |
| <div style="background-color: {{#var:border}}; border-radius: 25px; font-weight: bold; color: {{#var:cell}}; padding: 3px; margin-bottom: 7px;">Badge</div>
| |
| <div style="background-color: #FFFFFF; border-radius: 25px; padding: 3px;">{{{Badge}}} Badge</div>
| |
| </td>
| |
| </tr>
| |
| </table>
| |
| </td>
| |
| </tr>
| |
| }} | | }} |
| | </table> |
| | </div> |
| | }} |
|
| |
|
| <!-- Resources section -->
| | {{#if: {{{North|}}}{{{West|}}}{{{South|}}}{{{East|}}} | |
| {{#vardefine:resources|{{#expr:{{#expr:{{{Items|0}}}}}+{{{BerryTrees|0}}}+{{{BattleNPCs|0}}}}}}}
| | <div class="keita-infobox-section"> |
| {{#ifexpr:{{#var:resources}} > 0 |
| | <h2 class="keita-infobox-section-title">Adjacent Areas</h2> |
| <tr>
| | <div class="keita-infobox-adjacency"> |
| <td colspan="3" style="border-radius: 25px; margin: auto auto; background-color: {{#var:cell}}; border: 3px solid {{#var:border}};">
| | <div class="keita-adj-north">{{#if:{{{North|}}}|[[{{{North}}}|↑<br />{{{North}}}]]}}</div> |
| <table style="width: 100%; padding: 6px;">
| | <div class="keita-adj-west">{{#if:{{{West|}}}|[[{{{West}}}|← {{{West}}}]]}}</div> |
| <tr>
| | <div class="keita-adj-center">{{PAGENAME}}</div> |
| <td colspan="4">
| | <div class="keita-adj-east">{{#if:{{{East|}}}|[[{{{East}}}|{{{East}}} →]]}}</div> |
| <p style="margin-bottom: 5px; margin: auto auto; color: {{#var:border}}; font-weight: bold; font-size: 18px;">Resources</p>
| | <div class="keita-adj-south">{{#if:{{{South|}}}|[[{{{South}}}|{{{South}}}<br />↓]]}}</div> |
| </td>
| | </div> |
| </tr>
| | </div> |
| <tr>
| | }} |
| <td style="border-radius: 25px; padding: 5px;">
| |
| <div style="background-color: {{#var:border}}; border-radius: 25px; font-weight: bold; color: {{#var:cell}}; padding: 5px; margin-bottom: 7px;">Battleable NPCs</div>
| |
| <div style="background-color: #FFFFFF; border-radius: 25px; padding: 5px;">{{{BattleNPCs|0}}}</div>
| |
| </td>
| |
| <td style="border-radius: 25px; padding: 5px;">
| |
| <div style="background-color: {{#var:border}}; border-radius: 25px; font-weight: bold; color: {{#var:cell}}; padding: 5px; margin-bottom: 7px;">Ground-lootable items</div>
| |
| <div style="background-color: #FFFFFF; border-radius: 25px; padding: 5px;">{{{Items|0}}}</div>
| |
| </td>
| |
| <td style="border-radius: 25px; padding: 5px;">
| |
| <div style="background-color: {{#var:border}}; border-radius: 25px; font-weight: bold; color: {{#var:cell}}; padding: 5px; margin-bottom: 7px;">Berry trees</div>
| |
| <div style="background-color: #FFFFFF; border-radius: 25px; padding: 5px;">{{{BerryTrees|0}}}</div>
| |
| </td>
| |
| </tr>
| |
| </table>
| |
| </td>
| |
| </tr>
| |
| }}
| |
|
| |
|
| <!-- Adjacent Areas section -->
| | | class=keita-area-infobox, style=--color-border: #${{{Type}}}_color_dark}; --color-background: #${{{Type}}}_color}; --color-cell: #${{{Type}}}_color_light}; , data-type={{{Type}}} }} |
| {{#vardefine:placeholder|{{#iferror: {{#expr:{{{North|0}}}+{{{West|0}}}+{{{South|0}}}+{{{East|0}}}}}| 1 | 0 }}}}
| | <div class="keita-area-infobox-header" style="--color-border: #${{{Type}}}_color_dark}; --color-cell: #${{{Type}}}_color_light};"> |
| {{#ifexpr:{{#var:placeholder}} > 0 |
| | {{PAGENAME}} - [[{{{Region}}}|<span style="color:var(--color-border);">{{{Region}}}</span>]] |
| <tr>
| | </div> |
| <td colspan="3" style="border-radius: 25px; margin: auto auto; background-color: {{#var:cell}}; border: 3px solid {{#var:border}};">
| |
| <table style="width: 100%; padding: 7px;">
| |
| <tr>
| |
| <td colspan="3">
| |
| <p style="margin-bottom: 5px; margin: auto auto; color: {{#var:border}}; font-weight: bold; font-size: 18px;">Adjacent areas</p>
| |
| </td>
| |
| </tr>
| |
| <tr>
| |
| <td></td>
| |
| <td width="25%" style="background-color:#FFFFFF; border-radius: 100px 100px 1px 1px; border: 3px solid {{#var:border}}; margin: auto auto; padding: 5px;">
| |
| ↑{{#if:{{{North|}}} | <br>[[{{{North}}}]]}}
| |
| </td>
| |
| <td></td>
| |
| </tr>
| |
| <tr>
| |
| <td width="25%" style="background-color:#FFFFFF; border-radius: 100px 1px 1px 100px; border: 3px solid {{#var:border}}; padding: 5px;">
| |
| ← {{#if:{{{West|}}} | [[{{{West}}}]]}}
| |
| </td>
| |
| <td width="25%" style="background-color:#FFFFFF; border: 3px solid {{#var:border}}; margin: auto auto; padding: 5px;">
| |
| '''{{PAGENAME}}'''
| |
| </td>
| |
| <td width="25%" style="background-color:#FFFFFF; border-radius: 1px 100px 100px 1px; border: 3px solid {{#var:border}}; padding: 5px;">
| |
| {{#if:{{{East|}}} | [[{{{East}}}]]}} →
| |
| </td>
| |
| </tr>
| |
| <tr>
| |
| <td></td>
| |
| <td width="25%" style="background-color:#FFFFFF; border-radius: 1px 1px 100px 100px; border: 3px solid {{#var:border}}; padding: 8px;">
| |
| {{#if:{{{South|}}} | [[{{{South}}}]]<br>}}↓
| |
| </td>
| |
| <td></td>
| |
| </tr>
| |
| </table>
| |
| </td>
| |
| </tr>
| |
| }}
| |
| </table>
| |
|
| |
|
| <!-- Categories -->
| | [[Category:Locations]] |
| [[Category:Locations]]
| | {{#if:{{{Region|}}}|[[Category:{{{Region}}} areas]]}} |
| {{#if:{{{Region}}} | [[Category:{{{Region}}} areas]]}}
| | {{#switch: {{ucfirst:{{{Type}}}}}|Cave=[[Category:Caves]]|Mountain=[[Category:Mountains]]|Forest=[[Category:Forests]]|Lake=[[Category:Lakes]]|#default=}} |
| {{#switch: {{ucfirst:{{{Type}}}}}
| | {{#if:{{{Badge|}}}|[[Category:Gyms]]}} |
| | Cave = [[Category:Caves]]
| | <templatestyles src="Template:AreaInfoBox/styles.css" /> |
| | Mountain = [[Category:Mountains]]
| |
| | Forest = [[Category:Forests]]
| |
| | Lake = [[Category:Lakes]]
| |
| | #default =
| |
| }}
| |
| {{#if:{{{Badge|}}} | [[Category:Gyms]]}}
| |
| </includeonly> | | </includeonly> |