{% extends "coderedcms/pages/web_page.html" %}
{% load wagtailcore_tags wagtailimages_tags coderedcms_tags %}
{% block index_filters %}{% endblock %}
{% block index_content %}
{% if page.index_show_subpages %}
<div class="container">
  <div class="row">
    <div class="col-md-9">
      {% for article in index_paginated %}
      {% if self.show_images %}
      <a href="{% pageurl article %}" title="{{article.title}}" class="text-white-50">
        {% if article.cover_image %}
        {% image article.specific.cover_image fill-1600x900 format-webp as cover_image %}
        <img src="{{cover_image.url}}" class="w-100" alt="{{article.title}}">
        {% endif %}
      </a>
      {% endif %}
      <h3><a href="{% pageurl article %}">{{article.title}}</a></h3>
      {% if self.show_captions and article.specific.caption %}<p class="lead">{{article.specific.caption}}</p>{% endif %}
      {% if self.show_meta %}<p>{{article.specific.seo_published_at}} &bull; {{article.specific.seo_author}}</p>{% endif %}
      {% if self.show_preview_text %}<p>{{article.specific.body_preview}}</p>{% endif %}
      {% if not forloop.last %}
      <hr>
      {% endif %}
      {% endfor %}
    </div>
    {% if page.index_classifiers.exists %}
    <div class="col-md-3">
      {% include "coderedcms/includes/classifier_nav.html" with navclass="nav-pills flex-column" %}
    </div>
    {% endif %}
  </div>
  {% include "coderedcms/includes/pagination.html" with items=index_paginated %}
</div>
{% endif %}
{% endblock %}
