<!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>MyNetflix</title>
    <script src="https://code.jquery.com/jquery-3.1.1.min.js"/>
    <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>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" >
    <link rel="stylesheet" href="/plugins/owl.carousel/dist/assets/owl.carousel.min.css" />

    <link rel="stylesheet" href="/css/main.css">
    <div id="fb-root"></div>
</head>
<body>

    <nav id="menu">
        <div class="row">
               
          
        <div class="col-md-12">

                <nav class="navbar navbar-expand-lg navbar-light bg-light">
                    <div id="logo"><img src="/img/logo.png"></div>

                  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
                          <span class="navbar-toggler-icon"></span>
                        </button>
                        <div class="collapse navbar-collapse" id="navbarNavAltMarkup">
                          <div class="navbar-nav">
                            <a class="nav-item nav-link active" href="/">Home <span class="sr-only">(current)</span></a>
                            <a class="nav-item nav-link" href="/series">SÃ©ries</a>
                            <a class="nav-item nav-link" href="/filmes">Filmes</a>
                            <% if (user) { %>
                           
                            <div class="dropdown">
                                  <a class="nav-item nav-link dropdown-toggle" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" href="#"><%= user.name %></a>
                                    <div class="dropdown-menu" aria-labelledby="dropdownMenu2">
                                      <a class="nav-item nav-link dropdown-item"  href="/mylist" class="btn">Minha Lista</a>
                                      <a class="nav-item nav-link dropdown-item"  href="/watched" class="btn">Assistido</a>
                                      <a class="nav-item nav-link dropdown-item"  href="/profile" class="btn">Perfil</a>
                                      <a class="nav-item nav-link dropdown-item"  href="/deslogar" class="btn">Sair</a>
                                    </div>
                            </div>
                            <% }else { %>
                           
                            <a class="nav-item nav-link"  href="/">Login</a>
                    
                            <% } if (user && user.isadmin) { %>
                                <a class="nav-item nav-link"  href="/admin/" class="btn">Ir ao Painel</a>
                                <a class="nav-item nav-link" href="/admin/deslogar" class="btn">Sair</a>
        
                            <% } %>
                          </div>
                          
                        </div>
                      </nav>
             
            </div>

            </nav>
        </div>