Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
DevJunsik committed Aug 3, 2024
1 parent 841b51d commit 6be3553
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/resources/static/fail.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/main/resources/static/success.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
88 changes: 88 additions & 0 deletions src/main/resources/templates/verify.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>UID Verification</title>
<style>
@font-face {
font-family: 'Pretendard';
src: url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/woff2/Pretendard-Regular.woff2') format('woff2'),
url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/woff/Pretendard-Regular.woff') format('woff');
font-weight: normal;
font-style: normal;
}

body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #FFFFFF;
font-family: Arial, sans-serif;
}
.container {
text-align: center;
}
.logo {
width: 100px;
height: 100px;
margin-bottom: 20px;
}
.message {
font-size: 24px;
line-height: 1.5;
color: #000000;
font-family: 'Pretendard', Arial, sans-serif;
font-weight: 600;
}
</style>
<script th:inline="javascript">
document.addEventListener("DOMContentLoaded", function() {
const uid = /*[[${uid}]]*/ 'default-uid';

fetch('/api/auth/verify', {
method: 'GET',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: new URLSearchParams({ uid: uid })
})
.then(response => {
const contentElement = document.getElementById('content');
if (response.ok) {
contentElement.innerHTML = ' <div class="container">\n' +
' <img src="/success.svg" alt="Logo" class="logo">\n' +
' <div class="message">\n' +
' 이메일이 인증되었습니다!<br>\n' +
' 발표멋분으로 돌아가주세요.\n' +
' </div>\n' +
' </div>';
} else {
contentElement.innerHTML = ' <div class="container">\n' +
' <img src="/fail.svg" alt="Logo" class="logo">\n' +
' <div class="message">\n' +
' 이메일 인증을 실패했습니다.<br>\n' +
' 발표몇분에서 다시 요청해주세요.\n' +
' </div>\n' +
' </div>';
}
})
.catch(error => {
const contentElement = document.getElementById('content');
contentElement.innerHTML = ' <div class="container">\n' +
' <img src="/fail.svg" alt="Logo" class="logo">\n' +
' <div class="message">\n' +
' 이메일 인증을 실패했습니다.<br>\n' +
' 발표몇분에서 다시 요청해주세요.\n' +
' </div>\n' +
' </div>';
});
});
</script>
</head>
<body>
<div id="content">
<h1>loading...</h1>
</div>
</body>
</html>

0 comments on commit 6be3553

Please sign in to comment.