This commit is contained in:
2024-12-04 18:01:50 +09:00
parent 576932da3d
commit cd1072430e
17 changed files with 465 additions and 59 deletions
+1 -1
View File
@@ -163,4 +163,4 @@ a.btn_layerClose:hover {
padding: 1px;
border-radius: 10px;
background: #00000044;
}
}
+9 -1
View File
@@ -43,6 +43,12 @@ body > *{
/*}*/
.center_menu {
display: inline-flex;
justify-content: space-evenly;
}
header {
top: 0;
/*background: var(--DEFAULT_LAYER_BACK);*/
@@ -51,8 +57,10 @@ header {
border-width: 1px;
height: 5vh;
min-height: 5vh;
grid-auto-flow: column;
display: flex;;
position: relative;
justify-content: space-around;
}
.user_info {
@@ -95,7 +103,7 @@ header {
}
#top {
float: left;
display: inline-block;
justify-content: space-between;
margin-left: auto;
+18 -18
View File
@@ -81,12 +81,6 @@ function postLogin(target,type, data, key,callBackResult) {
if (httpRequest.readyState === XMLHttpRequest.DONE) {
if (httpRequest.status === 200) {
try {
var uuid= httpRequest.getResponseHeader("S33-DATA")
console.log("LOG __ 0" + document.cookie)
console.log("LOG __ 1" + uuid)
document.cookie = "S33-DATA="+uuid
console.log("LOG __ 2" + document.cookie)
console.log("LOG __ 3" + uuid)
callBackResult(httpRequest.response)
document.location.href = document.location
} catch (e) {
@@ -121,19 +115,22 @@ function mainPath() {
}
}
function gotoWrite() {
document.location.href = getMainPath()+"/blog/write"
}
function gotoModify() {
document.location.href = getMainPath()+"/blog/modify"
}
function gotoWhere() {
document.location.href = getMainPath()+"/bums/where"
}
function logout() {
if(document.cookie.split(";").length > 1) {
document.cookie.split(";").forEach(function (v,i,a){
if(v.search("S33-DATA") > 0) {
document.cookie.replace(v,"S33-DATA=")
} else {
}
})
} else {
document.cookie = "S33-DATA="
}
// retrieve all cookies
document.cookie = "access=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"
document.cookie = "refresh=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"
let logOutUrl = getMainPath() + "/user/logout.ajax";
post(logOutUrl,"","","", function (resultData) {
alert(resultData)
@@ -159,7 +156,10 @@ function onclickLogin(type, keyword) {
'user_pw': user_pw.value,
}
postLogin(getMainPath()+"/user/login.ajax",type,JSON.stringify(data),keyword, function (resultData) {
alert(resultData)
var data = JSON.parse(resultData)
// alert(resultData)
document.cookie = "access=" + data.token.split(";")[0]+";"
document.cookie = "refresh=" + data.refresh.split(";")[0]+";"
})
}
@@ -28,6 +28,7 @@
console.log(window.c)
console.log(style.getPropertyValue('--FooterHeight'))
console.log(style.getPropertyValue('--TopHeight'))
document.querySelector("#title_field").value = baseData.title
var editorHeght = (
document.querySelector('#main_layer').getBoundingClientRect().height -
(
@@ -88,9 +89,9 @@
<h1>권한이 없는 뎁쇼?!</h1>
</th:block>
<th:block th:if="${PERMISSION == 'OK'}">
<div class="layer">
<input id="title_field" />
</div>
<label for="title_field"></label><input id="title_field" class="write_option">
<div id="editor" ></div>
<div class="write_controllbox">
@@ -2,10 +2,10 @@
<html xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/html">
<th:block th:fragment="header">
<header>
<div id="top">
<td><h3><a aria-label="goToMain" style="color: white" href="javascript:mainPath()" title="goToMain">HOME</a></h3></td>
</div>
<th:block th:if="${PERMISSION != 'OK'}">
<script th:inline="javascript">
document.addEventListener("DOMContentLoaded", addListen);
@@ -18,6 +18,13 @@
</div>
</th:block>
<th:block th:if="${PERMISSION == 'OK'}">
<div></div>
<td><h3><a aria-label="create New Post" style="color: white" href="javascript:gotoWrite()" title="create New Post">create New Post</a></h3></td>
<td><h3><a aria-label="where's Bum" style="color: white" href="javascript:gotoWhere()" title="where's Bum">where's Bum</a></h3></td>
<td><h3><a aria-label="modify & open Post" style="color: white" href="javascript:gotoModify()" title="modify & open Post">modify & open Post</a></h3></td>
<div></div>
<div></div>
<div></div>
<div class="user_info" >
<td><h3><a aria-label="logout" style="color: white" href="javascript:logout()" title="logout">logout</a></h3></td>
</div>
@@ -4,26 +4,17 @@
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns="http://www.w3.org/1999/html">
<head>
<!-- <th:block layout:replace="fragments/includes" ></th:block>-->
<th:block th:replace="~{fragments/includes :: includes}"></th:block>
<!-- layout:fragment="head" -->
<th:block layout:fragment="head"></th:block>
<!-- <th:block layout:replace="fragments/title" ></th:block> -->
<th:block th:replace="~{fragments/title :: title}"></th:block>
</head>
<body>
<!--<th:block th:replace="fragments/header :: header"></th:block>-->
<th:block th:replace="~{fragments/header :: header}"></th:block>
<!--<th:block layout:fragment="content"></th:block>-->
<th:block layout:fragment="content"></th:block>
<div class="dim_layer">
<div class="dimBg"></div>
<th:block layout:fragment="popup_layer"></th:block>
</div>
<!--<th:block th:replace="fragments/footer :: footer"></th:block>-->
<th:block th:replace="~{fragments/footer :: footer}"></th:block>
</body>
</html>