category.html 1.53 KB
Newer Older
1 2 3 4
---
layout: default
---

5
{% for post in site.categories[page.category] offset: 0 limit: 4 %}
6
<h1>
7
    <a href="{{ post.url | absolute_url }}">{{ post.title }}</a>
8
</h1>
9
{% if page.category == 'events' %}
10
<h4>{{ post.event_date | date: "%A %B %-d, %Y" }}</h4>
11 12
{% elsif post.author %}
<h4>by {{ post.author }} | {{ post.date | date: "%A %B %-d, %Y" }}</h4>
13 14 15 16
{% else %}
<h4>{{ post.date | date: "%A %B %-d, %Y" }}</h4>
{% endif %}

17
<br />
18
<div class="row">
Zach Knox's avatar
Zach Knox committed
19
{% if post.hero_image %}
20 21 22 23 24 25 26
    <div class="col-md-6">
        <p>
            <img class="img-fluid" src="{{ post.hero_image | absolute_url }}" alt={{ post.hero_alt }}>
        </p>
    </div>
    <div class="col-md-6">
        <p>
27 28 29 30 31
            {% if post.content contains "<!-- more -->" %}
                    {{ post.content | split:"<!-- more -->" | first }}
            {% else %}
                {{ post.excerpt }}
            {% endif %}
32 33
        </p>
        <p>
34
            <a href="{{ post.url | prepend: site.url }}">Read More
35
                <i class="fas fa-arrow-circle-right"></i>
36 37 38 39
            </a>
        </p>
    </div>
{% else %}
40 41 42 43 44
{% if post.content contains "<!-- more -->" %}
        {{ post.content | split:"<!-- more -->" | first }}
{% else %}
    {{ post.excerpt }}
{% endif %}
45
<p>
46
    <a href="{{ post.url | prepend: site.url }}">Read More
47
        <i class="fas fa-arrow-circle-right"></i>
48 49
    </a>
</p>
Zach Knox's avatar
Zach Knox committed
50
{% endif %}
51
</div>
52
<br />
53 54 55 56
{% endfor %}

<br />
{% if page.archive %}
57
<p><a href="{{ page.archive | prepend: site.url }}"><i class="fas fa-arrow-circle-left"></i> Archive</a></p>
58
{% endif %}