Add the game layout with a pgn4web chess board.
This commit is contained in:
24
_assets/javascripts/custom.js
Normal file
24
_assets/javascripts/custom.js
Normal file
@@ -0,0 +1,24 @@
|
||||
/* Fix the position of chess board while scrolling */
|
||||
$(function() {
|
||||
if (obj = $('#GameWrapper')) {
|
||||
obj.affix({
|
||||
offset: {
|
||||
top: function () {
|
||||
return obj.parent().offset().top;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
/* Stylize pgn4web elements by Bootstrap */
|
||||
function customFunctionOnPgnGameLoad() {
|
||||
$('#GameSelSelect').addClass('form-control');
|
||||
$('#autoplayButton').click(refreshButtonset);
|
||||
}
|
||||
function customFunctionOnMove() {
|
||||
refreshButtonset();
|
||||
}
|
||||
function refreshButtonset() {
|
||||
$('#GameButtons input').addClass('btn btn-default');
|
||||
}
|
1
_assets/javascripts/pgn4web.js
Symbolic link
1
_assets/javascripts/pgn4web.js
Symbolic link
@@ -0,0 +1 @@
|
||||
../vendor/pgn4web/pgn4web.js
|
Reference in New Issue
Block a user