<div class="exercise exercise-{{ exercise_id }}">
    <div class="card mw-100">
        {% if exerciseHeadline != "none" %}
        <div class="{% if exerciseShowBackground %}exercise-header{% endif %} card-header bg-none border-bottom-0">
            <{{exerciseHeadline}} class="my-0 d-flex align-items-center"><span class="badge rounded-circle"><i class="fas fa-flag"></i></span>&nbsp;{{ exercise_title }}</{{exerciseHeadline}}>
        </div>
        {% endif %}
        <div class="card-body">
            {{ content|raw }}
        </div>
        {% if exerciseShowFavButton %}
        <div class="card-footer bg-transparent">
            <div class="w-100 d-flex flex-column flex-sm-row">
                <div class="w-100 d-flex align-items-stretch {% if favoritePage %}favoriteExerciseItemButtonArea{% endif %}">
                    <button class="btn btn-primary m-0 {% if not usermodus %}exerciseFavoriteButton{% else %}disabled{% endif %} {% if isFavorite %}d-none{% endif %}" 
                        {% if not usermodus %}data-exerciseid="{{ exercise_id }}" data-trainingid="{{ trainingid }}" data-lektionid="{{ lektionid }}" data-seitenid="{{ seitenid }}" data-url="{{ url }}"{% endif %}>
                        <i class="fas fa-plus-square"></i>&nbsp;Zu Favoriten hinzufügen
                    </button>
                    <button class="btn btn-primary m-0 {% if not usermodus %}exerciseUnfavoriteButton{% else %}disabled{% endif %} {% if not isFavorite %}d-none{% endif %}" 
                        {% if not usermodus %}data-exerciseid="{{ exercise_id }}" data-trainingid="{{ trainingid }}" data-lektionid="{{ lektionid }}" data-seitenid="{{ seitenid }}" data-url="{{ url }}"{% endif %}>
                        <i class="fas fa-minus-square"></i>&nbsp;Aus Favoriten entfernen
                    </button>
                </div>
                {% if showSource %}
                <div class="w-100 mt-2 mt-sm-0 d-flex justify-content-sm-end align-items-center">
                    Übung aus
                    <a href="{{ fe.getUrl() }}" class="btn btn-info btn-sm ml-2" target="_blank">
                        {% if trainings != null and 
                            fe.getTraining_id() != null and trainings[fe.getTraining_id()] != null %}

                            {{ trainings[fe.getTraining_id()] }}

                        {% else %}
                            einer anderen Seite
                        {% endif %}
                        &nbsp;<i class="fas fa-external-link-alt"></i>
                    </a>
                    </a>
                </div>
                {% endif %}
            </div>
            {% if showSource %}
                <div class="w-100 mt-2">
                    <small>Hinzugefügt am {{ fe.getFavorite_dateFormatted() }}</small>
                </div>
            {% endif %}
        </div>
        {% endif %}
    </div>
</div>