X-Git-Url: http://git.ieval.ro/?p=plack-app-gruntmaster.git;a=blobdiff_plain;f=js%2F90-themes.js;h=a9d9b5185ebf5f1bd905dffc0767b46841b7bf4e;hp=c87291949e978a5af15fba9207b7ed72e104a09a;hb=65d5cb3b6007fa0bc758722983b3f0afefc02f2e;hpb=8345760abf4953980a85e0d5f9cade421f73d4ff diff --git a/js/90-themes.js b/js/90-themes.js index c872919..a9d9b51 100644 --- a/js/90-themes.js +++ b/js/90-themes.js @@ -1,22 +1,23 @@ -function set_style(name){ - $('link[rel~="stylesheet"]').each(e => e.disabled = true); +function set_style(name, trans){ + if(trans){ + document.body.classList.add('transition-color'); + setTimeout(() => document.body.classList.remove('transition-color'), 1000); + } + $('link[title]').each(e => e.disabled = true); $('link[title="' + name + '"]')[0].disabled = false; localStorage.setItem("theme", name); } $(function() { - var theme_ul = '