<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <meta charset="UTF-8">
    <title>Profile</title>
    <script
            src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css"
          integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB"
          crossorigin="anonymous">
    <link href="/static/App.css" rel="stylesheet" media="screen" th:href="@{/App.css}"/>
    <script
            src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<header class="App-header d-flex justify-content-end" th:fragment="header">
    <!--<div class="text-left col">
        <img src="/images/crazylegs.png" width="5%" class="text-left">
        <a th:href="@{/}" class="nav-links-go4me">Go4Me</a>
    </div>-->
    <form th:action="@{/logout}" method="post" sec:authorize="isAuthenticated()">
            Welcome! <b sec:authentication="name"></b>
        <input class="btn button-go4me-header" type="submit" value="Logout" />
    </form>
    <div class="text-right" sec:authorize="isAnonymous()">
        <a th:href="@{/login}" class="btn button-go4me-header">Login</a>
        <a class="btn button-go4me-header" th:href="@{/register}">Register</a>
    </div>
</header>
<nav class="navbar navbar-expand-lg navbar-light nav-go4me">
    <img src="/images/crazylegs.png" width="2.5%">
    <a class="navbar-brand text-white nav-links-go4me" th:href="@{/}">Go4Me</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
            aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav mr-auto">
            <li class="nav-item active">
                <a class="nav-link text-white" th:href="@{/profile}">Profile panel<span class="sr-only">(current)</span></a>
            </li>
            <li class="nav-item active">
                <a class="nav-link text-white" th:href="@{/neworder}">Publish an Order</a>
            </li>
            <li>
                <a class="nav-link text-white" th:href="@{/searchorders}">Orders</a>
            </li>
            <li class="nav-item active">
                <a class="nav-link"></a>
            </li>
        </ul>

        <form class="form-inline my-2 my-lg-0" th:action="@{'/users'}">
            <input class="form-control mr-sm-2" type="search" placeholder="Search Users" th:name="username">
            <button class="btn button-go4me-nav" type="submit">Search</button>
        </form>
    </div>
</nav>
</body>
</html>