Template:KeitaArea: Difference between revisions

From Pokemon Revolution Online Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
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 class="infobox-content">
        {{#if: {{{Maps|}}} |
        <!-- Multiple maps div -->
        <div class="multiple-maps">
          {{#arraydefine:maps|{{{Maps}}}}}
          <table style="text-align: center; width: 100%">
            <tr>
              {{#vardefine:placeholder|1}}
              {{#loop: iterations|1|{{#arraysize:maps}}|
              {{#vardefine:vector|{{#expr:{{#var:iterations}} - 1}}}}
              <td style="width: 33%">
                [[File:{{#arrayindex:maps|{{#var:vector}}}}.png|100px|alt=...|class=map-image]]
                <br />{{#arrayindex:maps|{{#var:vector}}}}
              </td>
              {{#ifexpr: {{#var:iterations}} / 3 = {{#var:placeholder}} |
              {{#vardefine:placeholder|{{#expr:{{#var:placeholder}} + 1}}}}
            </tr>
            <tr>
              }} }}
            </tr>
          </table>
        </div>
        }}
     
        {{#if: {{{Map|}}} |
        <!-- Single map div -->
        <div class="map-image">
           [[File:{{{Map}}}.png|400px|alt={{{Name|{{PAGENAME}}}}} Map|class=map-image]]
        </div>
        }}
      </div>
        <div class="minimap-area">
          <p class="MinimapLocation">Minimap Location</p>
          [[File:{{{Minimap}}}.gif|200px|alt={{{Name|{{PAGENAME}}}}}
          Minimap|class=map-image minimap]]
         </div>
         </div>
         <div class="infobox-content">
        }}
  {{#if: {{{Maps|}}} |
         <hr />
    <!-- Multiple maps collage with class -->
        <!-- Gym section, shown only if Badge is provided -->
    {{#arraydefine:maps|{{{Maps}}}}}
        {{#if: {{{Badge|}}} |
  <table style="text-align: center; width: 100%;">
        <div class="infobox-section">
  <tr>
          <h3>{{{Name|{{PAGENAME}}}}} Gym</h3>
    {{#vardefine:placeholder|1}}
          <div class="infoxbox_table_container">
    {{#loop: iterations|1|{{#arraysize:maps}}|
            <table>
      {{#vardefine:vector|{{#expr:{{#var:iterations}} - 1}}}}
              <tr>
      <td style="width: 33%;">
                <td>Gym-leader</td>
        [[File:{{#arrayindex:maps|{{#var:vector}}}}.png|100px|alt=...|class=map-image]]
                <td>{{{GymLeader|Unknown}}}</td>
        <br>{{#arrayindex:maps|{{#var:vector}}}}
              </tr>
      </td>
              <tr>
      {{#ifexpr: {{#var:iterations}} / 3 = {{#var:placeholder}} |
                <td>Type</td>
        {{#vardefine:placeholder|{{#expr:{{#var:placeholder}} + 1}}}} </tr><tr>
                <td>[[{{{GymType|Unknown}}}_(type)|{{{GymType|Unknown}}}]]</td>
      }}
              </tr>
    }}
              <tr>
  </tr>
                <td>Badge</td>
</table>
                <td>{{{Badge|Unknown}}}</td>
  |
              </tr>
    <!-- Single map display with class -->
             </table>
    {{#if: {{{Map|}}} |
      [[File:{{{Map}}}.png|400px|alt={{{Name|{{PAGENAME}}}}} Map|class=map-image]]
    |
      [[File:{{PAGENAME}}.png|alt={{PAGENAME}} Map|class=map-image]]
    }}
  }}
  <!-- Rest of your infobox content -->
 
          <!-- Minimap section, shown only if Minimap is provided -->
          {{#if: {{{Minimap|}}} |
          <div class="minimap-area">
            <p class="MinimapLocation">Minimap Location</p>
            [[File:{{{Minimap}}}.gif|200px|alt={{{Name|{{PAGENAME}}}}}
             Minimap|class=map-image minimap]]
           </div>
           </div>
          }}
        </div>
          <hr />
        }}
          <!-- Gym section, shown only if Badge is provided -->
        <!-- Resources section, shown only if NPCs, Items, or BerryTrees > 0 -->
          {{#if: {{{Badge|}}} |
        {{#vardefine:resources|{{#expr:{{{NPCs|0}}}+{{{Items|0}}}+{{{BerryTrees|0}}}}}}}
          <div class="infobox-section">
        {{#ifexpr: {{#var:resources}} > 0 |
            <h3>{{{Name|{{PAGENAME}}}}} Gym</h3>
        <div class="infobox-section">
            <div class="infoxbox_table_container">
          <h3>Resources</h3>
              <table>
          <div class="infoxbox_table_container">
                <tr>
            <table>
                  <td>Gym-leader</td>
              <tr>
                  <td>{{{GymLeader|Unknown}}}</td>
                <td>Battle NPCs</td>
                </tr>
                <td>{{{NPCs|0}}}</td>
                <tr>
              </tr>
    <td>Type</td>
              <tr>
    <td>[[{{{GymType|Unknown}}}_(type)|{{{GymType|Unknown}}}]]</td>
                <td>Ground Items</td>
  </tr>
                <td>{{{Items|0}}}</td>
                <tr>
              </tr>
                  <td>Badge</td>
              <tr>
                  <td>{{{Badge|Unknown}}}</td>
                <td>Berry Trees</td>
                </tr>
                <td>{{{BerryTrees|0}}}</td>
              </table>
              </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>
             </div>
          </div>
            <!-- South box: always shown, with placeholder if no map -->
          }}
             <div class="south box">
          <!-- Resources section, shown only if NPCs, Items, or BerryTrees > 0 -->
               {{#if: {{{South|}}} | [[{{{South}}}]] | /// }}
          {{#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>
           </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 -->
    </div>
      [[Category:Locations]] {{#if: {{{Region|}}} | [[Category:{{{Region}}}
    <!-- Categories -->
      areas]]}} {{#if: {{{Badge|}}} | [[Category:Gyms]]}}
    [[Category:Locations]] {{#if: {{{Region|}}} | [[Category:{{{Region}}}
    areas]]}} {{#if: {{{Badge|}}} | [[Category:Gyms]]}}
   </body>
   </body>
</includeonly>
</includeonly>

Revision as of 19:26, 25 February 2025