Update web/diagnosis.html
Browse files- 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 |
-
|
| 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 |
-
|
| 1467 |
-
|
| 1468 |
-
|
| 1469 |
-
|
| 1470 |
-
|
| 1471 |
-
|
| 1472 |
-
|
| 1473 |
-
|
| 1474 |
-
|
| 1475 |
-
document.documentElement.style.
|
| 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 |
|