{% assign view_more_counter = 0 %}
{% if courses.in_catalog.any? %}
  <div class="np-catalog-courses row row-with-thumbnails">
    {% for course in courses.in_catalog %}
      {% if view_more_counter < 3%}
        {% assign view_more_counter  = view_more_counter | plus: 1%}
        <div class="col-xs-12 col-md-6 col-lg-4 np-stretch-content">
          {% include "cards_course" with course, class: "" %}
        </div>
      {% else %}
        <div class="col-xs-12 col-md-6 col-lg-4 np-stretch-content view-more-hidden">
          {% include "cards_course" with course, class: "" %}
        </div>
      {% endif%}
    {% endfor %}

    {% if view_more_counter >= 3%}
      <button class="np-top-button np-button-font-color np-button np-button-big view-more-button" onclick="viewMore()">View More</button>
    {% endif %}
  </div>
{% else %}
  {% capture message %}
    {% t shared.zero_state.courses.catalog,
      key: current_school.course_vocabulary
    %}
  {% endcapture %}
  {% include "courses_zero_state", message: message %}
{% endif %}