ViannyCruz commited on
Commit
ccbd3bf
·
verified ·
1 Parent(s): b7078c7

Update web/diagnosis.html

Browse files
Files changed (1) hide show
  1. web/diagnosis.html +20 -17
web/diagnosis.html CHANGED
@@ -3,16 +3,17 @@
3
  <head>
4
  <meta charset="utf-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
 
 
 
 
 
 
 
6
  <meta name="description" content="">
7
  <meta name="author" content="">
8
 
9
- <script>
10
- (function() {
11
- if (localStorage.getItem('theme') === 'dark') {
12
- document.documentElement.style.visibility = 'hidden';
13
- }
14
- })();
15
- </script>
16
 
17
  <link rel="icon" href="favicon.ico">
18
  <title>Diagnóstico IA</title>
@@ -1463,17 +1464,19 @@ if (false) { /* removed */ }
1463
  <script>
1464
  (function () {
1465
  function applyTheme(theme) {
1466
- const lightTheme = document.getElementById('lightTheme');
1467
- const darkTheme = document.getElementById('darkTheme');
1468
- if (theme === 'dark') {
1469
- lightTheme.disabled = true;
1470
- darkTheme.disabled = false;
1471
- } else {
1472
- lightTheme.disabled = false;
1473
- darkTheme.disabled = true;
1474
- }
1475
- document.documentElement.style.visibility = 'visible';
1476
  }
 
 
1477
 
1478
  applyTheme(localStorage.getItem('theme') || 'light');
1479
 
 
3
  <head>
4
  <meta charset="utf-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
6
+ <script>
7
+ (function() {
8
+ const isDark = localStorage.getItem('theme') === 'dark';
9
+ document.documentElement.setAttribute('data-theme', isDark ? 'dark' : 'light');
10
+ if (isDark) document.documentElement.style.backgroundColor = '#1a1a2e';
11
+ })();
12
+ </script>
13
  <meta name="description" content="">
14
  <meta name="author" content="">
15
 
16
+
 
 
 
 
 
 
17
 
18
  <link rel="icon" href="favicon.ico">
19
  <title>Diagnóstico IA</title>
 
1464
  <script>
1465
  (function () {
1466
  function applyTheme(theme) {
1467
+ const lightTheme = document.getElementById('lightTheme');
1468
+ const darkTheme = document.getElementById('darkTheme');
1469
+ if (theme === 'dark') {
1470
+ lightTheme.disabled = true;
1471
+ darkTheme.disabled = false;
1472
+ document.documentElement.style.backgroundColor = '#1a1a2e';
1473
+ } else {
1474
+ lightTheme.disabled = false;
1475
+ darkTheme.disabled = true;
1476
+ document.documentElement.style.backgroundColor = '';
1477
  }
1478
+ document.documentElement.style.visibility = 'visible';
1479
+ }
1480
 
1481
  applyTheme(localStorage.getItem('theme') || 'light');
1482