// globals
if (typeof bbs == 'undefined') {
bbs = {};
}
// for switching color themes
bbs.theme = localStorage.getItem('rmz_bbs-auto-theme') || 'default';
bbs.themeLink = $('#theme-css-link');
if (bbs.themeLink.data('theme') !== bbs.theme){
bbs.themeLink.attr({
'href': 'static/css/theme_' + bbs.theme + '.css',
'data-theme': bbs.theme
});
$('body').attr('data-theme', bbs.theme);
}
$(document).ready(function(){
var themeInputs = $('.theme-input');
themeInputs.prop('checked', false);
themeInputs.filter('[value='+bbs.theme+']').prop('checked', true);
$('body').attr('data-theme', bbs.theme);
// color-theme switch
themeInputs.on('change', function(){
console.log('111');
var newTheme = $(this).val();
if (bbs.theme !== newTheme){
bbs.theme = newTheme;
bbs.themeLink.attr({
'href': 'static/css/theme_' + bbs.theme + '.css',
'data-theme': bbs.theme
});
$('body').attr('data-theme', bbs.theme);
localStorage.setItem('rmz_bbs-auto-theme', bbs.theme);
} else return;
});
})
html, body{
margin:0;
padding:0;
height:auto !important;
min-height:100%;
}
.main {
height: 100%;
padding: 0;
margin: 0;
overflow-y: scroll;
display: -webkit-flex;
display: -moz-flex;
display: -ms-flex;
display: flex;
-webkit-flex-direction: column;
-moz-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;*/
background: #fff;
font-family: tinos, arial, sans-serif;
}