diff --git a/prosopopee/prosopopee.py b/prosopopee/prosopopee.py index 8db6842..e213f0e 100644 --- a/prosopopee/prosopopee.py +++ b/prosopopee/prosopopee.py @@ -15,7 +15,6 @@ DEFAULTS = { "share": False, "settings": {}, "show_date": True, - "light_mode": False, } SETTINGS = { @@ -328,7 +327,7 @@ def main(): link=gallery ).encode("Utf-8")) - if settings["settings"].get("light_mode", True): + if settings["settings"].get("light_mode"): print "light mode enable" if not os.path.exists(os.path.join("build", gallery, "light")): os.makedirs(os.path.join("build", gallery, "light")) diff --git a/prosopopee/themes/exposure/templates/gallery-index.html b/prosopopee/themes/exposure/templates/gallery-index.html index 36f502e..da5e858 100644 --- a/prosopopee/themes/exposure/templates/gallery-index.html +++ b/prosopopee/themes/exposure/templates/gallery-index.html @@ -72,6 +72,7 @@ $(function() { }); }); +{% if settings.settings.light_mode %} var slowLoad = window.setTimeout( function() { var html_node = document.getElementsByTagName('html')[0]; var div = document.createElement('div'); @@ -101,7 +102,7 @@ var slowLoad = window.setTimeout( function() { div.appendChild(dismiss_container); html_node.appendChild(div); -}, 10 ); +}, 1000 ); window.addEventListener( 'load', function() { try { @@ -112,6 +113,7 @@ window.addEventListener( 'load', function() { } }); +{% endif %} diff --git a/prosopopee/themes/material/templates/gallery-index.html b/prosopopee/themes/material/templates/gallery-index.html index 9c5d8e0..d847fd0 100644 --- a/prosopopee/themes/material/templates/gallery-index.html +++ b/prosopopee/themes/material/templates/gallery-index.html @@ -77,7 +77,7 @@ $(function() { }); }); - +{% if settings.settings.light_mode %} var slowLoad = window.setTimeout( function() { var html_node = document.getElementsByTagName('html')[0]; var div = document.createElement('div'); @@ -107,7 +107,7 @@ var slowLoad = window.setTimeout( function() { div.appendChild(dismiss_container); html_node.appendChild(div); -}, 10 ); +}, 1000 ); window.addEventListener( 'load', function() { try { @@ -118,7 +118,7 @@ window.addEventListener( 'load', function() { } }); - +{% endif %} $(".button-collapse").sideNav();