{% comment %}
Copyright (C) 2018-2021  The Software Heritage developers
See the AUTHORS file at the top-level directory of this distribution
License: GNU Affero General Public License version 3, or any later version
See top-level LICENSE file for more information
{% endcomment %}

{% load static %}

<div class="swh-http-error">
  <div class="swh-http-error-head">Error</div>
  <div class="swh-http-error-code">
    <img class="hidden-xs swh-image-error" src="{% static 'img/swh-logo.svg' %}">
    {{ error_code }}
    <img class="hidden-xs swh-image-error" src="{% static 'img/swh-logo.svg' %}">
  </div>
  <h3>{{ error_message }}</h3>

  <div class="swh-http-error-desc">
    <pre>{{ error_description }}</pre>
    {% if not iframe_mode %}
      <div>
        <a class="btn" onclick="window.history.back();">
          <i class="mdi mdi-arrow-left" aria-hidden="true"></i>
          Go back to previous page
        </a>
        or
        <a class="btn" href="{% url 'swh-web-homepage' %}">
          <i class="mdi mdi-arrow-left" aria-hidden="true"></i>
          Go back to homepage
        </a>
      </div>
    {% endif %}
  </div>
</div>