<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>{% block title %}reValuate{% endblock %}</title>
	{% load static %}
    {% block optionalParams %} {% endblock %}

	          <!-- Required meta tags -->
          <meta charset="utf-8">
          <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
          <title> reValuate: Putting the value back in recycling </title>
          <!-- Bootstrap CSS and own CSS and AJAX -->

          <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

          <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
          <link rel="stylesheet" href="{% static 'home/css/style.css' %}">

      </head>
      <body>
        {% block aboveNav %} {% endblock %}
        <div class="navview">
          <nav class="navbar navbar-expand-lg bg-success">
              <a style="color: white; font-size: 200%;" class="navbar-brand mb-0 h1" href="/"> reValuate | </a>
              <div class="collapse navbar-collapse" id="navbarSupportedContent">
                <ul class="navbar-nav">
                  <li class="nav-item d-none d-md-block" >
{% if user.is_authenticated %}
                      <a class="nav-link" href="/upload/">Качи</a>
{% endif %}
                       </li>
                       <li class="nav-item d-none d-md-block" >
      
                        {% if user.is_superuser %}
                                    <a class="nav-link" href="/admin/">Админ</a>
                        {% endif %}
                        
                                     </li>
                  </ul>
                  <ul class="navbar-nav ml-auto">
                  <li class="nav-item dropdown ">
                    <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                      {% if user.is_authenticated %}
                      {{ user.username }}
                      {% else %}
                      Акaунт
                      {% endif %}

                    </a>
                    <div class="dropdown-menu animate slideIn" aria-labelledby="navbarDropdown"  >

                      {% if user.is_authenticated %}
                      <a class="dropdown-item "href="/view_media/">Прогрес</a>
                                            <div class="dropdown-divider"></div>

                       <a class="dropdown-item "href="{%url 'logout'%}">Излизане </a>

                      {% else %}
                        <a class="dropdown-item" href="/users/signup"> Регистрация </a>
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item" href="/users/login"> Влизане </a>
                          <div class="dropdown-divider"></div>
                      {% endif %}
                    </div>
                  </li>
                </div>
                </ul>
            </nav>
            </div>

            {% block content %}
            {% endblock %}

          <!-- Jquery, popper, bootstrap scripts -->
          <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
          <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
          <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>


</body>
</html>
