X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;ds=sidebyside;f=js%2F90-themes.js;h=50834da65622a6ffd71536067798d34a8ad54d95;hb=c51ab1a8ff2848793cc9e6df4a5811a75d982cac;hp=0b043b8e393adc21146c4a698286f441ea499f98;hpb=f2752dd5062a025917bb88bda9ced71bc6d06875;p=plack-app-gruntmaster.git diff --git a/js/90-themes.js b/js/90-themes.js index 0b043b8..50834da 100644 --- a/js/90-themes.js +++ b/js/90-themes.js @@ -1,36 +1,28 @@ -(function(){ - 'use strict'; - function set_style(name){ - $('link[rel~="stylesheet"]').prop('disabled', true); - $('link[title="' + name + '"]').prop('disabled', false); - localStorage.setItem("theme", name); - $(document).ready(function() { - if(name == 'slate' || name == 'cyborg') - $('.logo').removeClass('logo-light'); - else - $('.logo').addClass('logo-light'); - }); +function set_style(name, trans){ + if(trans){ + document.body.classList.add('transition-color'); + setTimeout(() => document.body.classList.remove('transition-color'), 1000); } - - var selector; - - function add_themelink(theme, text) { - var link = $('' + text + ''); - link.appendTo(selector.find('ul')).wrap('