{% load static %}
<a href="{% url 'library:project_detail' project.slug %}" class="pack-card-row">
    <div class="pack-card-row-thumb">
        {% if project.thumbnail %}
            <img src="{{ project.thumbnail_url }}" alt="">
        {% else %}
            <i class="fas fa-box-open pack-card-thumb-icon"></i>
        {% endif %}
    </div>
    <div class="pack-card-row-body">
        <h4>{{ project.title }}</h4>
        <p class="pack-card-row-author"><i class="fas fa-user"></i> {{ project.owner.username }}</p>
        {% with latest=project.versions.all|first %}
        <p class="pack-card-row-meta">
            <span><i class="fas fa-tag"></i> {{ latest.version_name|default:"no versions" }}</span>
            <span><i class="fas fa-download"></i> {{ project.downloads_total|default:project.downloads }}</span>
            <span><i class="fas fa-thumbs-up"></i> {{ project.rating_score }}</span>
        </p>
        {% endwith %}
    </div>
</a>
