social_course-8.x-2.11/templates/group--course-basic--featured.html.twig
templates/group--course-basic--featured.html.twig
{% extends 'node--featured.html.twig' %}
{% block card_hero_image %}
<div class="img_wrapper">
{% if content.field_group_image|render %}
{{ content.field_group_image }}
{% else %}
<hr class="no-feature-image">
{% endif %}
</div>
{% endblock %}
{% block card_teaser_type %}
<div class="teaser__teaser-type">
<svg class="teaser__teaser-type-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<title>{% trans %}Course:{% endtrans %} {{- label|render|striptags|trim -}}</title>
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M5 13.18v4L12 21l7-3.82v-4L12 17l-7-3.82zM12 3L1 9l11 6 9-4.91V17h2V9L12 3z"/>
</svg>
</div>
{% endblock %}
{% block card_body %}
<small class="text-muted">
<div class="teaser__content-line">
<svg class="teaser__content-type-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" aria-hidden="true">
<title>{% trans %}Status course section{% endtrans %}</title>
<path d="M3.5 18.49l6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z"/>
<path fill="none" d="M0 0h24v24H0z"/>
</svg>
<div class="teaser__content-text">
<span class="sr-only">{% trans %}Status course section{% endtrans %}</span>
{{ finished_sections }} / {{ course_sections }} {% trans %}sections completed{% endtrans %}
</div>
</div>
</small>
<div>
<div class="badge teaser__badge">
<svg class="badge__icon" aria-hidden="true">
<title>{% trans %}Visibility{% endtrans %}</title>
<use xlink:href="#icon-community"></use>
</svg>
</div>
<span class="sr-only">{% trans %}The visibility of this content is set to community{% endtrans %}</span>
{% if course_status == 'enrolled' %}
<span class="badge badge-start teaser__badge badge--section-not-started">
{% trans %}You have enrolled{% endtrans %}
</span>
{% elseif course_status == 'started' %}
<span class="badge teaser__badge badge-warning">
<span class="badge__container">
<span class="badge__label">{% trans %}You have started{% endtrans %} </span>
</span>
</span>
{% elseif course_status == 'finished' %}
<span class="badge teaser__badge badge-success">
<span class="badge__container">
<span class="badge__label">{% trans %}You have finished{% endtrans %} </span>
</span>
</span>
{% endif %}
</div>
{% endblock %}
