<h2 class="my-3">{{ page_title }}</h2>
<article class="container">
  <a href="/page/new/edit" class="btn btn-primary btn-sm mb-3">Create a New Page</a>
  <table class="table table-sm table-hover">
    <thead>
      <tr>
        <th scope="col">Title</th>
        <th scope="col">Last Updated</th>
      </tr>
    </thead>
    <tbody>
      {% for pg in pages -%}
        <tr>
          <td>
            {{ pg.title }}
            {%- if pg.is_default %} &nbsp; <span class="badge bg-success">HOME PAGE</span>{% endif -%}
            {%- if pg.show_in_page_list %} &nbsp; <span class="badge bg-primary">IN PAGE LIST</span> {% endif -%}<br>
            <small>
              <a href="/{% unless pg.is_default %}{{ pg.permalink }}{% endunless %}" target="_blank">View Page</a>
              <span class="text-muted"> &bull; </span>
              <a href="/page/{{ pg.id }}/edit">Edit</a>
              <span class="text-muted"> &bull; </span>
              <a href="#" class="text-danger">Delete</a>
            </small>
          </td>
          <td>{{ pg.updated_on | date: "MMMM d, yyyy" }}</td>
        </tr>
      {%- endfor %}
    </tbody>
  </table>
</article>
