{% capture course_label %}{% endcapture %}
{% capture course_data_label %}none{% endcapture %}

{% if learning_path.progress > 0 and learning_path.progress < 100 %}
  {% capture course_label %}<div class="label label-orange">In progress</div>{% endcapture %}
  {% capture course_data_label %}in-progress{% endcapture %}
{% elsif learning_path.completed? %}
  {% capture course_label %}<div class="label label-gray">Viewed</div>{% endcapture %}
  {% capture course_data_label %}viewed{% endcapture %}
{% endif %}

<a href="{% route learning_path, id: learning_path.id %}" class="np-card-condensed" data-label="{{course_data_label}}">
  <div class="np-card-condensed-content-wrapper">
    <div class="title-wrapper">
      <div class="np-course-title">{{ learning_path.name }}</div>
      <div class="np-card-condensed-content-description">
        {{ learning_path.description | strip_html }}
      </div>
      <div class="info-wrapper">
        <div class="card-content-length">{{ learning_path.items.count }} resources</div>
        <div class="labels-wrapper">{{course_label}}</div>
      </div> 
    </div>
  </div>
</a>