ViannyCruz commited on
Commit
d42e897
·
verified ·
1 Parent(s): d769f11

Update web/index.html

Browse files
Files changed (1) hide show
  1. web/index.html +8 -13
web/index.html CHANGED
@@ -19,23 +19,18 @@
19
  <link rel="stylesheet" href="css/jquery.timepicker.css">
20
  <link rel="stylesheet" href="css/quill.snow.css">
21
  <link rel="stylesheet" href="css/daterangepicker.css">
22
- <link rel="stylesheet" href="css/app-light.css" id="lightTheme">
23
- <link rel="stylesheet" href="css/app-dark.css" id="darkTheme" disabled>
24
  <script>
25
- (function() {
26
- // Solo ejecutar UNA vez, si ya está configurado no hacer nada
27
- if (window.__themeInit) return;
28
- window.__themeInit = true;
29
  var dark = localStorage.getItem('theme') === 'dark';
30
- var lightEl = document.getElementById('lightTheme');
31
- var darkEl = document.getElementById('darkTheme');
32
- if (dark) {
33
- lightEl.disabled = true;
34
- darkEl.disabled = false;
35
- document.documentElement.style.backgroundColor = '#1a1a2e';
36
- }
37
  })();
38
  </script>
 
39
 
40
  </head>
41
  <body class="vertical light ">
 
19
  <link rel="stylesheet" href="css/jquery.timepicker.css">
20
  <link rel="stylesheet" href="css/quill.snow.css">
21
  <link rel="stylesheet" href="css/daterangepicker.css">
22
+ <style id="themeBlock">html{visibility:hidden}</style>
 
23
  <script>
24
+ (function(){
 
 
 
25
  var dark = localStorage.getItem('theme') === 'dark';
26
+ document.write(
27
+ '<link rel="stylesheet" href="css/app-' + (dark?'dark':'light') + '.css" id="' + (dark?'dark':'light') + 'Theme">' +
28
+ '<link rel="stylesheet" href="css/app-' + (dark?'light':'dark') + '.css" id="' + (dark?'light':'dark') + 'Theme" disabled>'
29
+ );
30
+ if(dark) document.documentElement.style.backgroundColor = '#1a1a2e';
 
 
31
  })();
32
  </script>
33
+ <style>html{visibility:visible}</style>
34
 
35
  </head>
36
  <body class="vertical light ">