fix body margin in tight mode

This commit is contained in:
Thibault Duplessis 2013-06-05 16:05:56 +02:00
parent 2a56af720c
commit 73958bac4b
3 changed files with 4 additions and 6 deletions

View file

@ -7,7 +7,7 @@ import controllers.routes
trait AssetHelper {
val assetVersion = 33
val assetVersion = 34
def cssTag(name: String) = css("stylesheets/" + name)

View file

@ -318,11 +318,9 @@ var lichess_sri = Math.random().toString(36).substring(5); // 8 chars
function onResize() {
if ($(document.body).width() < 1000) {
$(document.body).addClass("tight");
$('div.content').prepend($('div.header h1'));
$('#lichess h1').after($('div.header div.side_menu'));
// hack for gecko
if ($('div.content').offset().top > 40) {
$('div.content').css('marginTop', '-8px');
if ($('body > div.content').offset().top > 50) {
$('body > div.content').css('marginTop', '0px');
}
} else {
$(document.body).removeClass("tight");

View file

@ -272,7 +272,7 @@ body > div.content {
body.tight > div.content {
width: auto;
min-width: 780px;
margin-top: 5px;
margin-top: 20px;
}
#top {
width: 100%;