]>
iEval git - gruntmaster-page.git/blob - js/90-custom.js
3 function set_style(name
){
4 $('#stylesheet').attr("href", "/css/" + name
+ ".css");
5 localStorage
.setItem("theme", name
);
6 if(name
== 'slate' || name
== 'cyborg')
7 $('.logo').addClass('logo-dark');
9 $('.logo').removeClass('logo-dark');
12 var theme
= localStorage
.getItem("theme");
17 $( document
).ready(function() {
18 var hiddenDiv
= $(document
.createElement('div'));
20 hiddenDiv
.addClass('hiddendiv common');
22 $('body').append(hiddenDiv
);
24 $("textarea.autoresize").on('keyup', function () {
25 var content
= $(this).val();
27 content
= content
.replace(/\n/g, '<br>');
28 hiddenDiv
.html(content
+ '<br class="lbr">');
30 $(this).css('height', hiddenDiv
.height()+23);
33 $('#theme_slate' ).on('click', function () { set_style("slate"); });
34 $('#theme_cerulean').on('click', function () { set_style("cerulean"); });
35 $('#theme_cyborg' ).on('click', function () { set_style("cyborg"); });
36 $('#theme_cosmo' ).on('click', function () { set_style("cosmo"); });
38 if(!$('#sidebar').size()) {
39 var content
= $('#content');
40 content
.wrapInner('<div class="col-md-9">').append('<div id="sidebar" class="col-md-3">').addClass('row');
42 $('#sponsors').detach().appendTo($('#sidebar'));
44 if(theme
) set_style(theme
);
This page took 0.054744 seconds and 4 git commands to generate.