remove special styles for narrow screens and frames
This commit is contained in:
parent
3075e92f49
commit
d6cad7fb98
|
@ -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) {
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue