Template:KeitaArea: Difference between revisions

From Pokemon Revolution Online Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(6 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">
Line 6: Line 6:
         </div>
         </div>
         <div class="infobox-content">
         <div class="infobox-content">
   {{#if: {{{Maps|}}} |
  <!-- Map section - handles both single and multiple maps -->
     <!-- Multiple maps collage with class -->
   {{#if:{{{Maps|}}} |  
     {{#arraydefine:maps|{{{Maps}}}}}
     <!-- Multiple maps display when Maps parameter is provided -->
  <table style="text-align: center; width: 100%;">
     <div class="multiple-maps">
  <tr>
      <p class="maps-title">Area Maps</p>
    {{#vardefine:placeholder|1}}
      <div class="maps-grid">
    {{#loop: iterations|1|{{#arraysize:maps}}|
        <!-- Define array from Maps parameter -->
      {{#vardefine:vector|{{#expr:{{#var:iterations}} - 1}}}}
        {{#arraydefine:mapArray|{{{Maps}}}}}
      <td style="width: 33%;">
       
        [[File:{{#arrayindex:maps|{{#var:vector}}}}.png|100px|alt=...|class=map-image]]
        <!-- Loop through each map in the array -->
        <br>{{#arrayindex:maps|{{#var:vector}}}}
        {{#loop: i | 1 | {{#arraysize:mapArray}} |
      </td>
          <!-- Calculate 0-based index -->
      {{#ifexpr: {{#var:iterations}} / 3 = {{#var:placeholder}} |
          {{#vardefine:index|{{#expr:{{#var:i}} - 1}}}}
        {{#vardefine:placeholder|{{#expr:{{#var:placeholder}} + 1}}}} </tr><tr>
         
      }}
          <!-- Create div for each map -->
    }}
          <div class="map-item">
  </tr>
            [[File:{{#arrayindex:mapArray|{{#var:index}}}}.png|200px|alt={{#arrayindex:mapArray|{{#var:index}}}}|class=map-thumbnail]]
</table>
            <p class="map-caption">{{#arrayindex:mapArray|{{#var:index}}}}</p>
   |
          </div>
     <!-- Single map display with class -->
        }}
     {{#if: {{{Map|}}} |
      </div>
       [[File:{{{Map}}}.png|400px|alt={{{Name|{{PAGENAME}}}}} Map|class=map-image]]
    </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>
     |
     |
       [[File:{{PAGENAME}}.png|alt={{PAGENAME}} Map|class=map-image]]
       <!-- 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>
     }}
     }}
   }}
   }}
  <!-- Rest of your infobox content -->
          <!-- Minimap section, shown only if Minimap is provided -->
          {{#if: {{{Minimap|}}} |
           <div class="minimap-area">
           <div class="minimap-area">
             <p class="MinimapLocation">Minimap Location</p>
             <p class="MinimapLocation">Minimap Location</p>
Line 53: Line 60:
                   <td>{{{GymLeader|Unknown}}}</td>
                   <td>{{{GymLeader|Unknown}}}</td>
                 </tr>
                 </tr>
                <tr>
                <tr>
    <td>Type</td>
                  <td>Type</td>
    <td>[[{{{GymType|Unknown}}}_(type)|{{{GymType|Unknown}}}]]</td>
                  <td>[[{{{GymType|Unknown}}}_(type)|{{{GymType|Unknown}}}]]</td>
  </tr>
                </tr>
                 <tr>
                 <tr>
                   <td>Badge</td>
                   <td>Badge</td>
Line 87: Line 94:
             </div>
             </div>
           </div>
           </div>
           }}
           }} {{#if: {{{North|}}} {{{East|}}} {{{West|}}} {{{South|}}} |
           <div class="infobox-section">
           <div class="infobox-section">
             <h3>Adjacent areas</h3>
             <h3>Adjacent areas</h3>
           </div>
           </div>
<div class="center-grid-keita">
          <div class="center-grid-keita">
  <div class="grid-keita">
            <div class="grid-keita">
    <!-- North box: always shown, with placeholder if no map -->
              <!-- North box: always shown, with placeholder if no map -->
    <div class="north box">{{#if: {{{North|}}} | [[{{{North}}}]] | /// }}</div>
              <div class="north box">
    <!-- West box: always shown, with placeholder if no map -->
                {{#if: {{{North|}}} | [[{{{North}}}]] | /// }}
    <div class="west box">{{#if: {{{West|}}} | [[{{{West}}}]] | /// }}</div>
              </div>
    <!-- Central plus sign -->
              <!-- West box: always shown, with placeholder if no map -->
    <div class="plus">[[File:Arrow.webp|20px|link=|alt=Arrow]]</div>
              <div class="west box">
    <!-- East box: always shown, with placeholder if no map -->
                {{#if: {{{West|}}} | [[{{{West}}}]] | /// }}
    <div class="east box">{{#if: {{{East|}}} | [[{{{East}}}]] | /// }}</div>
              </div>
    <!-- South box: always shown, with placeholder if no map -->
              <!-- Central plus sign -->
    <div class="south box">{{#if: {{{South|}}} | [[{{{South}}}]] | /// }}</div>
              <div class="plus">[[File:Arrow.webp|20px|link=|alt=Arrow]]</div>
  </div>
              <!-- East box: always shown, with placeholder if no map -->
</div>
              <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>
Line 110: Line 126:
       [[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