#399 adjust text layout, menu highlighting

This commit is contained in:
Ulf Gebhardt 2017-08-18 00:10:21 +02:00
parent 32be423771
commit 10459e4572
3 changed files with 24 additions and 5 deletions

View File

@ -8,4 +8,8 @@
#footer-right{
text-align: right;
}
.active, .active a{
background-color: #e7e7e7 !important;
}

View File

@ -1,3 +1,18 @@
$(document).ready(function() {
new SYSTEM('./api.php',1,'start');
});
new SYSTEM('./api.php',1,'start',sys_hashchange);
$('.navbar-collapse a').click(function(){
$(".navbar-collapse").collapse('hide');
});
});
function sys_hashchange(state){
var state_ = state ? state.split(';')[0].split('(')[0] : state;
var state_ = state_ ? state_.split('#')[0] : state;
$('.nav li').each(function(){
$(this).removeClass('active');});
$('.navbar-header').removeClass('active');
if($('#menu_'+state_).parent().length){
$('#menu_'+state_).parent().addClass('active');
} else {
$('.navbar-header').addClass('active');}
}

File diff suppressed because one or more lines are too long