X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=js%2F90-themes.js;h=b7d73221bc1a255a63c1f6570a0e1fd9ecc0d045;hb=2ca77f50fce7c0cc299359a766058240255941f5;hp=56138d36f94d7000c8cba5e6599d6e1f8c7e80d1;hpb=45aae842a6659f3d51b8a2f93912e0520f12e64f;p=gruntmaster-page.git diff --git a/js/90-themes.js b/js/90-themes.js index 56138d3..b7d7322 100644 --- a/js/90-themes.js +++ b/js/90-themes.js @@ -1,7 +1,7 @@ (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') @@ -12,15 +12,16 @@ } $( document ).ready(function() { - $('#theme-selector').removeClass('hidden'); + $('#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); } })();