{% load url from future %}


<header id="global-header">

  <div id="header-login-nav" class="show-for-medium-up">
    <div class="row nav-list">
      <div class="large-12 columns">
        <ul>
          {% if request.user.is_authenticated %}
            <li><a href="{% url 'accounts_profile' %}" class="inherit-color">{{ request.user.get_profile.get_points }} Karma Points</a></li>
            <li><a href="{% url 'account_logout' %}" class="inherit-color">Log Out</a></li>
          {% else %}
            <li><a href="{% url 'account_login' %}" class="inherit-color">Log In</a></li>
          {% endif %}
        </ul>
      </div>
    </div>
  </div>


  <div class="contain-to-grid">
    <nav id="main-header" class="top-bar" data-topbar>
      <ul class="title-area">
        <li class="name">
          <h1 class="museo700"><a href="/"><img src="{{ STATIC_URL }}img/karmanotes_logo_small.png" alt="KarmaNotes" /></a></h1>
        </li>
        <li class="toggle-topbar menu-icon">
          <a href="#">Menu</a>
        </li>
      </ul>
      <section class="top-bar-section">
        <ul class="right museo300">
          <li><a href="/">Courses</a></li>
          {% if request.user.is_authenticated %}
            <li class="hide-for-large-up"><a href="{% url 'accounts_profile' %}">Dashboard</a></li>
            <li class="hide-for-large-up"><a href="{% url 'accounts_profile' %}#control_panel">My Account</a></li>
            <li class="hide-for-large-up"><a href="{% url 'account_logout' %}">Log Out</a></li>
          {% else %}
            <li><a href="{% url 'account_signup' %}">Sign Up</a></li>
            <li class="hide-for-large-up"><a href="{% url 'account_login' %}">Log In</a></li>
          {% endif %}
        </ul>
      </section>
    </nav>
  </div>

</header><!--/global header-->

{% if messages %}
  {% for message in messages %}
    <div class="row">
      <div class="small-12 columns message-container">
        <div data-alert class="alert-box radius {{ message.tags }}
          {% if message.level == DEFAULT_MESSAGE_LEVELS.ERROR %}warning{% endif %}
          {% if message.level == DEFAULT_MESSAGE_LEVELS.DEBUG %}info{% endif %}">
          {{ message }}
        </div>
      </div>
    </div>
  {% endfor %}
{% endif %}
