X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;ds=inline;f=js%2F90-themes.js;h=0b043b8e393adc21146c4a698286f441ea499f98;hb=1964c8579557d5244f9032ce36bd02e02661709f;hp=eb5987c76041a5d720bc9787302c3120122ccc42;hpb=5fdcdc9177877f4b54260e4429e9998b6d9598b5;p=plack-app-gruntmaster.git diff --git a/js/90-themes.js b/js/90-themes.js index eb5987c..0b043b8 100644 --- a/js/90-themes.js +++ b/js/90-themes.js @@ -1,20 +1,36 @@ (function(){ 'use strict'; function set_style(name){ - $('#stylesheet').attr("href", "/css/" + name + ".css"); + $('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'); + }); + } + + var selector; + + function add_themelink(theme, text) { + var link = $('' + text + ''); + link.appendTo(selector.find('ul')).wrap('