ViannyCruz commited on
Commit
9548ccd
·
verified ·
1 Parent(s): dddaebc

Update web/diagnosis.html

Browse files
Files changed (1) hide show
  1. web/diagnosis.html +42 -0
web/diagnosis.html CHANGED
@@ -199,6 +199,11 @@
199
  </button>
200
 
201
  <ul class="nav">
 
 
 
 
 
202
  <li class="nav-item dropdown">
203
  <a class="nav-link dropdown-toggle text-muted pr-0" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
204
  <span class="avatar avatar-sm mt-2">
@@ -1420,5 +1425,42 @@ if (false) { /* removed */ }
1420
  _fObserver.observe(document.body, { childList: true, subtree: true });
1421
  });
1422
  </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1423
  </body>
1424
  </html>
 
199
  </button>
200
 
201
  <ul class="nav">
202
+ <li class="nav-item">
203
+ <a class="nav-link text-muted my-2" href="#" id="modeSwitcher" data-mode="light">
204
+ <i data-feather="sun"></i>
205
+ </a>
206
+ </li>
207
  <li class="nav-item dropdown">
208
  <a class="nav-link dropdown-toggle text-muted pr-0" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
209
  <span class="avatar avatar-sm mt-2">
 
1425
  _fObserver.observe(document.body, { childList: true, subtree: true });
1426
  });
1427
  </script>
1428
+ <script>
1429
+ (function () {
1430
+ const overlay = document.createElement('div');
1431
+ overlay.id = 'theme-overlay';
1432
+ overlay.style.cssText = [
1433
+ 'position:fixed','inset:0','z-index:99999',
1434
+ 'pointer-events:none','opacity:0',
1435
+ 'transition:opacity 0.18s ease','background:#fff'
1436
+ ].join(';');
1437
+ document.body.appendChild(overlay);
1438
+
1439
+ function switchTheme() {
1440
+ const lightTheme = document.getElementById('lightTheme');
1441
+ const darkTheme = document.getElementById('darkTheme');
1442
+ const goingDark = !darkTheme.disabled;
1443
+ overlay.style.background = goingDark ? '#fff' : '#1a1a2e';
1444
+ overlay.style.opacity = '1';
1445
+ setTimeout(function () {
1446
+ lightTheme.disabled = !lightTheme.disabled;
1447
+ darkTheme.disabled = !darkTheme.disabled;
1448
+ setTimeout(function () { overlay.style.opacity = '0'; }, 50);
1449
+ }, 180);
1450
+ }
1451
+
1452
+ document.addEventListener('DOMContentLoaded', function () {
1453
+ const btn = document.getElementById('modeSwitcher');
1454
+ if (!btn) return;
1455
+ const newBtn = btn.cloneNode(true);
1456
+ btn.parentNode.replaceChild(newBtn, btn);
1457
+ newBtn.addEventListener('click', function (e) {
1458
+ e.preventDefault();
1459
+ e.stopPropagation();
1460
+ switchTheme();
1461
+ });
1462
+ });
1463
+ })();
1464
+ </script>
1465
  </body>
1466
  </html>