]> iEval git - gruntmaster-page.git/blame - js/90-themes.js
Add ruby everywhere
[gruntmaster-page.git] / js / 90-themes.js
CommitLineData
c7a5e4e0
MG
1(function(){
2 'use strict';
3 function set_style(name){
8798626b 4 $('#stylesheet').attr("href", "/static/css/" + name + ".css");
c7a5e4e0
MG
5 localStorage.setItem("theme", name);
6 }
7dc32473 7
c7a5e4e0 8 $( document ).ready(function() {
5fdcdc91 9 $('#theme-selector').detach().prependTo($('#sidebar'));
c7a5e4e0 10 $('#theme_slate' ).on('click', function () { set_style("slate"); });
c7a5e4e0 11 $('#theme_cyborg' ).on('click', function () { set_style("cyborg"); });
a96f684c 12 $('#theme_readable').on('click', function () { set_style("readable"); });
7dc32473
MG
13 });
14
c7a5e4e0
MG
15 var theme = localStorage.getItem("theme");
16 if(theme) {
a96f684c
MG
17 if(theme == "cerulean" || theme == "cosmo")
18 theme = "readable";
c7a5e4e0
MG
19 set_style(theme);
20 }
21})();
This page took 0.040543 seconds and 4 git commands to generate.