diff options
author | Andrew Dolgov <[email protected]> | 2019-12-12 09:15:03 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2019-12-12 09:15:03 +0300 |
commit | 351f32cd42ef0e54e75b1e42abe5d8f4e8ea9cca (patch) | |
tree | 0e93399ccade7d9915368e531a9dcae89146faca | |
parent | 520e31b1621a69ce3157553c8ae29991555edbe4 (diff) |
default.css: auto switch night/day modes
-rw-r--r-- | js/read.js | 2 | ||||
-rw-r--r-- | read.html | 1 | ||||
-rw-r--r-- | themes/default.css | 7 | ||||
-rw-r--r-- | worker.js | 1 |
4 files changed, 9 insertions, 2 deletions
@@ -23,7 +23,7 @@ function init_loader() { const res_names = [ "lib/bootstrap/v3/js/jquery.js", "lib/jquery.mobile-events.min.js", "css/transitions.css", "js/reader.js", "css/reader.css", "js/dict.js", - "themes/default.css", "themes/mocca.css", "themes/night.css", + "themes/default.css", "themes/light.css", "themes/mocca.css", "themes/night.css", "themes/plan9.css", "themes/gray.css", "themes/sepia.css" ]; for (let i = 0; i < res_names.length; i++) { @@ -66,6 +66,7 @@ <div class="col-sm-9"> <select class="theme_name form-control" onchange="change_theme(this)"> <option value="default">Default</option> + <option value="light">Light</option> <option value="gray">Gray</option> <option value="mocca">Mocca</option> <option value="night">Night</option> diff --git a/themes/default.css b/themes/default.css index 545eb34..99d602e 100644 --- a/themes/default.css +++ b/themes/default.css @@ -1 +1,6 @@ -/* placeholder */ +@media (prefers-color-scheme: dark) { + body, .loading, html:-webkit-full-screen { + background : black; + color : #ccc; + } +} @@ -18,6 +18,7 @@ const CACHE_URLS = [ 'css/transitions.css', 'offline.html', 'themes/default.css', + 'themes/light.css', 'themes/mocca.css', 'themes/night.css', 'themes/plan9.css', |