-
Notifications
You must be signed in to change notification settings - Fork 244
Expand file tree
/
Copy pathlock.html
More file actions
231 lines (211 loc) · 8.46 KB
/
lock.html
File metadata and controls
231 lines (211 loc) · 8.46 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Lock Screen - Kiaalap</title>
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="node_modules/bootstrap-icons/font/bootstrap-icons.css">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.auth-container {
width: 100%;
max-width: 420px;
padding: 20px;
}
.auth-card {
background: white;
border-radius: 12px;
padding: 40px;
box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}
.lock-header {
text-align: center;
margin-bottom: 30px;
}
.user-avatar-large {
width: 100px;
height: 100px;
border-radius: 50%;
margin: 0 auto 20px;
display: block;
border: 4px solid #f3f4f6;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.lock-icon {
position: absolute;
bottom: -5px;
right: 50%;
transform: translateX(50%);
background: #ef4444;
color: white;
width: 32px;
height: 32px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
border: 3px solid white;
}
</style>
</head>
<body>
<div class="auth-container">
<div class="auth-card">
<div class="lock-header">
<div class="position-relative d-inline-block">
<img src="https://ui-avatars.com/api/?name=John+Doe&background=6366f1&color=fff&size=100"
alt="User Avatar"
class="user-avatar-large"
loading="lazy">
<div class="lock-icon">
<i class="bi bi-lock-fill"></i>
</div>
</div>
<h1 class="h4 mb-2 fw-bold mt-3">John Doe</h1>
<p class="text-muted mb-1">john.doe@kiaalap.edu</p>
<div class="text-center my-3">
<div class="badge bg-secondary">
<i class="bi bi-clock me-1"></i>
<span id="currentTime">3:43:15 PM</span>
</div>
<div class="text-muted small mt-2">
<span id="currentDate">Friday, February 27, 2025</span>
</div>
</div>
<p class="text-muted small">
Your session is locked. Enter your password to continue.
</p>
</div>
<form id="unlockForm" novalidate>
<div class="mb-3">
<label for="password" class="form-label visually-hidden">Password</label>
<div class="input-group">
<span class="input-group-text">
<i class="bi bi-key"></i>
</span>
<input type="password"
class="form-control"
id="password"
name="password"
placeholder="Enter your password"
required
autofocus
aria-label="Password"
aria-describedby="passwordHelp">
<button class="btn btn-outline-secondary"
type="button"
id="togglePassword"
aria-label="Toggle password visibility">
<i class="bi bi-eye"></i>
</button>
</div>
<div class="invalid-feedback">
Password is required to unlock.
</div>
<small id="passwordHelp" class="form-text text-muted">
Enter your password to unlock the screen
</small>
</div>
<div class="d-grid gap-2">
<button class="btn btn-primary btn-lg" type="submit">
<i class="bi bi-unlock me-2"></i>
Unlock Screen
</button>
</div>
<hr class="my-4">
<div class="text-center">
<p class="mb-2">
<a href="#" class="text-decoration-none">
<i class="bi bi-person-switch me-1"></i>
Switch User
</a>
</p>
<p>
<a href="login.html" class="text-decoration-none text-danger">
<i class="bi bi-box-arrow-right me-1"></i>
Sign Out Completely
</a>
</p>
</div>
</form>
</div>
<div class="text-center mt-4">
<p class="text-white-50 small">
© 2025 Kiaalap. All rights reserved.
<a href="#" class="text-white-50">Privacy</a> ·
<a href="#" class="text-white-50">Terms</a>
</p>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Update time and date
function updateDateTime() {
const now = new Date();
// Format time
const timeOptions = {
hour: 'numeric',
minute: '2-digit',
second: '2-digit',
hour12: true
};
const timeString = now.toLocaleTimeString('en-US', timeOptions);
// Format date
const dateOptions = {
weekday: 'long',
year: 'numeric',
month: 'long',
day: 'numeric'
};
const dateString = now.toLocaleDateString('en-US', dateOptions);
// Update elements
const timeElement = document.getElementById('currentTime');
const dateElement = document.getElementById('currentDate');
if (timeElement) timeElement.textContent = timeString;
if (dateElement) dateElement.textContent = dateString;
}
// Update immediately and then every second
updateDateTime();
setInterval(updateDateTime, 1000);
// Toggle password visibility
const togglePassword = document.getElementById('togglePassword');
const password = document.getElementById('password');
if (togglePassword) {
togglePassword.addEventListener('click', function() {
const type = password.getAttribute('type') === 'password' ? 'text' : 'password';
password.setAttribute('type', type);
this.querySelector('i').classList.toggle('bi-eye');
this.querySelector('i').classList.toggle('bi-eye-slash');
});
}
// Form validation
const form = document.getElementById('unlockForm');
if (form) {
form.addEventListener('submit', function(event) {
event.preventDefault();
event.stopPropagation();
if (form.checkValidity()) {
// Form is valid - would verify password and unlock here
console.log('Unlocking screen...');
// window.location.href = 'index.html';
}
form.classList.add('was-validated');
});
}
// Auto-focus password field
if (password) {
password.focus();
}
});
</script>
</body>
</html>