X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=js%2F90-themes.js;h=b7d73221bc1a255a63c1f6570a0e1fd9ecc0d045;hb=3a85cde38e7cd33e361f6b2f1b08f9419f09253c;hp=eb5987c76041a5d720bc9787302c3120122ccc42;hpb=5fdcdc9177877f4b54260e4429e9998b6d9598b5;p=gruntmaster-page.git diff --git a/js/90-themes.js b/js/90-themes.js index eb5987c..b7d7322 100644 --- a/js/90-themes.js +++ b/js/90-themes.js @@ -1,20 +1,27 @@ (function(){ 'use strict'; function set_style(name){ - $('#stylesheet').attr("href", "/css/" + name + ".css"); + $('#stylesheet').attr("href", "https://static.mindcoding.ro/static/css/" + name + ".css"); localStorage.setItem("theme", name); + $(document).ready(function() { + if(name == 'slate' || name == 'cyborg') + $('.logo').removeClass('logo-light'); + else + $('.logo').addClass('logo-light'); + }); } $( document ).ready(function() { $('#theme-selector').detach().prependTo($('#sidebar')); $('#theme_slate' ).on('click', function () { set_style("slate"); }); - $('#theme_cerulean').on('click', function () { set_style("cerulean"); }); $('#theme_cyborg' ).on('click', function () { set_style("cyborg"); }); - $('#theme_cosmo' ).on('click', function () { set_style("cosmo"); }); + $('#theme_readable').on('click', function () { set_style("readable"); }); }); var theme = localStorage.getItem("theme"); if(theme) { + if(theme == "cerulean" || theme == "cosmo") + theme = "readable"; set_style(theme); } })();