Template:KeitaArea: Difference between revisions

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

Latest revision as of 20:14, 25 February 2025