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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
| <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>BrowseWatch</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script src="jquery.cookie.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#setCookie").click(function () {
var date = new Date();
date.setTime(date.getTime() + (10 * 1000));
$.cookie("popup", "", {expires: date, path: '/' });
$("#bg_popup").hide();
});
if ( $.cookie("popup") == null )
{
setTimeout(function(){
$("#bg_popup").show();
}, 0000)
}
else { $("#bg_popup").hide();
}
});
</script>
<script type="text/javascript">
//часы
var time = setInterval(function() {
var date = new Date();
document.getElementById("time").innerHTML = (date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds());
}, 1000);
//ввод пароля
function addTextToInput(anElement) {
var text = document.getElementById('password').value;
if (text != "")
text += "";
text += anElement.innerText;
document.getElementById('password').value = text;
}
//создание пароля
function setPassword()
{
if(changepassword.value) {
localStorage.password = changepassword.value;
window.location.reload(true);
}
}
</script>
<style>
body {
background: #292929;
}
* {
font-family: Arial, Helvetica, sans-serif;
}
.lockscreen {
position: fixed;
width: 100vw;
height: 100vh;
background: #292929;
left: 0px;
top: 0px;
}
#time {
width: 200px;
color: white;
font-weight: 100;
font-size: 50px;
position: fixed;
text-align: center;
left: calc( 50vw - 100px );
top: 20px;
z-index: 1;
}
.lock {
width: 100px;
height: 100px;
position: fixed;
left: calc( 50vw - 50px );
bottom: 100px;
}
.lock > * {
position: absolute;
}
.bodylock {
width: 60px;
height: 40px;
border: 5px solid white;
border-radius: 5px;
bottom: 10px;
left: 15px;
}
.handlelock {
width: 40px;
height: 30px;
border-left: 5px solid white;
border-top: 5px solid white;
border-right: 5px solid white;
border-bottom: 5px solid transparent;
border-radius: 35px 35px 0 0;
left: 25px;
top: 5px;
}
.circlechink {
width: 5px;
height: 5px;
border-top: 5px solid white;
border-left: 5px solid white;
border-right: 5px solid white;
border-bottom: 5px solid transparent;
border-radius: 8px;
top: 60px;
left: 42.5px;
}
.rectanglechink {
width: 2px;
height: 5px;
border-right: 5px solid white;
border-bottom: 5px solid white;
border-left: 5px solid white;
border-top: 5px solid transparent;
border-radius: 0 0 5px 5px;
top: 65px;
left: 44.25px;
}
.unlocktext {
width: 90vw;
position: fixed;
text-align: center;
left: 5vw;
bottom: 20px;
color: white;
font-weight: 300;
font-size: 20px;
}
#cpasswordform {
display: none;
}
#cpasswordform ~ .passwordform {
left: -100vw;
}
#cpasswordform:checked ~ .passwordform {
left: 0vw;
}
.passwordform {
width: 100vw;
height: 150px;
background: grey;
position: fixed;
color: white;
top: 100px;
z-index: 1;
transition: 0.5s;
border-top: 1px solid white;
border-bottom: 1px solid white;
}
#password {
width: calc( 90vw - 4px );
height: 30px;
}
.fillpassword1, .fillpassword2, .fillpassword3, .fillpassword4, .fillpassword5, .fillpassword6, .fillpassword7, .fillpassword8, .fillpassword9, .fillpassword10, .fillpassword11, .fillpassword12 {
width: 33.3vw;
height: 30px;
background: linear-gradient(white, grey);
border: none;
position: absolute;
border-right: 1px solid grey;
border-left: 1px solid grey;
font-size: 25px;
font-weight: 100;
}
.fillpassword1 {
top: 30px;
left: 0vw;
}
.fillpassword2 {
top: 30px;
left: 33.3vw;
}
.fillpassword3 {
top: 30px;
left: 66.6vw;
}
.fillpassword4 {
top: 60px;
left: 0vw;
}
.fillpassword5 {
top: 60px;
left: 33.3vw;
}
.fillpassword6 {
top: 60px;
left: 66.6vw;
}
.fillpassword7 {
top: 90px;
left: 0vw;
}
.fillpassword8 {
top: 90px;
left: 33.3vw;
}
.fillpassword9 {
top: 90px;
left: 66.6vw;
}
.fillpassword10 {
top: 120px;
left: 0vw;
}
.fillpassword11 {
top: 120px;
left: 33.3vw;
}
.fillpassword12 {
top: 120px;
left: 66.6vw;
}
.modal {
width: 100vw;
height: 100vh;
background: #292929;
color: white;
position: fixed;
z-index: 0;
top: -100vh;
left: 0px;
transition: 0.5s;
}
.modal:target {
width: 100vw;
height: 100vh;
background: white;
color: black;
position: fixed;
z-index: 3;
top: 0vh;
}
#bg_popup {
position: fixed;
z-index: 99999;
background: rgba(0, 0, 0, 0.8);
top: 0;
right: 0;
bottom: 0;
left: 0;
display: none;
}
#popup {
background: white;
width: 100vw;
height: 100vh;
position: fixed;
top: 0px;
left: 0px;
z-index: 3;
}
</style>
</head>
<body>
<!--Форма создания первого пароля-->
<div id="bg_popup">
<div id="popup">
<h1>Добро пожаловать!</h1>
<p>Давайте защитим проект, создав пароль</p>
<font color="red">Убедительная просьба использовать ТОЛЬКО ЦИФРЫ для создания пароля.</font>
<br><input id="changepassword" placeholder="Ваш пароль">
<button type="button" onclick="setPassword()">Сохранить пароль</button>
<br><span>Будьте внимательны при создании пароля. Если вы здесь ввели не тот пароль который хотели, просто удалите содержимое поля ввода, введите нужную комбинацию ЦИФР и только после этого нажмите кнопку "Начать пользование"</span>
<br><a id="setCookie" class="close" href="#" title="Закрыть" onclick="document.getElementById('bg_popup').style.display='none'; return false;">X</a>
</div>
</div>
<!--код экрана блокировки-->
<input type="checkbox" id="cpasswordform">
<div id="time"></div>
<div class="passwordform">
<form>
<input type="password" id="password" disabled>
<br/>
<button type="button" onclick="addTextToInput(this)" class="fillpassword1">1</button>
<button type="button" onclick="addTextToInput(this)" class="fillpassword2">2</button>
<button type="button" onclick="addTextToInput(this)" class="fillpassword3">3</button>
<br>
<button type="button" onclick="addTextToInput(this)" class="fillpassword4">4</button>
<button type="button" onclick="addTextToInput(this)" class="fillpassword5">5</button>
<button type="button" onclick="addTextToInput(this)" class="fillpassword6">6</button>
<br>
<button type="button" onclick="addTextToInput(this)" class="fillpassword7">7</button>
<button type="button" onclick="addTextToInput(this)" class="fillpassword8">8</button>
<button type="button" onclick="addTextToInput(this)" class="fillpassword9">9</button>
<br>
<input type="reset" value="x" class="fillpassword10">
<button type="button" onclick="addTextToInput(this)" class="fillpassword11">0</button>
</form>
</div>
<label for="cpasswordform">
<div class="lock">
<div class="bodylock"></div>
<div class="handlelock"></div>
<div class="circlechink"></div>
<div class="rectanglechink"></div>
</div>
</label>
<div class="unlocktext">Нажмите на замок, затем введите пароль</div>
<!--Модальное окно, в которое автоматически должен переходить пользователь после успешного ввода пароля-->
<div id="menu" class="modal">
<div>
Контент
</div>
</div>
<script>
if('password' in localStorage) {
document.forms.test.hidden = false;
}
else {
location.href='#menu'
}
</script>
</body>
</html> |