fix light mode
This commit is contained in:
parent
b7edcfcb08
commit
b02406c606
@ -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"))
|
||||
|
||||
@ -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 %}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@ -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();
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user