-
Notifications
You must be signed in to change notification settings - Fork 4
/
login.html
134 lines (111 loc) · 3.78 KB
/
login.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" th:href="@{/styles/contact.css}">
<link rel="stylesheet" type="text/css" th:href="@{/styles/contact_responsive.css}">
<!-- login -->
<script>
function modal() {
$('#modaltest').modal();
};
$(document).ready(function(){
var logresult = "[[${logresult}]]";
if (logresult == "f") {
modal();
};
$('#login_form > button').click(function(){
$('#login_form').attr(
{
'action' : '[[@{/user/loginimpl}]]',
'method' : 'post'
}
);
$('#login_form').submit();
});
$('#kakaologin_btn').click(function(){
$('#login_form').attr(
{
'action' : '[[@{/kakaologin}]]',
'method' : 'post'
}
);
});
$('#githublogin_btn').click(function(){
$('#login_form').attr(
{
'action' : '[[@{/githublogin}]]',
'method' : 'post'
}
);
});
});
</script>
<style>
.container_login
{
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
margin-bottom: 100px;
width:100%;
}
@media screen and (max-width : 990px) {
.contact_form_login {
width : 355px;
}
}
</style>
</head>
<body>
<!-- Home -->
<div class="home_login"></div>
<!-- Contact -->
<div class="contact">
<!-- Contact Info -->
<div class="contact_info_container">
<div class="container_login">
<div class="row">
<!-- Contact Form -->
<div class="contact_form_login">
<div class="contact_info_title">로그인</div>
<form id = "login_form" class="comment_form">
<div>
<label for = "id" class="form_title">ID</label>
<input type="text" class="comment_input" id = "id" placeholder="ID" name = "id">
</div>
<div>
<label for = "pwd" class="form_title">비밀번호</label>
<input type="password" class="comment_input" id = "pwd" placeholder="비밀번호" name = "pwd">
</div>
<button style = "font-weight: bold" class="comment_button_login trans_200">로그인</button>
</form>
<a th:href="@{/user/register}"><button style = "font-weight: bold" class="comment_button_login trans_200">회원가입</button></a>
<!-- 카카오 로그인 - API를 호출하여 인가 코드를 받아옴 -->
<a id="kakaologin_btn" href="https://kauth.kakao.com/oauth/authorize?client_id=df5e3953f8c59b9326e8bd7fdeabcdcc&redirect_uri=http://127.0.0.1/mogotco/user/kakaologin&response_type=code">
<img th:src="@{/images/kakao_login.png}" alt="카카오 로그인 버튼" >
</a>
<!-- 깃허브 로그인 - API를 호출하여 인가 코드를 받아옴 -->
<a id="githublogin_btn" href="https://github.com/login/oauth/authorize?client_id=d09e08d1edcc188a134c&redirect_uri=http://127.0.0.1/mogotco/user/githublogin&response_type=code">
<img th:src="@{/images/github_login.png}" alt="깃허브 로그인 버튼" >
</a>
</div>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="modaltest" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
</button>
</div>
<div class="modal-body">ID 나 비밀번호가 일치하지 않습니다. 다시 시도해주세요!</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>