Browse Source

added night mode to expo

Bachir Soussi Chiadmi 4 years ago
parent
commit
f19d9445a8

File diff suppressed because it is too large
+ 1 - 1
web/themes/custom/edlptheme/assets/dist/scripts/main.min.js


File diff suppressed because it is too large
+ 0 - 0
web/themes/custom/edlptheme/assets/dist/styles/app.min.css


+ 13 - 1
web/themes/custom/edlptheme/assets/scripts/main.js

@@ -1044,7 +1044,7 @@
       _randomPlayer = new RandomPlayer(e.playlist);
 
       if (_is_expo) {
-        _randomPlayer.start();
+        initExpo();
       }
 
       // mainly for articles link
@@ -1951,6 +1951,18 @@
       // }
     };
 
+    //  ___
+    // | __|_ ___ __  ___
+    // | _|\ \ / '_ \/ _ \
+    // |___/_\_\ .__/\___/
+    //         |_|
+    function initExpo(){
+      console.log('initExpo', window.location.hash);
+      if(window.location.hash == '#black'){
+        $('body').addClass('expo-black');
+      }
+      _randomPlayer.start();
+    }
 
     //   ___     _    _
     //  / __|_ _(_)__| |

+ 12 - 0
web/themes/custom/edlptheme/assets/styles/app.scss

@@ -64,6 +64,10 @@
 // }
 
 
+body.expo-black{
+  background-color: $expo-black;
+}
+
 //  _                _
 // | |_  ___ __ _ __| |___ _ _
 // | ' \/ -_) _` / _` / -_) '_|
@@ -1126,6 +1130,14 @@ main[role="main"]{
       background-color: transparent;
     }
   }
+  body.expo-black &{
+    background-color: $expo-black-bg;
+    color:#fff;
+    .time-line-container .time-line .loader{
+      border-top: 2px solid $expo-black-bg;
+      border-bottom: 2px solid $expo-black-bg;
+    }
+  }
 }
 
 

+ 2 - 0
web/themes/custom/edlptheme/assets/styles/base/_colors.scss

@@ -1 +1,3 @@
 $transparent-bg: rgba(255,255,255, 0.95);
+$expo-black:#282828;
+$expo-black-bg:rgba(40,40,40,0.9);

Some files were not shown because too many files changed in this diff