-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSite.Master
More file actions
583 lines (513 loc) · 18.7 KB
/
Site.Master
File metadata and controls
583 lines (513 loc) · 18.7 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
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
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.Master.cs" Inherits="FETS.SiteMaster" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title><%: Page.Title %>INARI - FETS</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- External CSS resources -->
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet" />
<!-- Bootstrap 5 CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" />
<!-- Font Awesome 6 -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" />
<!-- Custom Styles -->
<link href="~/Assets/css/styles.css" rel="stylesheet" type="text/css" />
<!-- jQuery -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<!-- Bootstrap 5 Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
<style>
/* Base page styling */
body {
font-family: 'Poppins', sans-serif;
background-color: #f8f9fa;
margin: 0;
padding: 0;
display: flex;
}
/* Sidebar core layout and positioning */
.sidebar {
width: 250px;
height: 100vh;
background-color: #ffffff;
box-shadow: 2px 0 5px rgba(0,0,0,0.1);
box-sizing: border-box;
position: fixed;
top: 0;
left: 0;
z-index: 1000;
transition: all 0.3s ease;
overflow-y: hidden;
overflow-x: hidden;
display: flex;
flex-direction: column;
justify-content: space-between;
}
/* Sidebar header section styling */
.sidebar-header {
padding: 20px;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #f0f0f0;
}
.sidebar-brand {
font-size: 1rem;
font-weight: 600;
color: #333;
text-align: left;
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* Sidebar toggle button styling */
.sidebar-toggle {
display: flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
background: none;
border: none;
color: #007bff;
font-size: 1.5rem;
cursor: pointer;
padding: 5px;
border-radius: 4px;
transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
outline: none;
position: relative;
z-index: 1001;
}
.sidebar-toggle:hover {
background-color: rgba(0, 123, 255, 0.1);
transform: scale(1.1);
color: #0056b3;
}
.sidebar-toggle:active {
transform: scale(0.95);
background-color: rgba(0, 123, 255, 0.2);
}
.sidebar-toggle i {
transition: transform 0.3s ease, color 0.2s ease;
cursor: pointer;
display: block;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.sidebar-toggle i:hover {
color: #0056b3;
}
.sidebar-collapsed .sidebar-toggle i {
transform: rotate(180deg);
}
/* Navigation menu styling */
.nav-menu {
list-style: none;
padding: 0;
margin: 0;
}
.nav-item {
width: 100%;
margin-bottom: 5px;
}
.nav-link {
display: flex;
align-items: center;
padding: 15px 20px;
color: #555;
text-decoration: none;
transition: all 0.3s ease;
border-left: 3px solid transparent;
overflow: hidden;
}
.nav-link:hover, .nav-link.active {
background-color: rgba(0, 123, 255, 0.1);
color: #007bff;
border-left-color: #007bff;
}
.nav-link i {
margin-right: 10px;
width: 20px;
text-align: center;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
height: 20px;
}
.nav-link span {
line-height: 20px;
display: block;
opacity: 1;
transform: translateX(0);
transition: opacity 0.3s ease, transform 0.3s ease;
white-space: nowrap;
}
/* User information section */
.user-info {
padding: 15px 20px;
border-top: 1px solid #f0f0f0;
color: #555;
font-size: 20px;
text-align: center;
}
/* Logout section styling */
.logout-container {
padding: 15px 10px;
border-top: 1px solid #f0f0f0;
margin-top: auto;
text-align: center;
position: sticky;
bottom: 0;
background-color: #ffffff;
width: 100%;
box-sizing: border-box;
}
.btn-logout {
display: flex;
align-items: center;
justify-content: center;
padding: 12px 10px;
background-color: #ffebee;
border: 1px solid #ffcdd2;
color: #e53935;
transition: all 0.3s ease;
border-radius: 6px;
text-decoration: none;
cursor: pointer;
font-size: 14px;
font-weight: 500;
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
overflow: hidden;
}
.btn-logout i {
margin-right: 10px;
font-size: 16px;
width: 20px;
text-align: center;
flex-shrink: 0;
}
.btn-logout span {
line-height: 20px;
white-space: nowrap;
}
.btn-logout:hover {
background-color: #ffcdd2;
border-color: #ef9a9a;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
/* Main content area */
.main-content {
margin-left: 250px;
padding: 20px;
width: calc(100% - 250px);
transition: all 0.3s ease;
}
/* Collapsed sidebar styling */
.sidebar-collapsed .sidebar {
width: 70px;
}
.sidebar-collapsed .sidebar-brand,
.sidebar-collapsed .nav-link span {
display: none;
}
.sidebar-collapsed .main-content {
margin-left: 70px;
width: calc(100% - 70px);
}
.sidebar-collapsed .user-info {
display: none;
}
.sidebar-collapsed .btn-logout span {
display: none;
}
.sidebar-collapsed .btn-logout {
justify-content: center;
padding: 12px;
}
.sidebar-collapsed .btn-logout i {
margin-right: 0;
}
.sidebar-collapsed .sidebar-brand {
display: none;
}
.sidebar-collapsed .sidebar-header {
justify-content: center;
padding: 20px 0;
}
/* Form controls and button styling */
.form-control {
display: block;
width: 100%;
padding: 0.375rem 0.75rem;
font-size: 1rem;
line-height: 1.5;
color: #495057;
background-color: #fff;
background-clip: padding-box;
border: 1px solid #ced4da;
border-radius: 0.25rem;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.form-control:focus {
color: #495057;
background-color: #fff;
border-color: #80bdff;
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
.btn-primary {
background-color: #007bff;
border-color: #007bff;
color: white;
padding: 8px 16px;
border-radius: 4px;
cursor: pointer;
transition: all 0.3s ease;
}
.btn-primary:hover {
background-color: #0069d9;
border-color: #0062cc;
}
/* Responsive design for mobile devices */
@media (max-width: 768px) {
.sidebar {
width: 70px;
}
.sidebar-brand,
.nav-link span {
display: none;
}
.main-content {
margin-left: 70px;
width: calc(100% - 70px);
}
.user-info {
display: none;
}
.sidebar-expanded .sidebar {
width: 250px;
}
.sidebar-expanded .sidebar-brand,
.sidebar-expanded .nav-link span {
display: inline;
}
.sidebar-expanded .user-info {
display: block;
}
}
/* Active navigation item styling */
.nav-link.active {
background-color: rgba(0, 123, 255, 0.15);
color: #007bff;
border-left-color: #007bff;
font-weight: 500;
}
.nav-link.active i {
color: #007bff;
}
.sidebar-collapsed .nav-link.active {
background-color: rgba(0, 123, 255, 0.15);
border-left-color: #007bff;
}
.sidebar-collapsed .nav-link.active i {
color: #007bff;
}
/* Sidebar transition base styles */
.sidebar-brand,
.nav-link span,
.user-info,
.btn-logout span {
opacity: 1;
transform: translateX(0);
transition: none;
white-space: nowrap;
}
.sidebar {
width: 250px;
transition: none;
}
.sidebar-collapsed .sidebar {
width: 70px;
}
.main-content {
margin-left: 250px;
width: calc(100% - 250px);
transition: none;
}
/* Enable transitions after page load to prevent initial animation */
body:not(.sidebar-initial) .sidebar,
body:not(.sidebar-initial) .main-content,
body:not(.sidebar-initial) .sidebar-brand,
body:not(.sidebar-initial) .nav-link span,
body:not(.sidebar-initial) .user-info,
body:not(.sidebar-initial) .btn-logout span {
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Icon positioning during transitions */
.nav-link i {
margin-right: 10px;
width: 20px;
text-align: center;
transition: margin 0.3s ease;
}
.sidebar-collapsed .nav-link i {
margin-right: 0;
}
.nav-link {
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar {
overflow-x: hidden;
}
/* Collapsed sidebar button styling */
.sidebar-collapsed .btn-logout {
justify-content: center;
padding: 12px;
}
.sidebar-collapsed .btn-logout i {
margin-right: 0;
}
.sidebar-collapsed .btn-logout span {
opacity: 0;
width: 0;
overflow: hidden;
}
</style>
<script type="text/javascript">
/**
* Toggles the sidebar between collapsed and expanded states
* and saves the state to localStorage
*/
function toggleSidebar() {
document.body.classList.toggle('sidebar-collapsed');
// Save sidebar state to localStorage
const isCollapsed = document.body.classList.contains('sidebar-collapsed');
localStorage.setItem('sidebarState', isCollapsed ? 'collapsed' : 'expanded');
// Notify other components about sidebar state change
document.dispatchEvent(new CustomEvent('sidebarToggled', {
detail: { collapsed: isCollapsed }
}));
}
document.addEventListener('DOMContentLoaded', function() {
// Restore sidebar state before any animations occur
const sidebarState = localStorage.getItem('sidebarState');
if (sidebarState === 'collapsed') {
document.body.classList.add('sidebar-collapsed');
}
// Enable transitions after initial render to prevent unwanted animations
requestAnimationFrame(() => {
requestAnimationFrame(() => {
document.body.classList.remove('sidebar-initial');
});
});
// Set up sidebar toggle button event handlers
const toggleButton = document.querySelector('.sidebar-toggle');
if (toggleButton) {
toggleButton.addEventListener('click', function(e) {
e.preventDefault();
e.stopPropagation();
toggleSidebar();
});
const toggleIcon = toggleButton.querySelector('i');
if (toggleIcon) {
toggleIcon.addEventListener('click', function(e) {
e.preventDefault();
e.stopPropagation();
toggleSidebar();
});
}
}
// Auto-expand sidebar when clicked if it's collapsed
const sidebar = document.getElementById('sidebar');
if (sidebar) {
sidebar.addEventListener('click', function(event) {
if (document.body.classList.contains('sidebar-collapsed') &&
!event.target.classList.contains('sidebar-toggle') &&
!event.target.closest('.sidebar-toggle')) {
document.body.classList.remove('sidebar-collapsed');
localStorage.setItem('sidebarState', 'expanded');
event.stopPropagation();
}
});
}
// Auto-collapse sidebar when clicking outside
document.addEventListener('click', function(event) {
if (sidebar &&
!sidebar.contains(event.target) &&
!event.target.classList.contains('sidebar-toggle') &&
!event.target.closest('.sidebar-toggle') &&
!document.body.classList.contains('sidebar-collapsed')) {
document.body.classList.add('sidebar-collapsed');
localStorage.setItem('sidebarState', 'collapsed');
}
});
});
</script>
<asp:ContentPlaceHolder ID="HeadContent" runat="server">
</asp:ContentPlaceHolder>
</head>
<body class="sidebar-initial">
<form runat="server">
<!-- Sidebar Navigation Panel -->
<div class="sidebar" id="sidebar" runat="server" visible="true">
<div class="sidebar-header">
<div class="sidebar-brand"><asp:Label ID="lblUsername" runat="server" EnableViewState="true"></asp:Label></div>
<button type="button" class="sidebar-toggle" onclick="return false;">
<i class="fas fa-bars"></i>
</button>
</div>
<!-- Main Navigation Menu -->
<ul class="nav-menu">
<li class="nav-item">
<asp:LinkButton ID="btnDashboard" runat="server" CssClass="nav-link" OnClick="btnDashboard_Click" EnableViewState="true" CausesValidation="false">
<i class="fas fa-tachometer-alt"></i> <span>Dashboard</span>
</asp:LinkButton>
</li>
<li class="nav-item">
<asp:LinkButton ID="btnDataEntry" runat="server" CssClass="nav-link" OnClick="btnDataEntry_Click" EnableViewState="true" CausesValidation="false">
<i class="fas fa-edit"></i> <span>Data Entry</span>
</asp:LinkButton>
</li>
<li class="nav-item">
<asp:LinkButton ID="btnViewSection" runat="server" CssClass="nav-link" OnClick="btnViewSection_Click" EnableViewState="true" CausesValidation="false">
<i class="fas fa-table"></i> <span>View Section</span>
</asp:LinkButton>
</li>
<li class="nav-item">
<asp:LinkButton ID="btnMapLayout" runat="server" CssClass="nav-link" OnClick="btnMapLayout_Click" EnableViewState="true" CausesValidation="false">
<i class="fas fa-map"></i> <span>Map Layout</span>
</asp:LinkButton>
</li>
<li class="nav-item">
<asp:LinkButton ID="btnProfile" runat="server" CssClass="nav-link" OnClick="btnProfile_Click" EnableViewState="true" CausesValidation="false">
<i class="fas fa-cog"></i> <span>Settings</span>
</asp:LinkButton>
</li>
<li class="nav-item" id="liActivityLogs" runat="server" visible="false">
<asp:LinkButton ID="btnActivityLogs" runat="server" CssClass="nav-link" OnClick="btnActivityLogs_Click" EnableViewState="true" CausesValidation="false">
<i class="fas fa-history"></i> <span>Activity Logs</span>
</asp:LinkButton>
</li>
</ul>
<!-- Logout Section -->
<div class="logout-container">
<asp:LinkButton ID="btnLogout" runat="server" OnClick="btnLogout_Click" CssClass="btn-logout" EnableViewState="true" CausesValidation="false">
<i class="fas fa-sign-out-alt"></i> <span>Logout</span>
</asp:LinkButton>
</div>
</div>
<!-- Main Content Area -->
<div class="main-content">
<asp:ContentPlaceHolder ID="MainContent" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>