<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
      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="@{/account/home}" 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>

        <ul class="navbar-nav ml-auto">
            <li class="dropdown user user-menu" sec:authorize="hasAnyAuthority('CUSTOMER', 'ADMIN')">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                    <span class="hidden-xs" sec:authentication="name"></span>
                </a>
                <ul class="dropdown-menu">
                    <!-- User image -->
                    <li class="user-header">
                        <img th:src="@{/dist/img/avatar5.png}" class="img-circle" alt="User Image">
                        <p>
                            Spring Security Course
                            <small>Java Development Journal</small>
                        </p>
                    </li>
<!--                    <div sec:authorize="isAuthenticated()">  </div>-->
                    <li class="user-footer">
                        <div class="pull-right">
                            <a href="javascript: document.logoutForm.submit()" class="btn btn-default btn-flat">Sign out</a>
                        </div>
                    </li>
                </ul>
            </li>
            <form name="logoutForm" th:action="@{/logout}" method="post" th:hidden="true">
                <input hidden type="submit" value="Sign Out"/>
            </form>
        </ul>

    </nav>
