vlcsolutions commited on
Commit
193ec07
·
verified ·
1 Parent(s): 12f7152

Manual changes saved

Browse files
Files changed (1) hide show
  1. index.html +76 -72
index.html CHANGED
@@ -1361,82 +1361,86 @@ alt="Dynamics 365 Logistics Dashboard"
1361
  </div>
1362
  </div>
1363
  </footer>
1364
- <script>
1365
- document.addEventListener('DOMContentLoaded', function() {
1366
- // Initialize AOS
1367
- if (window.AOS) {
1368
- AOS.init({
1369
- duration: 800,
1370
- easing: 'ease-in-out',
1371
- once: true,
1372
- mirror: false,
1373
- offset: 120,
1374
- disable: window.innerWidth < 768
1375
- });
1376
- }
1377
 
1378
- // Replace Feather icons
1379
- if (window.feather) {
1380
- feather.replace();
1381
- }
 
1382
 
1383
- // Mobile menu functionality
1384
- const mobileMenuButton = document.getElementById('mobile-menu-button');
1385
- const mobileMenu = document.getElementById('mobile-menu');
1386
-
1387
- if (mobileMenuButton && mobileMenu) {
1388
- mobileMenuButton.addEventListener('click', function() {
1389
- const isExpanded = mobileMenu.classList.toggle('hidden');
1390
- mobileMenuButton.setAttribute('aria-expanded', !isExpanded);
1391
-
1392
- // Change icon
1393
- const icon = mobileMenuButton.querySelector('i');
1394
- if (isExpanded) {
1395
- icon.setAttribute('data-feather', 'menu');
1396
- } else {
1397
- icon.setAttribute('data-feather', 'x');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1398
  }
1399
- feather.replace();
1400
- });
1401
- }
1402
 
1403
- // Toggle dropdown functionality
1404
- window.toggleMobileDropdown = function(id) {
1405
- const dropdown = document.getElementById(id);
1406
- const isExpanded = dropdown.classList.toggle('hidden');
1407
-
1408
- // Find the button and icon
1409
- const button = dropdown.previousElementSibling;
1410
- const icon = button.querySelector('i');
1411
-
1412
- if (isExpanded) {
1413
- icon.setAttribute('data-feather', 'chevron-down');
1414
- } else {
1415
- icon.setAttribute('data-feather', 'chevron-up');
1416
- }
1417
- feather.replace();
1418
- };
1419
-
1420
- // Close menu when clicking outside
1421
- document.addEventListener('click', function(event) {
1422
- if (!mobileMenu.classList.contains('hidden') &&
1423
- !mobileMenu.contains(event.target) &&
1424
- event.target !== mobileMenuButton &&
1425
- !mobileMenuButton.contains(event.target)) {
1426
- mobileMenu.classList.add('hidden');
1427
- mobileMenuButton.querySelector('i').setAttribute('data-feather', 'menu');
1428
- mobileMenuButton.setAttribute('aria-expanded', 'false');
1429
- feather.replace();
1430
- }
1431
- });
1432
 
1433
- // AOS refresh on resize
1434
- window.addEventListener('resize', function() {
1435
- if (window.AOS && AOS.refreshHard) {
1436
- AOS.refreshHard();
1437
- }
1438
- });
1439
- });
1440
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1441
  </body>
1442
  </html>
 
1361
  </div>
1362
  </div>
1363
  </footer>
1364
+ <script>
1365
+ document.addEventListener('DOMContentLoaded', function() {
1366
+ const mobileBtn = document.getElementById('mobile-menu-button');
1367
+ const mobileMenu = document.getElementById('mobile-menu');
1368
+ const mobileContent = document.getElementById('mobile-menu-content');
 
 
 
 
 
 
 
 
1369
 
1370
+ // --- Mobile menu toggle ---
1371
+ if (mobileBtn && mobileMenu && mobileContent) {
1372
+ mobileBtn.addEventListener('click', function() {
1373
+ const isHidden = mobileMenu.classList.toggle('hidden');
1374
+ const expanded = !isHidden;
1375
 
1376
+ mobileBtn.setAttribute('aria-expanded', String(expanded));
1377
+
1378
+ // Swap icon via innerHTML so feather can re-run, regardless of SVG conversion
1379
+ mobileBtn.innerHTML = expanded
1380
+ ? '<i data-feather="x" class="w-6 h-6"></i>'
1381
+ : '<i data-feather="menu" class="w-6 h-6"></i>';
1382
+
1383
+ if (window.feather) feather.replace();
1384
+
1385
+ // Body scroll lock when menu open
1386
+ document.body.style.overflow = expanded ? 'hidden' : '';
1387
+ });
1388
+
1389
+ // Close menu when any link is clicked
1390
+ mobileContent.querySelectorAll('a').forEach(link => {
1391
+ link.addEventListener('click', () => {
1392
+ if (!mobileMenu.classList.contains('hidden')) {
1393
+ mobileMenu.classList.add('hidden');
1394
+ mobileBtn.setAttribute('aria-expanded', 'false');
1395
+ mobileBtn.innerHTML = '<i data-feather="menu" class="w-6 h-6"></i>';
1396
+ if (window.feather) feather.replace();
1397
+ document.body.style.overflow = '';
1398
+ }
1399
+ });
1400
+ });
1401
+
1402
+ // Reset on resize to desktop
1403
+ window.addEventListener('resize', function() {
1404
+ if (window.innerWidth >= 768) {
1405
+ mobileMenu.classList.add('hidden');
1406
+ mobileBtn.setAttribute('aria-expanded', 'false');
1407
+ mobileBtn.innerHTML = '<i data-feather="menu" class="w-6 h-6"></i>';
1408
+ if (window.feather) feather.replace();
1409
+ document.body.style.overflow = '';
1410
+ }
1411
+ });
1412
  }
 
 
 
1413
 
1414
+ // Toggle dropdowns in mobile menu (global)
1415
+ window.toggleMobileDropdown = function(id) {
1416
+ const dropdown = document.getElementById(id);
1417
+ if (!dropdown) return;
1418
+ const button = dropdown.previousElementSibling;
1419
+ const icon = button.querySelector('i');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1420
 
1421
+ dropdown.classList.toggle('hidden');
1422
+
1423
+ // Swap chevron icon
1424
+ const isOpen = !dropdown.classList.contains('hidden');
1425
+ if (icon) {
1426
+ icon.setAttribute('data-feather', isOpen ? 'chevron-up' : 'chevron-down');
1427
+ if (window.feather) feather.replace();
1428
+ }
1429
+ };
1430
+
1431
+ // AOS
1432
+ if (window.AOS) {
1433
+ AOS.init({
1434
+ duration: 800,
1435
+ easing: 'ease-in-out',
1436
+ once: true,
1437
+ mirror: false
1438
+ });
1439
+ }
1440
+
1441
+ // Initial feather icons
1442
+ if (window.feather) feather.replace();
1443
+ });
1444
+ </script>
1445
  </body>
1446
  </html>