<h3>Posts</h3> <ul class=“list-unstyled”>

{% for post in site.posts %}
{% if post.author == page.username %}
    {% assign timeframe = 604800 %}
    {% assign post_in_seconds = post.date | date: "%s" | plus: 0 %}
    {% assign recent_posts = "now" | date: "%s" | minus: timeframe %}
    {% if post.image %}
        {% assign image_path = post.image %}
        {% capture image_alt %}{{post.title}} image {% endcapture %}
    {% else %}
        {% assign image_path = site.post_placeholder %}
        {% capture image_alt %}Blog post placeholder image {% endcapture %}
    {% endif %}
    <li class="media flex-column flex-sm-row">
        {% picture post_thumb {{image_path}} --alt {{image_alt}} %}
        <div class="media-body">
            <a href="{{post.url}}">
                <h5 class="mt-0 mb-1">{{post.title}}</h5>
                <em class="suggested_post_date">{{post.date | date: "%A, %B %-d, %Y" }}</em>
                <p>
                {% if post.description %}
                    {{post.description}}
                {% else %}
                    {{ post.content | strip_html | truncatewords:30 }}
                {% endif %}
                </p>
                {% if post_in_seconds > recent_posts %}
                    <span class="new-post" title="Post added in the last week.">New</span>
                {% endif %}
            </a>
        </div>
    </li>

    {% endif %}
{% endfor %}

</ul>