<div class="np-top-vocabulary np-text-title">
  {% t shared.event_types
    , key: training_event.event_type %}
  <i class="fal fa-users-class np-button-color np-training-session-icon"></i>
</div>
<div class="np-top-title">
  <a
    onclick="goBack()"
    class="np-back-button"
    aria-label="{% t shared.go_back %}">
    <i class="far fa-arrow-left np-hidden-mobile np-icon-back"></i>
  </a>
  {{ training_event.title }}
</div>

<script>
  function goBack() {
    const fallbackUrl = '/app/training_events';
    var prevPage = window.location.href;

    window.history.go(-1);

    setTimeout(function() {
      if (window.location.href == prevPage) {
        window.location.href = fallbackUrl;
      }
    }, 800);
  }
</script>