<div class="content">
  {% if is_category or is_tag %}
    <h2>{{ page_title }}</h2>
    {%- if subtitle %}
      <p>{{ subtitle }}</p>
    {%- endif %}
  {% endif %}
  {%- for post in model.posts %}
    <article class="item">
      <h1 class="item-heading">
        <a href="{{ post | relative_link }}"
           title="Permanent Link to &quot;{{ post.title | strip_html | escape }}&quot;">
          {{ post.title }}
        </a>
      </h1>
      <h4 class="post-meta">
        <span title="Published On">
          <i class="fa fa-calendar"></i> {{ post.published_on | date: "dddd, MMMM d, yyyy" }}
        </span>
        <span title="Published At">
          <i class="fa fa-clock-o"></i> {{ post.published_on | date: "h:mm tt" | downcase }}
        </span>
        <span title="Author">
          <i class="fa fa-user"></i> {{ model.authors | value: post.author_id }}
        </span>
        {% if logged_on %}
          <span>
            <a hx-boost="false" href="{{ post | edit_post_link }}"><i class="fa fa-pencil-square-o"></i> Edit Post</a>
          </span>
        {% endif %}
      </h4>
      {{ post.text }}
    </article>
  {%- endfor %}
  <nav aria-label="pagination">
    <ul class="pager">
      {% if model.newer_link -%}
        <li class="previous item"><a href="{{ model.newer_link.value }}">&laquo; Newer Posts</a></li>
      {%- else -%}
        <li></li>
      {% endif %}
      {% if model.older_link -%}
        <li class="next item"><a href="{{ model.older_link.value }}">Older Posts &raquo;</a></li>
      {%- endif -%}
    </ul>
  </nav>
</div>
<div class="sidebar">
  <br>
  <div class="item votd-item">
    <h4 class="item-heading votd-heading">Verse of the Day</h4>
    <div>
      <span class="verse"></span> &ndash;
      <a class="votd-reference" target="_blank" rel="noopener"></a>
      <small> <a class="version-link" target="_blank" rel="noopener">(ESV)</a></small><br>
      <div class="votd-credits">
        <small>Powered by <a href="https://biblegateway.com" target="_blank" rel="noopener">Bible Gateway</a></small>
      </div>
      <script src="https://www.biblegateway.com/votd/get/?format=json&amp;version=ESV&amp;callback=djs.displayVotd">
      </script>
    </div>
  </div>
  <div class="item">
    <h4 class="item-heading">#VoteGold</h4>
    <div class="text-center">
      <p><em>
        (Don't blame me;<br>
        I voted for <a href="https://jo20.com/" title="Jorgensen / Cohen 2020" target="_blank" rel="noopener">Jo</a>)
      </em></p>
    </div>
  </div>
  <div class="item">
    <h4 class="item-heading">Categories</h4>
    <ul class="cat-list">
      {% for cat in categories -%}
        {%- assign indent = cat.parent_names | size -%}
        <li class="cat-list-item"{% if indent > 0 %} style="padding-left:{{ indent }}rem;"{% endif %}>
          <a href="{{ cat | category_link }}" class="cat-list-link">{{ cat.name }}</a>
          <span class="cat-list-count">{{ cat.post_count }}</span>
        </li>
      {%- endfor %}
    </ul>
  </div>
</div>