<!DOCTYPE html>
<html
        xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/html"
        xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<th:block th:fragment="header">
    <div id="header">

        <!-- Logo -->
        <h1><a th:href="@{/}" id="logo">BUM ' <em>sPace</em></a></h1>
        <th:block sec:authorize="isAuthenticated()">
            <span style="margin-left:20px;">환영합니다, <b sec:authentication="name"></b>님!</span>
        </th:block>
        <!-- Nav -->
        <nav id="nav">
            <ul>
                <li id="menu_home" ><a th:href="@{/}">Home</a></li>
                <li id="menu_posts"><a  href="blog/posts">Posts</a></li>

                <!--                <li id="menu_sec"><a  href="left-sidebar">Left Sidebar</a></li>-->
                <!--                <li id="menu_thr"><a  href="right-sidebar">Right Sidebar</a></li>-->
                <!--                <li id="menu_four"><a  href="two-sidebar">Two Sidebar</a></li>-->
                <li id="menu_drop">
                    <a  href="#">About</a>
                    <ul>
                        <li><a href="javascript:gotoWhere()">bums's where</a></li>
                        <li><a href="#">Magna phasellus</a></li>
                        <li><a href="#">Etiam sed tempus</a></li>
                        <li>
                            <a href="#">Submenu</a>
                            <ul>
                                <th:block sec:authorize="isAuthenticated()">
                                    <li><a href="javascript:gotoWrite()">글쓰기</a></li>
                                    <li><a href="javascript:gotoModify()">수정하기</a></li>
                                </th:block>
                                <li><a href="#">Phasellus magna</a></li>
                                <!--                                <li><a href="#">Magna phasellus</a></li>-->
                                <!--                                <li><a href="#">Etiam nisl</a></li>-->
                                <!--                                <li><a href="#">Veroeros feugiat</a></li>-->
                            </ul>
                        </li>
                        <li><a th:href="@{/licenses}">Licenses</a></li>
                    </ul>
                </li>
                <th:block sec:authorize="!isAuthenticated()">
                    <li id="menu_login" ><a href="javascript:openLoginPopup('login')">LOGIN</a></li>
                </th:block>
                <th:block sec:authorize="isAuthenticated()">
                    <li>
                        <a href="javascript:logout()" style="margin-left:10px;">로그아웃</a>
                    <li>
                </th:block>
            </ul>
        </nav>

    </div>
</th:block>
</html>