ViannyCruz commited on
Commit
d33487b
·
verified ·
1 Parent(s): c95779d

Update web/patients.html

Browse files
Files changed (1) hide show
  1. web/patients.html +42 -0
web/patients.html CHANGED
@@ -189,6 +189,11 @@
189
  </button>
190
 
191
  <ul class="nav">
 
 
 
 
 
192
  <li class="nav-item dropdown">
193
  <a class="nav-link dropdown-toggle text-muted pr-0" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
194
  <span class="avatar avatar-sm mt-2">
@@ -1245,5 +1250,42 @@
1245
  _fObserver.observe(document.body, { childList: true, subtree: true });
1246
  });
1247
  </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1248
  </body>
1249
  </html>
 
189
  </button>
190
 
191
  <ul class="nav">
192
+ <li class="nav-item">
193
+ <a class="nav-link text-muted my-2" href="#" id="modeSwitcher" data-mode="light">
194
+ <i data-feather="sun"></i>
195
+ </a>
196
+ </li>
197
  <li class="nav-item dropdown">
198
  <a class="nav-link dropdown-toggle text-muted pr-0" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
199
  <span class="avatar avatar-sm mt-2">
 
1250
  _fObserver.observe(document.body, { childList: true, subtree: true });
1251
  });
1252
  </script>
1253
+ <script>
1254
+ (function () {
1255
+ const overlay = document.createElement('div');
1256
+ overlay.id = 'theme-overlay';
1257
+ overlay.style.cssText = [
1258
+ 'position:fixed','inset:0','z-index:99999',
1259
+ 'pointer-events:none','opacity:0',
1260
+ 'transition:opacity 0.18s ease','background:#fff'
1261
+ ].join(';');
1262
+ document.body.appendChild(overlay);
1263
+
1264
+ function switchTheme() {
1265
+ const lightTheme = document.getElementById('lightTheme');
1266
+ const darkTheme = document.getElementById('darkTheme');
1267
+ const goingDark = !darkTheme.disabled;
1268
+ overlay.style.background = goingDark ? '#fff' : '#1a1a2e';
1269
+ overlay.style.opacity = '1';
1270
+ setTimeout(function () {
1271
+ lightTheme.disabled = !lightTheme.disabled;
1272
+ darkTheme.disabled = !darkTheme.disabled;
1273
+ setTimeout(function () { overlay.style.opacity = '0'; }, 50);
1274
+ }, 180);
1275
+ }
1276
+
1277
+ document.addEventListener('DOMContentLoaded', function () {
1278
+ const btn = document.getElementById('modeSwitcher');
1279
+ if (!btn) return;
1280
+ const newBtn = btn.cloneNode(true);
1281
+ btn.parentNode.replaceChild(newBtn, btn);
1282
+ newBtn.addEventListener('click', function (e) {
1283
+ e.preventDefault();
1284
+ e.stopPropagation();
1285
+ switchTheme();
1286
+ });
1287
+ });
1288
+ })();
1289
+ </script>
1290
  </body>
1291
  </html>