<div
  class="catalog-card minified-catalog-card"
  priority="{{ course.properties.priority }}"
  category="{% for category in course.categories %}{{ category.name }}{% unless forloop.last %},{% endunless %}{% endfor %}"
  progress="{{ course.progress }}">
  <div class="np-card-container carrot-card-container">
    {% if course.ribbon %}
      <div class="np-card-ribbon">
        {{ course.ribbon }}
      </div>
    {% endif %}
    <img
      class="np-card-image"
      alt="{{ course.name }}"
      src="{{ course.image_url }}">
    <div class="np-card-content np-card-content-vertical carrot-card-padding flex-1">
      <h3 class="np-card-content-title">
        {{ course.name }}
      </h3>
      <div class="np-card-content-subtitle flex-1">
        <div class="course-rating">
          <i class="fas fa-star" style="color: #ffc445;"></i>
          {% if course.properties.course_rating and course.properties.course_rating != 0 and course.properties.course_reviews_count and course.properties.course_reviews_count >= 5 %}
            {{ course.properties.course_rating | round: 1 }}
          {% else %}
            -
          {% endif %}
        </div>
        <div class="course-duration">
          <i class="fas fa-clock"></i>
          {{ course.properties.course_duration }}
        </div>
      </div>
      <div class="lp-footer-placeholder"></div>

      <div class="np-card-content-footer">
        <div
          class="np-card-content-progress"
          {% if course.progress == 100 %}
          style="color: #0AAD0A;"
          {% endif %}>
          <span class="lang-en">
            {% t shared.progress
              , count: course.progress %}
          </span>
          <span class="lang-es">
            {% if course.progress == 100 %}
              Completado
            {% elsif course.progress > 0 and course.progress < 100 %}
              En progreso
            {% else %}
              No iniciado
            {% endif %}
          </span>
        </div>
        {% capture course_path %}{% route course, id: course.id %}{% endcapture %}
        {% if course.has_to_restart? %}
          {% include "course_version_outdated_popup"
            , path: course_path %}
        {% endif %}
        <a class="np-button np-button-wide" href="{{ course_path }}">
          {% if course.progress == 0 %}
            <span class="lang-en">Start</span>
            <span class="lang-es">Comenzar</span>
          {% elsif course.progress > 0 and course.progress < 100 %}
            <span class="lang-en">Continue</span>
            <span class="lang-es">Continuar</span>
          {% else %}
            <span class="lang-en">Retake</span>
            <span class="lang-es">Repetir</span>
          {% endif %}
        </a>
      </div>
    </div>
  </div>
</div>