]> iEval git - gruntmaster-page.git/blame - js/90-themes.js
Add logos
[gruntmaster-page.git] / js / 90-themes.js
CommitLineData
c7a5e4e0
MG
1(function(){
2 'use strict';
3 function set_style(name){
f06ba039 4 $('#stylesheet').attr("href", "/css/" + name + ".css");
c7a5e4e0 5 localStorage.setItem("theme", name);
59731c89
MG
6 $(document).ready(function() {
7 if(name == 'slate' || name == 'cyborg')
8 $('.logo').removeClass('logo-light');
9 else
10 $('.logo').addClass('logo-light');
11 });
c7a5e4e0 12 }
7dc32473 13
c7a5e4e0 14 $( document ).ready(function() {
4896df53 15 $('#theme-selector').removeClass('hidden');
c7a5e4e0
MG
16 $('#theme_slate' ).on('click', function () { set_style("slate"); });
17 $('#theme_cerulean').on('click', function () { set_style("cerulean"); });
18 $('#theme_cyborg' ).on('click', function () { set_style("cyborg"); });
19 $('#theme_cosmo' ).on('click', function () { set_style("cosmo"); });
7dc32473
MG
20 });
21
c7a5e4e0
MG
22 var theme = localStorage.getItem("theme");
23 if(theme) {
24 set_style(theme);
25 }
26})();
This page took 0.028556 seconds and 4 git commands to generate.