{% load i18n %}

<div class="blog-detail__sidebar">
    <div class="blog-detail__sidebar-card">
        <h2 class="h4 mb-3">{% trans "Recent articles" %}</h2>

        {% if recent_blogs %}
            <div class="blog-detail__recent-list">
                {% for blog in recent_blogs %}
                    <article class="blog-detail__recent-item">
                        <div class="blog-detail__recent-meta">
                            {% include "blog/partials/blog_meta.html" with blog=blog only %}
                        </div>
                        <h3 class="blog-detail__recent-title h6">
                            <a href="{{ blog.url }}">{{ blog.title }}</a>
                        </h3>
                    </article>
                {% endfor %}
            </div>
        {% else %}
            <p class="text-body-secondary mb-0">
                {% trans "More articles will appear here when they are published." %}
            </p>
        {% endif %}
    </div>
</div>
