redesign lobby tabs
This commit is contained in:
parent
ad282e4466
commit
ad0ee361fb
|
@ -68,7 +68,7 @@ openGraph = Map(
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<a class="filter" href="@routes.Setup.filterForm()">
|
<a class="filter" href="@routes.Setup.filterForm()">
|
||||||
<span data-icon="D"> @trans.filterGames()</span>
|
<span class="hint--top" data-hint="@trans.filterGames()"><span data-icon="D"></span></span>
|
||||||
<span class="number">(0)</span>
|
<span class="number">(0)</span>
|
||||||
</a>
|
</a>
|
||||||
<div id="now_playing" class="tab now_playing none" data-href="@routes.Lobby.playing">
|
<div id="now_playing" class="tab now_playing none" data-href="@routes.Lobby.playing">
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="reload"><span data-icon="P"></span></th>
|
<th></th>
|
||||||
<th class="player">@trans.player()</th>
|
<th class="player">@trans.player()</th>
|
||||||
<th class="rating">Rating</th>
|
<th class="rating">Rating</th>
|
||||||
<th>@trans.time()</th>
|
<th>@trans.time()</th>
|
||||||
|
|
|
@ -1515,6 +1515,7 @@ var storage = {
|
||||||
$(this).siblings().removeClass('active').end().addClass('active');
|
$(this).siblings().removeClass('active').end().addClass('active');
|
||||||
$wrap.find('>.tab').hide().filter('.' + tab).show();
|
$wrap.find('>.tab').hide().filter('.' + tab).show();
|
||||||
storage.set('lobbytab', tab);
|
storage.set('lobbytab', tab);
|
||||||
|
reloadSeeksIfVisible();
|
||||||
});
|
});
|
||||||
var active = storage.get('lobbytab') || 'list';
|
var active = storage.get('lobbytab') || 'list';
|
||||||
$wrap.find('>div.tabs>.' + active).addClass('active');
|
$wrap.find('>div.tabs>.' + active).addClass('active');
|
||||||
|
@ -1653,13 +1654,7 @@ var storage = {
|
||||||
});
|
});
|
||||||
}, Math.round(Math.random() * 5000));
|
}, Math.round(Math.random() * 5000));
|
||||||
},
|
},
|
||||||
reload_seeks: function() {
|
reload_seeks: reloadSeeksIfVisible,
|
||||||
$.ajax($seeks.data('reload-url'), {
|
|
||||||
success: function(html) {
|
|
||||||
$seeks.html(html);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
nbr: function(e) {
|
nbr: function(e) {
|
||||||
var $tag = $('#site_baseline span');
|
var $tag = $('#site_baseline span');
|
||||||
if ($tag.length && e) {
|
if ($tag.length && e) {
|
||||||
|
@ -1725,6 +1720,16 @@ var storage = {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function reloadSeeksIfVisible() {
|
||||||
|
if ($seeks.is(':visible')) {
|
||||||
|
$.ajax($seeks.data('reload-url'), {
|
||||||
|
success: function(html) {
|
||||||
|
$seeks.html(html);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function changeFeatured(o) {
|
function changeFeatured(o) {
|
||||||
$('#featured_game').html(o.html);
|
$('#featured_game').html(o.html);
|
||||||
$('body').trigger('lichess.content_loaded');
|
$('body').trigger('lichess.content_loaded');
|
||||||
|
|
|
@ -220,6 +220,10 @@ body.dark #hooks_wrap > div.tabs > a:hover,
|
||||||
body.dark #hooks_wrap > div.tabs > a.active {
|
body.dark #hooks_wrap > div.tabs > a.active {
|
||||||
background-color: #303030;
|
background-color: #303030;
|
||||||
}
|
}
|
||||||
|
body.dark #hooks_wrap > div.tabs > a:hover,
|
||||||
|
body.dark #hooks_wrap > div.tabs > a.active {
|
||||||
|
border-top: 2px solid #d85000;
|
||||||
|
}
|
||||||
body.dark div.table_not_started {
|
body.dark div.table_not_started {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
background: none;
|
background: none;
|
||||||
|
|
|
@ -33,7 +33,7 @@ div.lobby_and_ground {
|
||||||
}
|
}
|
||||||
#hooks_wrap > div.tabs {
|
#hooks_wrap > div.tabs {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -21px;
|
top: -22px;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
|
@ -49,6 +49,7 @@ div.lobby_and_ground {
|
||||||
#hooks_wrap > div.tabs > a:hover,
|
#hooks_wrap > div.tabs > a:hover,
|
||||||
#hooks_wrap > div.tabs > a.active {
|
#hooks_wrap > div.tabs > a.active {
|
||||||
background: #f0f0f0;
|
background: #f0f0f0;
|
||||||
|
border-top: 2px solid #d85000;
|
||||||
}
|
}
|
||||||
#hooks_wrap > div.tabs > a.active {
|
#hooks_wrap > div.tabs > a.active {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
@ -63,10 +64,11 @@ div.lobby_and_ground {
|
||||||
#hooks_wrap > a.filter {
|
#hooks_wrap > a.filter {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -20px;
|
top: -20px;
|
||||||
right: 281px;
|
left: 487px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
padding: 0 10px 0 10px;
|
font-size: 1.1em;
|
||||||
|
padding: 0 5px;
|
||||||
border-bottom: 0;
|
border-bottom: 0;
|
||||||
display: block;
|
display: block;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|
Loading…
Reference in a new issue