{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <link rel="stylesheet" type="text/css" href="{% static 'trosnoth/style.css' %}" />
  {% block head %}
  {% endblock %}
</head>
<body>
  {% block loginbar %}
    <header class="loginbar"><div class="login_message">
      {% if user.is_authenticated %}
        Logged in as
        {% if user.trosnothuser %}
          <a href="{% url 'trosnoth:profile' userId=user.pk nick=user.trosnothuser.nick  %}"
          >{{ user.trosnothuser.nick }}</a>
        {% else %}
          {{ user.username }}
        {% endif %}
        {% if perms.trosnoth.change_trosnothserversettings %}
          | <span class="header_link"><a
              href="{% url 'trosnoth:settings' %}">configure server</a></span>
        {% endif %}
        {% if perms.trosnoth.change_trosnothuser %}
        | <span class="header_link"><a
          href="{% url 'trosnoth:manageusers' %}">manage players</a></span>
        {% endif %}
        {% if perms.trosnoth.manage_arena %}
          | <span class="header_link"><a
              href="{% url 'trosnoth:arenas' %}">game settings</a></span>
        {% endif %}
        | <a href="{% url 'logout' %}">log out</a>
      {% else %}
        <a href="{% url 'login' %}">Log in</a>
      {% endif %}
    </div></header>
    <div class="header_clear"></div>
  {% endblock %}

  {% block main %}
  {% endblock %}
  {% block footer %}
    <nav class="bottom_menu">
      <a href="{% url 'trosnoth:index' %}">Home</a>
      &ndash;
      <a href="{% url 'trosnoth:gamelist' %}">Game records</a>
      &ndash;
      <a href="{% url 'trosnoth:userlist' %}">Player registry</a>
      &ndash;
      <span class="version">{{ title_version }}</span>
    </nav>
  {% endblock %}
</body>
</html>
