{{inherit "base.html"}}
<!--  -->
{{def navbar}} {{enddef}}
<!--  -->
{{def report}}
<div class="pure-g">
  <div class="pure-u-1 pure-u-md-2-3">
    <div class="image">
      <div
        class="pure-g d-flex justify-content-center align-items-stretch mt-2"
      >
        <button
          class="btn pure-u-1-3 text-center rounded-2"
          id="prev-btn-{{unique_id}}"
        >
          Previous Map
        </button>
        <h4 class="pure-u-1-4 py-3 text-center" style="margin: 0px">
          Map <span id="comp-{{unique_id}}"></span>
        </h4>
        <button
          class="btn pure-u-1-3 text-center rounded-2"
          id="next-btn-{{unique_id}}"
        >
          Next Map
        </button>
      </div>

      {{ figure|html }}
    </div>
  </div>
  <div class="pure-u-1 pure-u-md-1-3">
    {{if description}}
    <p>{{description}}</p>
    {{endif}}
    <!--  -->
    {{if number_of_regions}}
    <p>
      The masker has <b>{{number_of_regions}}</b> different potentially
      overlapping regions.
    </p>
    {{if len(displayed_maps) != number_of_maps}}
    <p>Only <b>{{len(displayed_maps)}}</b> regions are shown in this report.</p>
    {{endif}}
    <!--  -->
    {{endif}}
    <!--  -->
    {{if n_vertices}}
    <div>
      <table class="pure-table">
        <thead>
          <tr>
            <th>Hemisphere</th>
            <th>Number of vertices</th>
          </tr>
        </thead>

        <tbody>
          {{py: vertices = n_vertices.items()}} {{for hemi, nb in vertices}}
          <tr>
            <td data-column="Hemisphere">{{hemi}}</td>
            <td data-column="Number of vertices">{{nb}}</td>
          </tr>
          {{endfor}}
        </tbody>
      </table>
    </div>
    {{endif}}
    <!--  -->
  </div>
</div>
<div class="pure-g">
  <div class="pure-u-1 pure-u-md-3-3 table-container">
    {{ parameters|html }}
  </div>
</div>

<script>
    {{ js_carousel | html }}
    document.addEventListener("DOMContentLoaded", function () {
      new Carousel("{{unique_id}}", {{ displayed_maps }});
  }
  );
</script>

{{enddef}}
