{% layout none %}

{%- assign featured_id = '' -%}
{% for art in blog.articles %}
    {% if art.tags contains 'Featured' %}
        {%- assign featured_id = art.id -%}
        {% break %}
    {% endif %}
{% endfor %}

{% paginate blog.articles by 6 %}
    {% for art in blog.articles %}
        {% unless art.id == featured_id %}
            <div class="col-12 col-t-6 col-d-4 mb-40 d-mb-80">
                {% render 'article-card',
                    article: art,
                    use_tag: true,
                    text_class: 'tc'
                %}
            </div>
        {% endunless %}
    {% endfor %}

    {% if paginate.next.is_link %}
        <div class="col-12 mt-30 d-mt-40 tc view-more-wrapper">
            <a class="btn2 view-more" onclick="renderBlogPosts(`{{ blog.title | handle }}`, `{{ paginate.current_page | plus: 1 }}`)">View More</a>
        </div>
    {% endif %}
{% endpaginate %}