{% load static %}
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Production Graph</title>
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <meta name="author" content="" />

    <link rel="stylesheet" href="{% static 'css/styles.css' %}" />
    <link rel="shortcut icon" href="{% static 'assets/logo_favicon.ico' %}" />
  </head>

  <body class="bg-gray-100 font-serif leading-normal tracking-normal">
    <nav class="bg-gray-800">
      <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
        <div class="flex items-center h-16">
        <!--
          <div
            class="text-white font-semibold tracking-wide text-lg cursor-pointer"
            onclick="window.location.href='/'"
          >
            <h3>ProductionGraph</h3>
          </div>
          -->
          <div class="cursor-pointer" onclick="window.location.href='/'">
            <img class="h-12 w-12 object-scale-down rounded-md" src="{% static 'assets/logo_with_bg.jpg' %}" />
          </div>
          <div class="absolute right-0 mr-12">
            {% if request.user.is_authenticated %}
              <form method="post" action="/logout/">
                {% csrf_token %}
                <button class="bg-indigo-500 hover:bg-indigo-700 text-white font-medium py-2 px-4 mr-2 rounded">Logout</button>
              </form>
             {% else %}
                <div class="flex items-center">
                <form method="post" action="/login/">
                    {% csrf_token %}
                <button class="bg-indigo-500 hover:bg-indigo-700 text-white font-medium py-2 px-4 mr-2 rounded">Login</button>
              </form>
                <form method="post" action="/register/">
                    {% csrf_token %}
                <button class="bg-indigo-500 hover:bg-indigo-700 text-white font-medium py-2 px-4 mr-2 rounded">Register</button>
              </form>
                </div>
            {% endif %}
          </div>
        </div>
      </div>
    </nav>
    {% block content %} {% endblock %}
  </body>
</html>
