From d6cad7fb98cd29f945fd01e447e36b9b87313c49 Mon Sep 17 00:00:00 2001 From: Thibault Duplessis Date: Wed, 4 Mar 2015 18:19:24 +0100 Subject: [PATCH] remove special styles for narrow screens and frames --- public/javascripts/big.js | 36 +++++++++++------------------- public/stylesheets/chessground.css | 1 + public/stylesheets/common.css | 27 ---------------------- 3 files changed, 14 insertions(+), 50 deletions(-) diff --git a/public/javascripts/big.js b/public/javascripts/big.js index 86da43eb7b..64be324ddd 100644 --- a/public/javascripts/big.js +++ b/public/javascripts/big.js @@ -540,30 +540,20 @@ lichess.storage = { // small layout function onResize() { - if ($(document.body).width() < 1000) { - $(document.body).addClass("tight"); - $('#site_header .side_menu').prependTo('div.content_box:first'); - } else { - $(document.body).removeClass("tight"); - $('#timeline, div.side_box, div.under_chat').each(function() { - var ol = $(this).offset().left; - if (ol < 3) { - var dec = 3 - ol; - var pad = $(this).outerWidth() - $(this).width(); - $(this).css({ - 'margin-left': (dec - 30) + 'px', - 'width': (230 - pad - dec) + 'px' - }); - $(this).find('input.lichess_say').css('width', (204 - dec) + 'px'); - } - }); - $('#featured_game').each(function() { - $(this).children().toggle($(this).width() >= 220); - }); - $('div.content_box .side_menu').appendTo('#site_header'); - } + $('#timeline, div.side_box, div.under_chat').each(function() { + var ol = $(this).offset().left; + if (ol < 3) { + var dec = 3 - ol; + var pad = $(this).outerWidth() - $(this).width(); + $(this).css({ + 'margin-left': (dec - 30) + 'px', + 'width': (230 - pad - dec) + 'px' + }); + $(this).find('input.lichess_say').css('width', (204 - dec) + 'px'); + } + }); } - $(window).resize(onResize); + $(window).resize($.fp.debounce(onResize, 200)); onResize(); if (!lichess.StrongSocket.available) { diff --git a/public/stylesheets/chessground.css b/public/stylesheets/chessground.css index be9c8a6b76..e7c984c9d3 100644 --- a/public/stylesheets/chessground.css +++ b/public/stylesheets/chessground.css @@ -145,6 +145,7 @@ body.base .cg-board .cg-square.exploding { -webkit-transform: none; -moz-transform: none; -ms-transform: none; + z-index: initial; } .is3d .cg-piece { /* original size: diff --git a/public/stylesheets/common.css b/public/stylesheets/common.css index 48017412dc..68a635e27e 100644 --- a/public/stylesheets/common.css +++ b/public/stylesheets/common.css @@ -564,9 +564,6 @@ strong { float: left; position: relative; } -body.tight #site_header { - display: none; -} #site_header a.lang_fallback { font-weight: bold; display: inline-block; @@ -576,19 +573,11 @@ body > div.content { width: 1005px; margin: 20px auto 30px auto; } -body.tight > div.content { - width: auto; - min-width: 780px; - margin-top: 35px; -} #top { width: 100%; min-width: 1005px; height: 24px; } -body.tight #top { - min-width: 780px; -} #site_description { position: absolute; top: -100px; @@ -596,9 +585,6 @@ body.tight #top { #lichess { margin-left: 211px; } -body.tight #lichess { - margin-left: 10px; -} #site_title { width: 130px; font-size: 30px; @@ -606,18 +592,12 @@ body.tight #lichess { display: block; margin-bottom: 3px; } -body.tight #site_title { - margin-left: 10px; -} #site_title span.extension { font-weight: lighter; } #site_baseline span { font-weight: bold; } -body.tight #site_baseline { - display: none; -} #footer_wrap { border-top: 1px solid #c9c9c9; border-bottom: 1px solid #c9c9c9; @@ -634,10 +614,6 @@ body.tight #site_baseline { #footer_wrap div.footer a { text-decoration: none; } -body.tight div.footer { - width: auto; - padding: 0 10px; -} div.footer > .center { position: absolute; top: 1em; @@ -930,9 +906,6 @@ div.side form.search input { text-decoration: none; width: 203px; } -body.tight div.side_menu a { - padding-right: 10px; -} #site_header div.side_menu a.active { background: white; border: 1px solid #dadada;