<!DOCTYPE html>
<html
        xmlns:th="http://www.thymeleaf.org"
        xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
        xmlns:sec="http://www.thymeleaf.org/extras/spring-security"
        layout:decorate="~{layout/default_layout}"
>
<th:block  layout:fragment="head" id="head">
    <script type="text/javascript" th:src="@{/js/blog.js}"></script>
    <link th:href="@{/css/blog.css}" rel="stylesheet" />
    <!-- Quill 스타일 시트 -->
    <link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">

    <!-- Quill 라이브러리 -->
    <script src="https://cdn.quilljs.com/1.3.6/quill.js"></script>
    <!-- HTML 에디터 영역 -->
    <!--    <div id="editor-container" style="height: 300px;"></div>-->
    <!-- Quill 라이브러리 및 테마 -->
    <link href="https://cdn.jsdelivr.net/npm/quill@2/dist/quill.snow.css" rel="stylesheet" />
    <script src="https://cdn.jsdelivr.net/npm/quill@2/dist/quill.js"></script>
    <!-- 테이블 플러그인 CSS & JS -->
    <link href="https://cdn.jsdelivr.net/npm/quill-table-better@1/dist/quill-table-better.css" rel="stylesheet" />
    <script src="https://cdn.jsdelivr.net/npm/quill-table-better@1/dist/quill-table-better.js"></script>
    <script>document.addEventListener('DOMContentLoaded', function() {initEditor(true)});</script>
</th:block>
<th:block layout:fragment="content" id="content">
    <div id="main_layer">
        <section class="wrapper style1">
            <div class="container">
                <div id="content">
                    <article>
                        <th:block sec:authorize="isAnonymous()">
                            <h1>권한이 없는 뎁쇼?!</h1>
                        </th:block>
                        <th:block sec:authorize="isAuthenticated()">
                            <div class="layer">
                                <input id="title_field" class="write_option" />
                            </div>
                            <div id="editor" ></div>
                            <div class="write_controllbox">
                                <div class="write_option btn-example" to="#popLayer1" onclick="openPopup(this)"  ></div>
                                <div style="width: 15px" ></div>
                                <div class="write_option btn-example" to="#popLayer2" onclick="openPopup(this)" id="hashtag_field"></div>
                                <div style="width: 15px" ></div>
                                <label class="write_option" readonly id="location_field"></label>
                            </div>
                            <h1><button id="save" class="write_option" style="width: 100%; position: relative"  onclick="save()">저장하셈</button></h1>
                        </th:block>
                    </article>
                </div>
            </div>
        </section>
    </div>
</th:block>
<th:block layout:fragment="popup_layer">
    <div id="popLayer1" class="pop_layer">
        <div class="pop_container">
            <div class="pop_conts">
                <!--content //-->
                <p class="ctxt mb20">Thank you.<br>
                    Your registration was submitted successfully.<br>
                    Selected invitees will be notified by e-mail on JANUARY 24th.<br><br>
                    Hope to see you soon!
                </p>
                <div class="btn_r">
                    <a href="#" class="btn_layerClose">Close</a>
                </div>
                <!--// content-->
            </div>
        </div>
    </div>
    <div id="popLayer2" class="pop_layer">
        <div class="pop_container">
            <div class="pop_conts">
                <!--content //-->
                <p class="ctxt mb20">
                    test 002
                </p>
                <div class="btn_r">
                    <a href="#" class="btn_layerClose">Close</a>
                </div>
                <!--// content-->
            </div>
        </div>
    </div>
</th:block>

</html>
