itsluckysharma01 commited on
Commit
d9f53a4
Β·
1 Parent(s): 711823e

make website responsive

Browse files
webapp/static/css/style.css CHANGED
@@ -204,6 +204,7 @@ h4,
204
  align-items: center;
205
  justify-content: space-between;
206
  gap: 1rem;
 
207
  }
208
 
209
  .nav-brand {
@@ -213,6 +214,7 @@ h4,
213
  gap: 0.65rem;
214
  font-weight: 700;
215
  font-size: 1.2rem;
 
216
  }
217
 
218
  .brand-icon,
@@ -232,6 +234,36 @@ h4,
232
  flex-wrap: wrap;
233
  }
234
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
235
  .nav-link {
236
  color: rgba(255, 255, 255, 0.92);
237
  text-decoration: none;
@@ -1427,14 +1459,108 @@ h4,
1427
  color: var(--danger);
1428
  }
1429
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1430
  /* Responsive Design */
1431
  @media (max-width: 960px) {
 
 
 
 
1432
  .nav-menu {
1433
- gap: 0.4rem;
 
 
 
 
 
 
 
 
 
 
 
 
1434
  }
1435
 
1436
- .user-greeting {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1437
  display: none;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1438
  }
1439
 
1440
  .nav-container {
@@ -1447,7 +1573,8 @@ h4,
1447
  }
1448
 
1449
  .dashboard-grid,
1450
- .live-camera-layout {
 
1451
  grid-template-columns: 1fr;
1452
  }
1453
 
@@ -1477,16 +1604,6 @@ h4,
1477
  }
1478
 
1479
  @media (max-width: 640px) {
1480
- .nav-menu {
1481
- gap: 0.3rem;
1482
- }
1483
-
1484
- .nav-link,
1485
- .dropdown-btn {
1486
- padding: 0.45rem 0.6rem;
1487
- font-size: 0.9rem;
1488
- }
1489
-
1490
  .container,
1491
  .nav-container,
1492
  .dashboard-container,
@@ -1523,6 +1640,7 @@ h4,
1523
  .btn {
1524
  padding: 0.64rem 1rem;
1525
  font-size: 0.95rem;
 
1526
  }
1527
 
1528
  .btn-large {
@@ -1535,7 +1653,8 @@ h4,
1535
 
1536
  .stats-grid,
1537
  .features-grid,
1538
- .tech-grid {
 
1539
  grid-template-columns: 1fr;
1540
  }
1541
 
@@ -1550,6 +1669,7 @@ h4,
1550
 
1551
  .dashboard-grid {
1552
  gap: 0.8rem;
 
1553
  }
1554
 
1555
  .dashboard-card {
@@ -1573,12 +1693,29 @@ h4,
1573
  }
1574
 
1575
  #toast-container {
1576
- left: 20px;
1577
- right: 20px;
 
1578
  }
1579
 
1580
  .toast {
1581
  min-width: unset;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1582
  }
1583
  }
1584
 
@@ -1628,6 +1765,92 @@ h4,
1628
  .results-summary {
1629
  grid-template-columns: 1fr;
1630
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1631
  }
1632
 
1633
  /* Landscape orientation adjustments */
 
204
  align-items: center;
205
  justify-content: space-between;
206
  gap: 1rem;
207
+ padding: 0 1rem;
208
  }
209
 
210
  .nav-brand {
 
214
  gap: 0.65rem;
215
  font-weight: 700;
216
  font-size: 1.2rem;
217
+ flex-shrink: 0;
218
  }
219
 
220
  .brand-icon,
 
234
  flex-wrap: wrap;
235
  }
236
 
