-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.html
296 lines (290 loc) · 10.4 KB
/
home.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Welcome to Your Dashboard</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
:root {
--primary-color: #003366;
--secondary-color: #ffffff;
--accent-color: #4DC9E6;
--gradient-start: #E6F3FF;
--gradient-end: #B3D9FF;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
color: var(--primary-color);
background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
overflow-x: hidden;
font-size: 16px;
}
.wave {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23e6f2ff' fill-opacity='0.8' d='M0,160L48,181.3C96,203,192,245,288,250.7C384,256,480,224,576,213.3C672,203,768,213,864,224C960,235,1056,245,1152,234.7C1248,224,1344,192,1392,176L1440,160L1440,0L1392,0C1344,0,1248,0,1152,0C1056,0,960,0,864,0C768,0,672,0,576,0C480,0,384,0,288,0C192,0,96,0,48,0L0,0Z'%3E%3C/path%3E%3C/svg%3E") no-repeat;
background-size: cover;
z-index: -1;
animation: wave 20s linear infinite alternate;
}
@keyframes wave {
0% { background-position: 0% 50%; }
100% { background-position: 100% 50%; }
}
header {
background-color: var(--primary-color);
padding: 1rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
position: sticky;
top: 0;
z-index: 1000;
}
.logo img {
max-height: 50px;
transition: transform 0.3s ease;
}
.logo img:hover {
transform: scale(1.05);
}
.user-actions {
display: flex;
align-items: center;
color: var(--secondary-color);
}
.user-actions i {
font-size: 1.5rem;
margin-right: 1rem;
transition: transform 0.3s ease;
}
.user-actions i:hover {
transform: scale(1.1);
}
.logout-btn {
background-color: var(--accent-color);
color: var(--primary-color);
border: none;
padding: 0.5rem 1rem;
border-radius: 20px;
font-size: 1rem;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease;
margin-left: 1rem;
}
.logout-btn:hover {
background-color: #3BA9C6;
transform: translateY(-2px);
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
main {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 3rem 2rem;
min-height: calc(100vh - 80px);
}
.welcome-message {
text-align: center;
margin-bottom: 2rem;
animation: fadeIn 1s ease-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(-20px); }
to { opacity: 1; transform: translateY(0); }
}
.welcome-message h1 {
font-size: 2.5rem;
margin-bottom: 0.5rem;
color: var(--primary-color);
}
.welcome-message p {
font-size: 1.2rem;
color: #555;
}
.features-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 2rem;
max-width: 1200px;
width: 100%;
}
.feature-card {
background-color: rgba(255, 255, 255, 0.9);
border-radius: 15px;
padding: 2rem;
text-align: center;
transition: all 0.3s ease;
cursor: pointer;
box-shadow: 0 10px 30px rgba(0, 51, 102, 0.1);
border: 2px solid transparent;
display: flex;
flex-direction: column;
height: 100%;
animation: cardAppear 0.5s ease-out;
animation-fill-mode: both;
}
@keyframes cardAppear {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.feature-card:hover {
transform: translateY(-10px) scale(1.03);
box-shadow: 0 20px 40px rgba(0, 51, 102, 0.2);
border-color: var(--accent-color);
background-color: rgba(255, 255, 255, 1);
}
.feature-card i {
font-size: 3rem;
color: var(--accent-color);
margin-bottom: 1rem;
transition: all 0.3s ease;
}
.feature-card:hover i {
transform: scale(1.1) rotate(5deg);
}
.feature-card h3 {
color: var(--primary-color);
font-size: 1.4rem;
margin-top: 0;
margin-bottom: 1rem;
}
.feature-card p {
margin-bottom: 1.5rem;
line-height: 1.6;
flex-grow: 1;
color: #555;
font-size: 1rem;
}
.feature-btn {
background-color: var(--primary-color);
color: var(--secondary-color);
border: none;
padding: 0.7rem 1.2rem;
border-radius: 25px;
font-size: 1rem;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease;
align-self: center;
}
.feature-btn:hover {
background-color: var(--accent-color);
transform: translateY(-2px);
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
@media (max-width: 768px) {
header {
flex-direction: column;
text-align: center;
padding: 1rem;
}
.user-actions {
margin-top: 1rem;
}
.features-grid {
grid-template-columns: 1fr;
}
main {
padding: 2rem 1rem;
}
.welcome-message h1 {
font-size: 2rem;
}
.welcome-message p {
font-size: 1rem;
}
}
</style>
</head>
<body>
<div class="wave"></div>
<header>
<div class="logo">
<img src="images/logo.png" alt="Logo">
</div>
<div class="user-actions">
<i class="fas fa-user-circle"></i>
<button class="logout-btn" onclick="logout()">Logout</button>
</div>
</header>
<main>
<div class="features-grid">
<div class="feature-card" onclick="navigateTo('currentLocation.html')">
<i class="fas fa-map-marker-alt"></i>
<h3>Current Location</h3>
<p>View real-time locations of all terminals with instant updates. Stay informed about your assets' whereabouts.</p>
<button class="feature-btn">View Locations</button>
</div>
<div class="feature-card" onclick="navigateTo('HistoricalData.html')">
<i class="fas fa-history"></i>
<h3>Historical Data</h3>
<p>Access comprehensive historical location data for all devices. Track movement patterns and analyze past locations.</p>
<button class="feature-btn">View History</button>
</div>
<div class="feature-card" onclick="navigateTo('mappedHistory.html')">
<i class="fas fa-route"></i>
<h3>Mapped History</h3>
<p>Visualize the movement history of devices on an interactive map. See detailed travel routes and identify frequently visited areas.</p>
<button class="feature-btn">View Mapped History</button>
</div>
<div class="feature-card" onclick="navigateTo('geofencing.html')">
<i class="fas fa-draw-polygon"></i>
<h3>Geofencing (Testing)</h3>
<p>Set up and test advanced geofences to monitor when terminals enter or leave specified areas. Enhance your location-based services.</p>
<button class="feature-btn">Test Geofencing</button>
</div>
<div class="feature-card" onclick="navigateTo('geofencingPage(restricted).html')">
<i class="fas fa-shield-alt"></i>
<h3>Geofencing (Restricted)</h3>
<p>Manage and monitor restricted geofencing areas with enhanced security. Control access and track terminal activities in sensitive zones.</p>
<button class="feature-btn">Manage Restricted Areas</button>
</div>
<div class="feature-card" onclick="navigateTo('CustomRegions.html')">
<i class="fas fa-pencil-alt"></i>
<h3>Define Custom Region</h3>
<p>Create and manage custom regions for precise geofencing. Tailor your geofences to specific needs and requirements.</p>
<button class="feature-btn">Define Regions</button>
</div>
</div>
</main>
<script>
function navigateTo(page) {
window.location.href = page;
}
function logout() {
fetch('/api/logout', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => {
if (data.success) {
window.location.href = '/login.html';
} else {
alert('Logout failed: ' + data.message);
}
})
.catch(error => console.error('Error:', error));
}
// Add animation delay to feature cards
document.querySelectorAll('.feature-card').forEach((card, index) => {
card.style.animationDelay = `${index * 0.1}s`;
});
</script>
</body>
</html>