From: Marius Gavrilescu Date: Tue, 11 Feb 2014 07:17:40 +0000 (+0200) Subject: Merge branch 'master' into mindcoding X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=46780bac97f1fd12d861601ecc545f195fb6d4b2;hp=-c;p=plack-app-gruntmaster.git Merge branch 'master' into mindcoding Conflicts: tmpl/header.en --- 46780bac97f1fd12d861601ecc545f195fb6d4b2 diff --combined js/90-custom.js index 8b1435d,750aaa1..d847fc1 --- a/js/90-custom.js +++ b/js/90-custom.js @@@ -1,17 -1,8 +1,17 @@@ (function(){ 'use strict'; function set_style(name){ - $('#stylesheet').attr("href", "/css/" + name); + $('#stylesheet').attr("href", "/css/" + name + ".css"); localStorage.setItem("theme", name); + if(name == 'slate' || name == 'cyborg') + $('.logo').addClass('logo-dark'); + else + $('.logo').removeClass('logo-dark'); + } + + var theme = localStorage.getItem("theme"); + if(theme) { + set_style(theme); } $( document ).ready(function() { @@@ -34,13 -25,10 +34,13 @@@ $('#theme_cerulean').on('click', function () { set_style("cerulean"); }); $('#theme_cyborg' ).on('click', function () { set_style("cyborg"); }); $('#theme_cosmo' ).on('click', function () { set_style("cosmo"); }); - }); - var theme = localStorage.getItem("theme"); - if(theme) { - set_style(theme); - } + if(!$('#sidebar').size()) { + var content = $('#content'); + content.wrapInner('
').append('