<div class="reveal" id="reveal">
  <div class="slides">
    {% for ch in page.chapters %}
      {% for section in site.tags[ch] reversed %}
        {% for tag in section.tags %}
                  {% if tag contains "diagram" %}
            {% include hydeslides/revealjs/slide-open %}
              <h1 {% if section.heading == false %}class="hidden"{% endif %}>{{ section.chapter }}</h1>
              <h2 {% if section.heading == false %}class="hidden"{% endif %}>{{ section.title }}</h2>
              <div class="clear-all"></div>

              {% if section.diagram_svg_path %}
                {% if section.cover != false %}
                  {% capture slideIndex %}{{ slideIndex | plus: 1 }}{% endcapture %}
                {% endif %}
                <svg version="1.1"
                  width="100%"
                  height="100%"
                  data-path="{{ section.diagram_svg_path }}"
                  id="canvas-{{ chapterIndex }}-{{ slideIndex }}"
                  preserveAspectRatio="xMidyMid"
                  viewBox="0 0 100 100"></svg>
              {% endif %}
              {{ section.content }}

            {% include hydeslides/revealjs/slide-close %}
                  {% endif %}
              {% endfor %}
      {% endfor %}
    {% endfor %}
  </div>
</div>
