<div class="np-catalog-courses">
  {% for category in categories.in_catalog %}
    <div id="category-{{category.id}}">
      <div class="np-resource-subtitle category-name">{{ category.name }}</div>
      <div class="row row-with-thumbnails">
        {% for course in courses.in_catalog %}
          {% assign course_categories = course.categories | map: "id" %}
  
          {% if course_categories contains category.id %}
            <div class="col-xs-12 col-md-6 col-lg-4 np-stretch-content">
              {% include "cards_course" with course %}
            </div>
          {% endif %}
        {% endfor %}
      </div>
    </div>
  {% endfor %}
</div>
