reserve space for publik menu only if it exists (#12884)

This commit is contained in:
Frédéric Péters 2016-08-19 15:32:27 +02:00
parent 44cd22474e
commit 18d57748f0
2 changed files with 5 additions and 2 deletions

View File

@ -555,11 +555,11 @@ input[type=submit]:hover {
background: #23282d url(texture.png);
}
#main {
body[data-has-sidebar] #main {
margin-left: 36px;
}
#main.sidepage-expanded {
body #main.sidepage-expanded {
margin-left: 30ex;
}

View File

@ -303,6 +303,9 @@ var gadjo_js = gadjo_js || {};
});
});
$(function () {
if ($('#sidepage').length == 1) {
$('body').attr('data-has-sidebar', 'true');
}
/* 440 is header image height (500px) - header height (60px) */
var timestamp = ((new Date().getTime() / 1000) % 86400 ) / (86400 / 440);
$('div#header').css('background-position', '0 -' + timestamp + 'px');