Add the support of Tablesorter to the website.
This commit is contained in:
parent
4dbb2140e6
commit
b89c7ae363
@ -1,5 +1,5 @@
|
||||
/* Fix the position of chess board while scrolling */
|
||||
$(function() {
|
||||
/* Fix the position of chess board while scrolling */
|
||||
if (obj = $('#GameWrapper')) {
|
||||
obj.affix({
|
||||
offset: {
|
||||
@ -8,7 +8,12 @@ $(function() {
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
/* Sort a tournament table with tablesorter */
|
||||
$('.tablesorter').tablesorter({
|
||||
widgets: ['zebra']
|
||||
});
|
||||
})
|
||||
|
||||
/* Stylize pgn4web elements by Bootstrap */
|
||||
|
63
_assets/stylesheets/less/table.less
Normal file
63
_assets/stylesheets/less/table.less
Normal file
@ -0,0 +1,63 @@
|
||||
/* Tablesorter */
|
||||
|
||||
table.tablesorter {
|
||||
background-color: #cdcdcd;
|
||||
border-spacing: 1px;
|
||||
border-collapse: separate;
|
||||
|
||||
thead tr th, tfoot tr th {
|
||||
background-color: #e6eeee;
|
||||
border: 1px solid #fff !important;
|
||||
}
|
||||
|
||||
thead tr {
|
||||
.header {
|
||||
padding-right: 21px;
|
||||
background-image: url("/assets/img/tablesorter/bg.gif");
|
||||
background-repeat: no-repeat;
|
||||
background-position: center right;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.headerSortUp {
|
||||
background-image: url("/assets/img/tablesorter/asc.gif");
|
||||
}
|
||||
|
||||
.headerSortDown {
|
||||
background-image: url("/assets/img/tablesorter/desc.gif");
|
||||
}
|
||||
|
||||
.headerSortDown, .headerSortUp {
|
||||
background-color: #8dbdd8;
|
||||
}
|
||||
}
|
||||
|
||||
tfoot td, tbody td {
|
||||
background-color: #fff;
|
||||
border: none;
|
||||
}
|
||||
tbody tr.odd td {
|
||||
background-color: #f0f0f6;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Tournament table */
|
||||
|
||||
table.tournament {
|
||||
thead > tr > th, thead > tr > td,
|
||||
tfoot > tr > th, tfoot > tr > td,
|
||||
tbody > tr > th, tbody > tr > td {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
tbody > tr {
|
||||
> .score, > .diagonal {
|
||||
min-width: 25px;
|
||||
text-align: center;
|
||||
}
|
||||
> .diagonal {
|
||||
background: black !important;
|
||||
}
|
||||
}
|
||||
}
|
@ -1 +1,2 @@
|
||||
//= require less/pgn4web
|
||||
//= require less/table
|
||||
|
@ -35,6 +35,10 @@
|
||||
{% javascript bootstrap %}
|
||||
{% javascript holder %}
|
||||
|
||||
<!-- Tablesorter jQuery plugin -->
|
||||
{% javascript jquery.tablesorter %}
|
||||
{% javascript jquery.metadata %}
|
||||
|
||||
<!-- Custom JavaScript based on Bootstrap and jQuery -->
|
||||
{% javascript custom %}
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user