Improve the look of tournament tables, using the last version of tablesorter.
This commit is contained in:
parent
e62f314ad0
commit
ae01cf4d3e
@ -13,7 +13,10 @@ $(function() {
|
||||
/* Sort a tournament table with tablesorter */
|
||||
$('.tablesorter .opponent').addClass('{sorter: false}');
|
||||
$('.tablesorter').tablesorter({
|
||||
widgets: ['zebra']
|
||||
theme : 'blue',
|
||||
widgets : ['zebra'],
|
||||
sortReset : true,
|
||||
sortRestart : true
|
||||
});
|
||||
})
|
||||
|
||||
|
@ -1 +1 @@
|
||||
../vendor/tablesorter/jquery.metadata.js
|
||||
../vendor/tablesorter/js/jquery.metadata.js
|
@ -1 +1 @@
|
||||
../vendor/tablesorter/jquery.tablesorter.js
|
||||
../vendor/tablesorter/js/jquery.tablesorter.js
|
30
_assets/stylesheets/less/table.custom.less
Normal file
30
_assets/stylesheets/less/table.custom.less
Normal file
@ -0,0 +1,30 @@
|
||||
/* Tournament table */
|
||||
|
||||
table.tournament {
|
||||
thead > tr > th, thead > tr > td,
|
||||
tfoot > tr > th, tfoot > tr > td,
|
||||
tbody > tr > th, tbody > tr > td {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
thead > tr > .opponent,
|
||||
tbody > tr > .score,
|
||||
tbody > tr > .diagonal {
|
||||
min-width: 21px;
|
||||
text-align: center;
|
||||
}
|
||||
tbody > tr > .diagonal {
|
||||
background: black !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Tablesorter */
|
||||
|
||||
/* Fix the background color of tfoot */
|
||||
.tablesorter-blue tfoot {
|
||||
.tablesorter-headerSortUp, .tablesorter-headerSortDown,
|
||||
.tablesorter-headerAsc, .tablesorter-headerDesc {
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
/* 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: 0;
|
||||
}
|
||||
|
||||
thead > tr > .opponent,
|
||||
tbody > tr > .score,
|
||||
tbody > tr > .diagonal {
|
||||
min-width: 21px;
|
||||
text-align: center;
|
||||
}
|
||||
tbody > tr > .diagonal {
|
||||
background: black !important;
|
||||
}
|
||||
}
|
1
_assets/stylesheets/less/theme.blue.less
Symbolic link
1
_assets/stylesheets/less/theme.blue.less
Symbolic link
@ -0,0 +1 @@
|
||||
../../vendor/tablesorter/css/theme.blue.css
|
2
_assets/stylesheets/table.css.less
Normal file
2
_assets/stylesheets/table.css.less
Normal file
@ -0,0 +1,2 @@
|
||||
//= require less/theme.blue
|
||||
//= require less/table.custom
|
@ -1,2 +1 @@
|
||||
//= require less/pgn4web
|
||||
//= require less/table
|
||||
|
@ -8,6 +8,7 @@ layout: default
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12">
|
||||
{% stylesheet table %}
|
||||
{% assign table = page.url | remove_first: '/' | append: 'table.html' %}
|
||||
{% include {{table}} %}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user