<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
    <nav class="main-header navbar navbar-expand navbar-white navbar-light">
        <!-- Left navbar links -->
        <ul class="navbar-nav">
            <li class="nav-item">
                <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
            </li>
            <li class="nav-item d-none d-sm-inline-block">
                <a href="index.html" class="nav-link">Home</a>
            </li>
            <li class="nav-item d-none d-sm-inline-block">
                <a href="#" class="nav-link">Contact</a>
            </li>
        </ul>

        <!-- SEARCH FORM -->
        <form class="form-inline ml-3">
            <div class="input-group input-group-sm">
                <input class="form-control form-control-navbar" type="search" placeholder="Search" aria-label="Search">
                <div class="input-group-append">
                    <button class="btn btn-navbar" type="submit">
                        <i class="fas fa-search"></i>
                    </button>
                </div>
            </div>
        </form>
        <div sec:authorize="isAuthenticated()">
            <header class="main-header">
                <div class="navbar-custom-menu">
            <ul class="navbar-nav">

            <li class="dropdown user user-menu">
                <!--<a th:href="@{/logout}">Logout</a> -->
            <a href="javascript: document.logoutForm.submit()" class="dropdown-toggle">Sign out</a>


        <form name="logoutForm" th:action="@{/logout}" method="post" th:hidden="true">
            <input hidden type="submit" value="Sign Out"/>
        </form>
            </ul>
                </div>
            </header>
        </div>
    </nav>
