{% load admin_static i18n %}{% load url from future %}<!DOCTYPE html>
<!--[if lt IE 9 ]><html lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en" xmlns="http://www.w3.org/1999/html"> <!--<![endif]-->
<head>
  <meta charset="utf-8">
  <title>{% block headtitle %}{% endblock %}</title>

  <link rel="stylesheet" type="text/css" href="{% static 'suit/bootstrap/css/bootstrap.min.css' %}" media="all"/>
  <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,600,700' rel='stylesheet' type='text/css'>

  <style type="text/css">

    html, body {
      height: 100%;
      margin: 0;
      padding: 0;
      text-align: center;
    }

    body {
      background: #ffffff url('{% static 'suit/img/bg_pattern.jpg' %}') top left;
      color: #333;
      font: 16px / 21px 'Open Sans', sans-serif;
      -webkit-font-smoothing: antialiased; /* Fix for webkit rendering */
      -webkit-text-size-adjust: 100%;
      letter-spacing: 0.5;
      text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
    }

    h1 {
      font-size: 48.5px;
      letter-spacing: -3px;
      font-weight: 700;
      margin-bottom: 30px;
    }

    h2 {
      font-size: 48.5px;
      letter-spacing: -3px;
      color: rgba(0, 0, 0, .2);
      text-shadow: 0 1px 0 rgba(255, 255, 255, 1);
      margin-bottom: 20px;
    }

    .distance {
      margin-bottom: -175px; /* half of content height */
      /*background: red;*/ /* temporary - used to see div */
      width: 1px; /* required to "hide" distance div */
      height: 50%; /* required */
      float: left; /* required */
    }
    .container {
      position: relative; /* positions content on top of distance */
      text-align: left; /* horizontal centering hack for IE */
      height: 350px; /* required - desired height */
      width: 700px; /* required - desired width */
      margin: 0 auto; /* required */
      clear: left; /* required */ z-index: 1;
    }

    .btn {
      margin-top: 40px;
    }


  </style>
</head>
<body>

<div class="distance"></div>

<div class="container">

  <h2 class="pull-right">
    {% block error %}{% trans 'error'|capfirst %}{% endblock %}
  </h2>

  <h1>{% block title %}Error{% endblock %}</h1>

  <div class="content">
    {% block content %}{% endblock %}

    <br>
    <script type="text/javascript">
      if(window.location.href.toString().indexOf('popup') != -1){
        document.write('<a href="javascript:window.close()" class="btn btn-info btn-large">Close window</a> ');
      }else {
          if (document.referrer != '') {
              document.write('<a href="javascript:history.back()" class="btn btn-info btn-large">Go back</a> ');
          }
          {% if request and request.user %}
          document.write('<a href="{% url 'admin:index' %}" class="btn btn-large">Go to admin home</a> ');
          {% endif %}
      }
    </script>
  </div>
</div>

</body>
</html>