237
+ .hamburger-menu {
238
+ display: none;
239
+ flex-direction: column;
240
+ gap: 5px;
241
+ cursor: pointer;
242
+ background: transparent;
243
+ border: none;
244
+ padding: 8px;
245
+ }
246
+
247
+ .hamburger-menu span {
248
+ width: 25px;
249
+ height: 3px;
250
+ background: var(--white);
251
+ border-radius: 2px;
252
+ transition: all 0.3s ease;
253
+ }
254
+
255
+ .hamburger-menu.active span:nth-child(1) {
256
+ transform: rotate(45deg) translate(10px, 10px);
257
+ }
258
+
259
+ .hamburger-menu.active span:nth-child(2) {
260
+ opacity: 0;
261
+ }
262
+
263
+ .hamburger-menu.active span:nth-child(3) {
264
+ transform: rotate(-45deg) translate(7px, -7px);
265
+ }
266
+
267
  .nav-link {
268
  color: rgba(255, 255, 255, 0.92);
269
  text-decoration: none;
 
1459
  color: var(--danger);
1460
  }
1461
 
1462
+ /* Tablet optimizations */
1463
+ @media (max-width: 768px) {
1464
+ .dashboard-grid {
1465
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
1466
+ }
1467
+
1468
+ .info-section {
1469
+ grid-template-columns: repeat(2, 1fr);
1470
+ }
1471
+
1472
+ .stats-grid {
1473
+ grid-template-columns: repeat(2, 1fr);
1474
+ }
1475
+
1476
+ .workflow-steps {
1477
+ grid-template-columns: repeat(2, 1fr);
1478
+ }
1479
+
1480
+ .footer-content {
1481
+ grid-template-columns: repeat(2, 1fr);
1482
+ }
1483
+
1484
+ .auth-box {
1485
+ width: min(90vw, 400px);
1486
+ }
1487
+
1488
+ .btn {
1489
+ min-height: 40px;
1490
+ padding: 0.6rem 0.9rem;
1491
+ }
1492
+ }
1493
+
1494
  /* Responsive Design */
1495
  @media (max-width: 960px) {
1496
+ .hamburger-menu {
1497
+ display: flex;
1498
+ }
1499
+
1500
  .nav-menu {
1501
+ position: fixed;
1502
+ top: 74px;
1503
+ left: -100%;
1504
+ width: 100%;
1505
+ height: calc(100vh - 74px);
1506
+ background: linear-gradient(130deg, rgba(8, 42, 99, 0.98), rgba(15, 85, 199, 0.95));
1507
+ backdrop-filter: blur(8px);
1508
+ flex-direction: column;
1509
+ justify-content: flex-start;
1510
+ gap: 0;
1511
+ padding: 1rem 0;
1512
+ transition: left 0.3s ease;
1513
+ z-index: 99;
1514
  }
1515
 
1516
+ .nav-menu.active {
1517
+ left: 0;
1518
+ }
1519
+
1520
+ .nav-link, .dropdown-btn {
1521
+ width: 100%;
1522
+ padding: 0.75rem 1rem;
1523
+ border-radius: 0;
1524
+ justify-content: flex-start;
1525
+ }
1526
+
1527
+ .dropdown-content {
1528
+ position: static;
1529
+ background: rgba(255, 255, 255, 0.1);
1530
+ border: none;
1531
+ box-shadow: none;
1532
+ padding: 0;
1533
  display: none;
1534
+ width: 100%;
1535
+ }
1536
+
1537
+ .dropdown:hover .dropdown-content {
1538
+ display: none;
1539
+ }
1540
+
1541
+ .dropdown.active .dropdown-content {
1542
+ display: block;
1543
+ }
1544
+
1545
+ .dropdown-content a {
1546
+ padding: 0.6rem 1rem;
1547
+ padding-left: 2rem;
1548
+ color: rgba(255, 255, 255, 0.9);
1549
+ }
1550
+
1551
+ .dropdown-content a:hover {
1552
+ background: rgba(255, 255, 255, 0.15);
1553
+ }
1554
+
1555
+ .user-greeting {
1556
+ width: 100%;
1557
+ padding: 0.75rem 1rem;
1558
+ display: block;
1559
+ color: rgba(255, 255, 255, 0.9);
1560
+ }
1561
+
1562
+ .nav-menu {
1563
+ gap: 0.4rem;
1564
  }
1565
 
1566
  .nav-container {
 
1573
  }
1574
 
1575
  .dashboard-grid,
1576
+ .live-camera-layout,
1577
+ .info-section {
1578
  grid-template-columns: 1fr;
1579
  }
1580
 
 
1604
  }
