Files
korea-research/front/src/main/resources/templates/common/components.html
2025-05-29 15:27:37 +09:00

198 lines
10 KiB
HTML

<!DOCTYPE html>
<html xmlns:sec="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<!--
██ ██ ██ ███████ █████ ██████ ██
██ ██ ██ ██ ██ ██ ██ ██ ██
██ ███████ █████ ███████ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ███████ ██ ██ ██████ ██
-->
<head th:fragment="head">
<meta charset="UTF-8">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<meta name="_csrf" th:content="${_csrf.token}"/>
<meta name="_csrf_header" th:content="${_csrf.headerName}"/>
<title th:text="${currentURI.ogTitle}"></title>
<meta name="title" th:content="${currentURI.ogTitle}"/>
<meta name="description" th:content="${currentURI.ogDesc}"/>
<meta name="keywords" th:content="${currentURI.ogKeywords}"/>
<meta property="og:title" th:content="${currentURI.ogTitle}"/>
<meta property="og:description" th:content="${currentURI.ogDesc}"/>
<meta property="og:keywords" th:content="${currentURI.ogKeywords}"/>
<meta property="og:image" th:content="${currentURI.ogImage}"/>
<script th:src="@{/static/library/jquery/jquery-3.6.0.min.js}"></script>
<script th:src="@{/static/library/jsUri/Uri.js}"></script>
<script th:src="@{/static/library/jsRender/jsrender.min.js}"></script>
<script th:src="@{/static/ui/uiUtil.js}"></script>
<script th:src="@{/static/library/jquery/jquery-serializeObject.min.js}"></script>
<link rel="stylesheet" th:href="@{/static/library/flatpickr/flatpickr.min.css}">
<link rel="stylesheet" th:href="@{/static/library/flatpickr/flatpickr.dark.css}">
<script th:src="@{/static/library/flatpickr/flatpickr.min.js}"></script>
<script th:each="flashMsg : ${session.flashAlertMessages}" th:if="${session.flashAlertMessages != null}"
th:inline="javascript">
$(function () {
const flashAlertMessage = [[${flashMsg}]];
if (flashAlertMessage) {
alert(flashAlertMessage);
}
});
</script>
<script th:if="${session.flashAlertMessages != null}" th:inline="javascript">
[[${#session.removeAttribute('flashAlertMessages')}]]
</script>
<style type="text/css">
.active {
font-weight: bold;
}
</style>
</head>
<body>
<!--
██ ███ ██ █████ ██ ██ ██ ██ ██ ███████ █████ ██████ ███████ ██████
██ ████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ███████ ██ ██ ██ █████ ███████ █████ ███████ ██ ██ █████ ██████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ████ ██ ██ ████ ██ ██ ██ ███████ ██ ██ ██████ ███████ ██ ██
-->
<nav th:fragment="header">
<section style="background:#eee; border-radius: 1px;">
<h2>Header 영역</h2>
<p>
<strong>Current Locale</strong> :
<select name="localeSelect" onchange="localeChange(this);">
<option>언어 설정</option>
<option th:selected="${#locale.toString() == 'ko_KR'}" value="ko_KR">ko_KR</option>
<option th:selected="${#locale.toString() == 'en_US'}" value="en_US">en_US</option>
</select>
</p>
<p>
<strong>Current Device</strong> : [[${currentDevice}]]
</p>
<div>
<strong>Current Login User</strong> :
<p sec:authorize="isAnonymous()" th:remove="tag">
<a href="/login">[로그인]</a>
</p>
<p sec:authorize="isAuthenticated()" th:remove="tag">
<strong th:text="${#authentication.principal.ownerName}">로그인 사용자명</strong>
<a href="/logout">[로그아웃]</a>
<a href="/user/info">[정보수정]</a>
</p>
</div>
<script th:inline="javascript">
function localeChange(oj) {
if (!oj.value) {
return;
}
location.href = new Uri(location.href).replaceQueryParam('lang', oj.value);
}
</script>
<ul th:if="${topNode != null}">
<li>
<a th:classappend="${topNode.uri eq currentURI.uri} ? 'active'"
th:href="${topNode.uri}">[[${#messages.msg(topNode.id)}]]</a>
</li>
<li th:each="menu : ${topNode.children}" th:if="${menu.showOnNavi}">
<!-- 자식 nodes 가 없는 경우 -->
<a th:classappend="${currentURI.id == menu.id}? 'active'"
th:href="${menu.uri}" th:if="${#lists.size(menu.children) == 0}"
th:text="${#messages.msg(menu.id)}">메뉴명</a>
<!-- 자식 nodes 가 있는 경우 -->
<a th:classappend="${@coreUtil.containsCurrentURI(menuHierarchy, menu.id)}? 'active'"
th:href="${menu.uri}"
th:if="${#lists.size(menu.children) > 0}" th:text="${#messages.msg(menu.id)}">메뉴명</a>
<ul th:if="${#lists.size(menu.children) > 0}">
<li th:each="child : ${menu.children}" th:if="${child.showOnNavi}">
<a class="dropdown-item"
th:classappend="${@coreUtil.containsCurrentURI(menuHierarchy, child.id)}? 'active'"
th:href="${child.uri}" th:text="${#messages.msg(child.id)}">메뉴명</a>
</li>
</ul>
</li>
</ul>
</section>
</nav>
<!--
██████ ██████ ███████ █████ ██████ ██████ ██████ ██ ██ ███ ███ ██████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████ ████ ██ ██
██████ ██████ █████ ███████ ██ ██ ██ ██████ ██ ██ ██ ████ ██ ██████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██████ ██ ██ ███████ ██ ██ ██████ ██████ ██ ██ ██████ ██ ██ ██████
-->
<div th:fragment="breadcrumb">
<div style="background:#eee;">
<h2>Breadcrumb 영역</h2>
<nav>
<ol>
<li th:classappend="${item.id == currentURI.id}? 'active'"
th:each="item, status : ${menuHierarchy}">
<a th:href="${item.uri}" th:if="${item.id != currentURI.id}">
<span th:remove="tag" th:text="${@coreUtil.getUriTitle(item)}"></span>
</a>
<span th:if="${item.id == currentURI.id}" th:remove="tag"
th:text="${@coreUtil.getUriTitle(item)}"></span>
</li>
</ol>
</nav>
</div>
</div>
<!--
██████ █████ ██████ ███████ ██ ██ ███████ █████ ██████ ██ ███ ██ ██████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████ ██ ██
██████ ███████ ██ ███ █████ ███████ █████ ███████ ██ ██ ██ ██ ██ ██ ██ ███
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██████ ███████ ██ ██ ███████ ██ ██ ██████ ██ ██ ████ ██████
-->
<div th:fragment="pageHeading">
<h1 th:text="${#messages.msg(currentURI.id)}"></h1>
</div>
<!--
██████ ██████ ███████ ██████ █████ ████████ ██ ██████ ███ ██ ███ ███ ███████ ██████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████ ██ ████ ████ ██ ██
██ ██ ██████ █████ ██████ ███████ ██ ██ ██ ██ ██ ██ ██ ██ ████ ██ ███████ ██ ███
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██████ ██ ███████ ██ ██ ██ ██ ██ ██ ██████ ██ ████ ██ ██ ███████ ██████
-->
<div class="row" th:fragment="operationMessage" th:if="${not #strings.isEmpty(operationMessage)}">
<div class="alert alert-info fw-bold" th:utext="${operationMessage}">
</div>
</div>
<!--
███████ ██████ ██████ ████████ ███████ ██████
██ ██ ██ ██ ██ ██ ██ ██ ██
█████ ██ ██ ██ ██ ██ █████ ██████
██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██████ ██████ ██ ███████ ██ ██
-->
<div th:fragment="footer">
<footer>
<div>
<span>&copy; 2022 All rights reserved</span>
</div>
</footer>
</div>
</body>
</html>