{% include "header" %}
{% include "sub_navigation" %}
{% assign courses_classes = "" %}
{% if features.training_events? %}
  {% assign courses_classes = "col-xs-12 col-sm-6 np-stretch-content" %}
{% else %}
  {% assign courses_classes = "col-xs-12 col-sm-4 np-stretch-content" %}
{% endif %}

<main class="np-main np-dashboard np-subpage-container np-max-width">
  {% include "course_version_outdated_alert", courses: courses.enrolled %}
  <div class="row np-flex-center">
    <div class="col-xs-12 {% if features.training_events? %} col-sm-8 {% endif %}">

      <div class="courses-container" id="in-progress-courses">
        <div class="np-dashboard-resources-title">
          In progress courses
        </div>
        {% include "in_progress_courses_index", class: courses_classes %}
      </div>

      <div class="courses-container" id="not-started-courses">
        <div class="np-dashboard-resources-title">
          Enrolled Courses
        </div>
        {% include "enrolled_courses_index", class: courses_classes %}
      </div>

      <div class="courses-container" id="completed-courses">
        <div class="np-dashboard-resources-title">
          Completed Courses
        </div>
        {% include "completed_courses_index", class: courses_classes %}
      </div>
    </div>

  </div>
</main>
{% include "footer" %}

<script>
  window.addEventListener('DOMContentLoaded', (event) => {
    document.querySelector('.my-courses-filters').style.removeProperty('display');
  })
</script>

<style>
  .np-dashboard {
    padding-top: 183px;
  }
  .np-stretch-content:nth-child(n+2) {
    margin-top: 24px;
  }

  @media (min-width: 768px) {
    .np-stretch-content {
      margin-top: 24px;
    }

    .np-dashboard-resources-title {
        margin: 20px 0 20px;
    }
  }
}
</style>
