Template:KeitaArea: Difference between revisions

From Pokemon Revolution Online Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
<noinclude>
    {{#vardefine:border|#{{{{{Type}}}_color_dark}}}}{{#vardefine:background|#{{{{{Type}}}_color}}}}{{#vardefine:cell|#{{{{{Type}}}_color_light}}}}
This template tabulates all basic area data.
Usage: {{AreaInfoBox
| Type =
| 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"
  {{#if:{{{Maps|}}}
         style="width: 43%; background-color: {{#var:background}}; border: 5px solid {{#var:border}}; border-radius: 25px; padding: 5px; text-align: center;">
     | <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>
          <th>Type Specialty</th>
          <td>[[{{{GymType}}}_(type)|{{{GymType}}}]]</td>
        </tr>
         <tr>
         <tr>
            <td colspan="3"
          <th>Badge</th>
                style="background-color: {{#var:cell}}; border-radius: 25px; border: 3px solid {{#var:border}}; color: {{#var:border}}; font-weight: bold; font-size: 20px;">
          <td>{{{Badge}}} Badge</td>
                {{PAGENAME}} - [[{{{Region}}}|<span style="color:{{#var:border}};">{{{Region}}}</span>]]</td>
         </tr>
         </tr>
        <div class="AreaInfo__Map">{{#if:{{{Maps|}}} |
      </table>
             {{#arraydefine:maps|{{{Maps}}}}}
    </div>
             <div 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]]
  {{#ifexpr: {{{Items|0}}} + {{{BerryTrees|0}}} + {{{BattleNPCs|0}}} > 0 |
            </div>
    <div class="keita-infobox-section">
            }}
      <h2 class="keita-infobox-section-title">Resources</h2>
        </div>
      <table class="keita-info-rows">
        {{#if:{{{BattleNPCs|}}}|
          <tr>
             <th>Battleable NPCs</th>
            <td>{{{BattleNPCs}}}</td>
          </tr>
        }}
        {{#if:{{{Items|}}}|
          <tr>
            <th>Ground Items</th>
            <td>{{{Items}}}</td>
          </tr>
        }}
        {{#if:{{{BerryTrees|}}}|
          <tr>
             <th>Berry Trees</th>
            <td>{{{BerryTrees}}}</td>
          </tr>
        }}
      </table>
    </div>
  }}
 
  {{#if: {{{North|}}}{{{West|}}}{{{South|}}}{{{East|}}} |
    <div class="keita-infobox-section">
      <h2 class="keita-infobox-section-title">Adjacent Areas</h2>
      <div class="keita-infobox-adjacency">
        <div class="keita-adj-north">{{#if:{{{North|}}}|[[{{{North}}}|↑<br />{{{North}}}]]}}</div>
        <div class="keita-adj-west">{{#if:{{{West|}}}|[[{{{West}}}|← {{{West}}}]]}}</div>
        <div class="keita-adj-center">{{PAGENAME}}</div>
        <div class="keita-adj-east">{{#if:{{{East|}}}|[[{{{East}}}|{{{East}}} →]]}}</div>
        <div class="keita-adj-south">{{#if:{{{South|}}}|[[{{{South}}}|{{{South}}}<br />↓]]}}</div>
      </div>
    </div>
  }}
 
| class=keita-area-infobox, style=--color-border: #${{{Type}}}_color_dark}; --color-background: #${{{Type}}}_color}; --color-cell: #${{{Type}}}_color_light}; , data-type={{{Type}}} }}
<div class="keita-area-infobox-header" style="--color-border: #${{{Type}}}_color_dark}; --color-cell: #${{{Type}}}_color_light};">
  {{PAGENAME}} - [[{{{Region}}}|<span style="color:var(--color-border);">{{{Region}}}</span>]]
</div>
 
[[Category:Locations]]
{{#if:{{{Region|}}}|[[Category:{{{Region}}} areas]]}}
{{#switch: {{ucfirst:{{{Type}}}}}|Cave=[[Category:Caves]]|Mountain=[[Category:Mountains]]|Forest=[[Category:Forests]]|Lake=[[Category:Lakes]]|#default=}}
{{#if:{{{Badge|}}}|[[Category:Gyms]]}}
<templatestyles src="Template:AreaInfoBox/styles.css" />
</includeonly>

Latest revision as of 22:57, 29 September 2025

This template tabulates all basic area data. Usage: Template:AreaInfoBox