1605
 
1606
  @media (max-width: 640px) {
 
 
 
 
 
 
 
 
 
 
1607
  .container,
1608
  .nav-container,
1609
  .dashboard-container,
 
1640
  .btn {
1641
  padding: 0.64rem 1rem;
1642
  font-size: 0.95rem;
1643
+ min-height: 44px;
1644
  }
1645
 
1646
  .btn-large {
 
1653
 
1654
  .stats-grid,
1655
  .features-grid,
1656
+ .tech-grid,
1657
+ .info-section {
1658
  grid-template-columns: 1fr;
1659
  }
1660
 
 
1669
 
1670
  .dashboard-grid {
1671
  gap: 0.8rem;
1672
+ grid-template-columns: 1fr;
1673
  }
1674
 
1675
  .dashboard-card {
 
1693
  }
1694
 
1695
  #toast-container {
1696
+ left: 1rem;
1697
+ right: 1rem;
1698
+ top: 80px;
1699
  }
1700
 
1701
  .toast {
1702
  min-width: unset;
1703
+ width: 100%;
1704
+ }
1705
+
1706
+ .auth-box {
1707
+ padding: 1.5rem;
1708
+ margin: 1rem;
1709
+ }
1710
+
1711
+ .file-info {
1712
+ flex-direction: column;
1713
+ align-items: flex-start;
1714
+ }
1715
+
1716
+ .upload-section,
1717
+ .results-section {
1718
+ padding: 1rem;
1719
  }
1720
  }
1721
 
 
1765
  .results-summary {
1766
  grid-template-columns: 1fr;
1767
  }
1768
+
1769
+ /* Improve form inputs on mobile */
1770
+ .form-group input,
1771
+ .form-group select,
1772
+ .form-group textarea {
1773
+ font-size: 16px; /* Prevents auto-zoom on iOS */
1774
+ min-height: 44px; /* Better touch target */
1775
+ }
1776
+
1777
+ .btn {
1778
+ min-height: 44px;
1779
+ }
1780
+
1781
+ /* Better spacing for small screens */
1782
+ .auth-box {
1783
+ padding: 1.2rem;
1784
+ }
1785
+
1786
+ .dashboard-card {
1787
+ padding: 0.8rem;
1788
+ }
1789
+
1790
+ .info-card {
1791
+ padding: 1rem;
1792
+ }
1793
+
1794
+ /* Video container improvements */
1795
+ #video-container {
1796
+ min-height: 250px;
1797
+ }
1798
+
1799
+ .live-camera-layout {
1800
+ gap: 0.8rem;
1801
+ }
1802
+
1803
+ /* Modal improvements */
1804
+ .modal-content {
1805
+ border-radius: 16px;
1806
+ width: 90vw;
1807
+ }
1808
+
1809
+ .modal-body {
1810
+ padding: 1rem;
1811
+ }
1812
+
1813
+ .modal-footer {
1814
+ padding: 1rem;
1815
+ flex-direction: column;
1816
+ gap: 0.6rem;
1817
+ }
1818
+
1819
+ .modal-footer .btn {
1820
+ width: 100%;
1821
+ }
1822
+
1823
+ /* Dropdown menu improvements */
1824
+ .dropdown-content {
1825
+ position: fixed !important;
1826
+ left: 0 !important;
1827
+ right: 0 !important;
1828
+ top: auto !important;
1829
+ bottom: 0 !important;
1830
+ border-radius: 16px 16px 0 0 !important;
1831
+ max-height: 60vh;
1832
+ overflow-y: auto;
1833
+ padding: 1rem 0 !important;
1834
+ }
1835
+
1836
+ .dropdown-content a {
1837
+ padding: 1rem !important;
1838
+ }
1839
+
1840
+ /* Grid improvements */
1841
+ .framewise-list,
1842
+ .stats-grid {
1843
+ grid-template-columns: 1fr;
1844
+ }
1845
+
1846
+ /* Toast positioning */
1847
+ #toast-container {
1848
+ top: 74px;
1849
+ }
1850
+
1851
+ .toast {
1852
+ margin: 0.5rem;
1853
+ }
1854
  }
