]>
iEval git - plack-app-gruntmaster.git/blob - js/90-themes.js
3 function set_style(name
){
4 $('link[rel~="stylesheet"]').prop('disabled', true);
5 $('link[title="' + name
+ '"]').prop('disabled', false);
6 localStorage
.setItem("theme", name
);
7 $(document
).ready(function() {
8 if(name
== 'slate' || name
== 'cyborg')
9 $('.logo').removeClass('logo-light');
11 $('.logo').addClass('logo-light');
17 function add_themelink(theme
, text
) {
18 var link
= $('<a role="button">' + text
+ '</a>');
19 link
.appendTo(selector
.find('ul')).wrap('<li>').on('click', function () { set_style(theme
) });
22 $( document
).ready(function() {
23 selector
= $('<div>Themes: <ul class="list-inline"></ul></div>');
24 add_themelink('cyborg', 'Black');
25 add_themelink('slate', 'Grey');
26 add_themelink('readable', 'White');
27 $('#sidebar').prepend(selector
);
30 var theme
= localStorage
.getItem("theme");
32 if(theme
== "cerulean" || theme
== "cosmo")
This page took 0.043919 seconds and 4 git commands to generate.