-
Notifications
You must be signed in to change notification settings - Fork 0
/
emailreset.html
234 lines (214 loc) · 7.38 KB
/
emailreset.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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Đăng nhập</title>
<link rel="icon" type="image/x-icon" href="./library/logoko-01.png">
<link rel="stylesheet" href="./css/style.css">
<script src="https://kit.fontawesome.com/09f1ff1e12.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons+Outlined">
<script src="https://www.w3schools.com/lib/w3.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js" type="text/javascript"></script>
<style>
body {
width: 100%;
height: 100vh;
background-color: #f2f3f5;
font-family: SVN-Poppins;
}
.content h2 {
margin-left: 22px;
margin-bottom: 10px;
color: #db7093;
}
.flex-container {
background-color: white;
padding: 30px 0;
box-shadow: 0px 0px 25px 2px rgb(173, 173, 173, 0.5);
border-radius: 20px;
width: 500px;
height: 120px;
margin: 50px 20px;
font-size: 15px;
margin-left: auto;
margin-right: auto;
}
.email_input {
width: 100%;
height: 30px;
font-family: SVN-Poppins;
text-align: center;
}
.email_input input {
width: 90%;
height: 30px;
}
.email_input small {
margin: 0 10px;
color: #e74c3c;
visibility: hidden;
}
#send {
cursor: pointer;
font-weight: bold;
width: 200px;
background-color: #f5deb3;
border: none;
border-radius: 5px;
height: 30px;
margin-top: 10px;
}
#send:hover {
background-color: #db7093;
color: #f5deb3;
}
@media only screen and (max-width: 900px) {
.flex-container {
width: 70%;
margin-left: auto;
margin-right: auto;
}
}
@media only screen and (max-width: 600px) {
.flex-container {
width: 50%;
}
.form_button-signin {
margin-bottom: 20px;
}
form {
display: flex;
flex-direction: column;
}
.fgpw {
margin-left: 0px;
}
#emaillogin {
width: 200px;
}
#pwlogin {
width: 200px;
}
}
@media only screen and (max-width: 900px) {
.flex-container {
width: 70%;
margin-left: auto;
margin-right: auto;
}
}
@media only screen and (max-width: 680px) {
.flex-container {
width: 60%;
}
#emailreset {
width: 220px;
}
#send {
width: 150px;
}
}
@media only screen and (max-width: 420px) {
.flex-container {
width: 250px;
margin-left: auto;
margin-right: auto;
font-size: 12px;
}
#emailreset {
width: 220px;
}
#send {
width: 100px;
}
}
</style>
</head>
<body>
<!-- chèn html header -->
<!-- <div w3-include-html="header.html"></div> -->
<div id="header"></div>
<script>
load("header.html");
function load(url) {
req = new XMLHttpRequest();
req.open("GET", url, false);
req.send(null);
document.getElementById("header").innerHTML = req.responseText;
}
</script>
<!-------------------------Phần nội dung---------------------------------- -->
<div class="content">
<div>
<div class="flex-container">
<h2>Nhập email của bạn</h2>
<form action="#" id="resetpw_form">
<div class="email_input">
<input type="text" id="emailreset" placeholder="Nhập địa chỉ email..."> <br>
<span id="text"></span>
<br>
<button value="Gửi" id="send" onclick="validation()">Gửi</button>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- chèn html footer -->
<!-- <div w3-include-html="footer.html"></div> -->
<div id="footer"></div>
<script>
load("footer.html");
function load(url) {
req = new XMLHttpRequest();
req.open("GET", url, false);
req.send(null);
document.getElementById("footer").innerHTML = req.responseText;
}
</script>
<script>
function validation() {
var form = document.getElementById('resetpw_form');
var email = document.getElementById('emailreset').value;
var pattern = /^[^ ]+@[^ ]+\.[a-z]{2,3}$/;
if (email.match(pattern)) {
form.classList.add("valid");
form.classList.remove("invalid");
document.getElementById('text').innerHTML = "Đã gửi email";
document.getElementById('text').style.color = "#2ecc71";
document.getElementById('emailreset').style.border = "1.5px solid #2ecc71";
} else if (email === "") {
form.classList.add("valid");
form.classList.remove("invalid");
document.getElementById('text').innerHTML = "Vui lòng nhập email";
document.getElementById('text').style.color = "#e74c3c";
document.getElementById('emailreset').style.border = "1.5px solid #e74c3c";
} else {
form.classList.add("valid");
form.classList.remove("invalid");
document.getElementById('text').innerHTML = "Email của bạn không hợp lệ";
document.getElementById('text').style.color = "#e74c3c";
document.getElementById('emailreset').style.border = "1.5px solid #e74c3c";
}
}
</script>
<!-- function để chèn html -->
<script>
w3.includeHTML();
</script>
<!-- js mở chatbox và quay về đầu trang -->
<script src="./js/chatBox&returnTop-btn.js"></script>
<!-- js khi kéo xuống thì hiện 1 thanh nav cố định ở đầu trang web -->
<script src="./js/flat-menu.js"></script>
<!-- js xổ ra các mục nhỏ của footer khi trình duyệt thu nhỏ -->
<script src="./js/footer.js"></script>
<script src="./js/products_detail.js"></script>
<script src="./js/searchHeader.js"></script>
<script src="./js/searchdetails.js"></script>
<script src="./js/searchMobile.js"></script>
</body>
<!-- sign-in -->
</html>