{% load i18n cms_tags %}
{% comment %}Obviously, the context template variable "course" is required and must be a Course page extension{% endcomment %}
{% with course_state=course.state %}
<div class="course-glimpse__media">
    {% show_placeholder "course_cover" course.extended_object %}
</div>
<div class="course-glimpse__content">
    <div class="course-glimpse__content__wrapper">
        <p class="course-glimpse__content__title">{{ course.extended_object.get_title }}</p>
        <p>{{ course.get_main_organization.extended_object.get_title }}</p>
    </div>
    <div class="course-glimpse__footer">
        <p class="course-glimpse__footer__date">
            {{ course_state.text|title }}<br>
            {{ course_state.datetime|date:"DATE_FORMAT" }}
        </p>
        {% if course_state.cta %}
        <div class="course-glimpse__footer__cta">
            <button class="button">{{ course_state.cta|title }}</button>
        </div>
        {% endif %}
    </div>
</div>
{% endwith %}