1855
 
1856
  /* Landscape orientation adjustments */
webapp/templates/dashboard.html CHANGED
@@ -27,10 +27,15 @@
27
  <span class="brand-icon">πŸ‘οΈ</span>
28
  <span>NETRA</span>
29
  </div>
30
- <div class="nav-menu">
 
 
 
 
 
31
  <a href="{{ url_for('dashboard') }}" class="nav-link" style="opacity: 0.7;">Dashboard</a>
32
- <div class="dropdown">
33
- <button class="nav-link dropdown-btn">πŸ“Š Analysis β–Ό</button>
34
  <div class="dropdown-content">
35
  <a href="{{ url_for('live_camera') }}" onclick="showLoadingToast()">πŸ“Ή Live Camera</a>
36
  <a href="{{ url_for('video_analysis') }}" onclick="showLoadingToast()">πŸ“‹ Video Analysis</a>
@@ -166,6 +171,41 @@
166
  <script src="{{ url_for('static', filename='js/ui-utils.js') }}"></script>
167
 
168
  <script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  // Show loading toast on navigation
170
  function showLoadingToast() {
171
  toast.info('πŸ”„ Loading...', 1500);
 
27
  <span class="brand-icon">πŸ‘οΈ</span>
28
  <span>NETRA</span>
29
  </div>
30
+ <button class="hamburger-menu" id="hamburger-toggle">
31
+ <span></span>
32
+ <span></span>
33
+ <span></span>
34
+ </button>
35
+ <div class="nav-menu" id="nav-menu">
36
  <a href="{{ url_for('dashboard') }}" class="nav-link" style="opacity: 0.7;">Dashboard</a>
37
+ <div class="dropdown" id="analysis-dropdown">
38
+ <button class="nav-link dropdown-btn" onclick="toggleDropdown(event)">πŸ“Š Analysis β–Ό</button>
39
  <div class="dropdown-content">
40
  <a href="{{ url_for('live_camera') }}" onclick="showLoadingToast()">πŸ“Ή Live Camera</a>
41
  <a href="{{ url_for('video_analysis') }}" onclick="showLoadingToast()">πŸ“‹ Video Analysis</a>
 
171
  <script src="{{ url_for('static', filename='js/ui-utils.js') }}"></script>
172
 
173
  <script>
174
+ // Mobile menu toggle
175
+ const hamburger = document.getElementById('hamburger-toggle');
176
+ const navMenu = document.getElementById('nav-menu');
177
+
178
+ if (hamburger) {
179
+ hamburger.addEventListener('click', function(e) {
180
+ e.stopPropagation();
181
+ hamburger.classList.toggle('active');
182
+ navMenu.classList.toggle('active');
183
+ });
184
+ }
185
+
186
+ // Close menu when clicking on a link
187
+ document.querySelectorAll('.nav-link, .nav-menu a').forEach(link => {
188
+ link.addEventListener('click', function() {
189
+ hamburger.classList.remove('active');
190
+ navMenu.classList.remove('active');
191
+ });
192
+ });
193
+
194
+ // Close menu when clicking outside
195
+ document.addEventListener('click', function(e) {
196
+ if (!e.target.closest('.nav-container')) {
197
+ hamburger?.classList.remove('active');
198
+ navMenu?.classList.remove('active');
199
+ }
200
+ });
201
+
202
+ // Dropdown toggle for mobile
203
+ function toggleDropdown(e) {
204
+ e.preventDefault();
205
+ const dropdown = e.target.closest('.dropdown');
206
+ dropdown.classList.toggle('active');
207
+ }
208
+
209
  // Show loading toast on navigation
210
  function showLoadingToast() {
211
  toast.info('πŸ”„ Loading...', 1500);
webapp/templates/live_camera.html CHANGED
@@ -249,10 +249,15 @@
249
  <span class="brand-icon">πŸ‘οΈ</span>
250
  <span>NETRA</span>
251
  </div>
252
- <div class="nav-menu">
 
 
 
 
 
253
  <a href="{{ url_for('dashboard') }}" class="nav-link">Dashboard</a>
254
- <div class="dropdown">
255
- <button class="nav-link dropdown-btn">πŸ“Š Analysis β–Ό</button>
256
  <div class="dropdown-content">
257
  <a href="{{ url_for('live_camera') }}" style="opacity: 0.6;">πŸ“Ή Live Camera</a>
258
  <a href="{{ url_for('video_analysis') }}">πŸ“‹ Video Analysis</a>
@@ -477,5 +482,42 @@
477
  <!-- Load UI Utilities and Live Camera Script -->
478
  <script src="{{ url_for('static', filename='js/ui-utils.js') }}"></script>
479
  <script src="{{ url_for('static', filename='js/live_camera.js') }}"></script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
480
  </body>
481
  </html>
 
249
  <span class="brand-icon">πŸ‘οΈ</span>
250
  <span>NETRA</span>
251
  </div>
252
+ <button class="hamburger-menu" id="hamburger-toggle">
253
+ <span></span>
254
+ <span></span>
255
+ <span></span>
256
+ </button>
257
+ <div class="nav-menu" id="nav-menu">
258
  <a href="{{ url_for('dashboard') }}" class="nav-link">Dashboard</a>
259
+ <div class="dropdown" id="analysis-dropdown">
260
+ <button class="nav-link dropdown-btn" onclick="toggleDropdown(event)">πŸ“Š Analysis β–Ό</button>
261
  <div class="dropdown-content">
262
  <a href="{{ url_for('live_camera') }}" style="opacity: 0.6;">πŸ“Ή Live Camera</a>
263
  <a href="{{ url_for('video_analysis') }}">πŸ“‹ Video Analysis</a>
 
482
  <!-- Load UI Utilities and Live Camera Script -->
483
  <script src="{{ url_for('static', filename='js/ui-utils.js') }}"></script>
484
  <script src="{{ url_for('static', filename='js/live_camera.js') }}"></script>
485
+
486
+ <script>
487
+ // Mobile menu toggle
488
+ const hamburger = document.getElementById('hamburger-toggle');
489
+ const navMenu = document.getElementById('nav-menu');
490
+
491
+ if (hamburger) {
492
+ hamburger.addEventListener('click', function(e) {
493
+ e.stopPropagation();
494
+ hamburger.classList.toggle('active');
495
+ navMenu.classList.toggle('active');
496
+ });
497
+ }
498
+
499
+ // Close menu when clicking on a link
500
+ document.querySelectorAll('.nav-link, .nav-menu a').forEach(link => {
501
+ link.addEventListener('click', function() {
502
+ hamburger?.classList.remove('active');
503
+ navMenu?.classList.remove('active');
504
+ });
505
+ });
506
+
507
+ // Close menu when clicking outside
508
+ document.addEventListener('click', function(e) {
509
+ if (!e.target.closest('.nav-container')) {
510
+ hamburger?.classList.remove('active');
511
+ navMenu?.classList.remove('active');
512
+ }
513
+ });
514
+
515
+ // Dropdown toggle for mobile
516
+ function toggleDropdown(e) {
517
+ e.preventDefault();
518
+ const dropdown = e.target.closest('.dropdown');
519
+ dropdown.classList.toggle('active');
520
+ }
521
+ </script>
522
  </body>
523
  </html>
webapp/templates/video_analysis.html CHANGED
@@ -318,10 +318,15 @@
318
  <span class="brand-icon">πŸ‘οΈ</span>
319
  <span>NETRA</span>
320
  </div>
321
- <div class="nav-menu">
 
 
 
 
 
322
  <a href="{{ url_for('dashboard') }}" class="nav-link">Dashboard</a>
323
- <div class="dropdown">
324
- <button class="nav-link dropdown-btn">πŸ“Š Analysis β–Ό</button>
325
  <div class="dropdown-content">
326
  <a href="{{ url_for('live_camera') }}">πŸ“Ή Live Camera</a>
327
  <a href="{{ url_for('video_analysis') }}" style="opacity:0.6;">πŸ“‹ Video Analysis</a>
@@ -496,5 +501,42 @@
496
 
497
  <script src="{{ url_for('static', filename='js/ui-utils.js') }}"></script>
498
  <script src="{{ url_for('static', filename='js/video_analysis.js') }}"></script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
499
  </body>
500
  </html>
 
318
  <span class="brand-icon">πŸ‘οΈ</span>
319
  <span>NETRA</span>
320
  </div>
321
+ <button class="hamburger-menu" id="hamburger-toggle">
322
+ <span></span>
323
+ <span></span>
324
+ <span></span>
325
+ </button>
326
+ <div class="nav-menu" id="nav-menu">
327
  <a href="{{ url_for('dashboard') }}" class="nav-link">Dashboard</a>
328
+ <div class="dropdown" id="analysis-dropdown">
329
+ <button class="nav-link dropdown-btn" onclick="toggleDropdown(event)">πŸ“Š Analysis β–Ό</button>
330
  <div class="dropdown-content">
331
  <a href="{{ url_for('live_camera') }}">πŸ“Ή Live Camera</a>
332
  <a href="{{ url_for('video_analysis') }}" style="opacity:0.6;">πŸ“‹ Video Analysis</a>
 
501
 
502
  <script src="{{ url_for('static', filename='js/ui-utils.js') }}"></script>
503
  <script src="{{ url_for('static', filename='js/video_analysis.js') }}"></script>
504
+
505
+ <script>
506
+ // Mobile menu toggle
507
+ const hamburger = document.getElementById('hamburger-toggle');
508
+ const navMenu = document.getElementById('nav-menu');
509
+
510
+ if (hamburger) {
511
+ hamburger.addEventListener('click', function(e) {
512
+ e.stopPropagation();
513
+ hamburger.classList.toggle('active');
514
+ navMenu.classList.toggle('active');
515
+ });
516
+ }
517
+
518
+ // Close menu when clicking on a link
519
+ document.querySelectorAll('.nav-link, .nav-menu a').forEach(link => {
520
+ link.addEventListener('click', function() {
521
+ hamburger?.classList.remove('active');
522
+ navMenu?.classList.remove('active');
523
+ });
524
+ });
525
+
526
+ // Close menu when clicking outside
527
+ document.addEventListener('click', function(e) {
528
+ if (!e.target.closest('.nav-container')) {
529
+ hamburger?.classList.remove('active');
530
+ navMenu?.classList.remove('active');
531
+ }
532
+ });
533
+
534
+ // Dropdown toggle for mobile
535
+ function toggleDropdown(e) {
536
+ e.preventDefault();
537
+ const dropdown = e.target.closest('.dropdown');
538
+ dropdown.classList.toggle('active');
539
+ }
540
+ </script>
541
  </body>
542
  </html>