make all boards look good and alike
|
@ -30,7 +30,7 @@
|
|||
(new js/ChessBoard "chessboard"
|
||||
(clj->js (merge {:sparePieces false
|
||||
:showNotation false
|
||||
:pieceTheme (str static-domain "/assets/images/chessboard/{piece}.png")}
|
||||
:pieceTheme (str static-domain "/assets/images/piece/{piece}.svg")}
|
||||
config)))))
|
||||
|
||||
(defn board-marks! [$puzzle]
|
||||
|
|
|
@ -5,7 +5,6 @@ net.domain = "l.org"
|
|||
|
||||
# Use local artificial intelligence
|
||||
ai {
|
||||
server = false
|
||||
client = false
|
||||
stockfish {
|
||||
debug = false
|
||||
|
|
4
public/images/piece/clear.svg
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
|
||||
viewBox="0 0 500 500" width="500" height="500" id="clear_svg">
|
||||
</svg>
|
After Width: | Height: | Size: 183 B |
|
@ -2558,16 +2558,14 @@ var storage = {
|
|||
// required to match e2e4 and highlight the moves on the board
|
||||
chessMovesRegExp = new RegExp("((\\d+(\\.{1,3}|\\s)\\s*)?((([KQRBN][a-h1-8]?)|[a-h])?x?[a-h][1-8](=[QRNB])?|O-O-O|O-O)[!?+#]*)", "g");
|
||||
|
||||
SetImagePath('http://' + document.domain.replace(/^\w+/, 'static') + "/assets/vendor/pgn4web/lichess/64"); // use "" path if images are in the same folder as this javascript file
|
||||
SetImageType("png");
|
||||
SetImagePath('http://' + document.domain.replace(/^\w+/, 'static') + "/assets/images/piece");
|
||||
SetImageType("svg");
|
||||
SetShortcutKeysEnabled(true);
|
||||
$('input').on('focus', function() {
|
||||
SetShortcutKeysEnabled(false);
|
||||
}).on('blur', function() {
|
||||
SetShortcutKeysEnabled(true);
|
||||
});
|
||||
clearShortcutSquares("BCDEFGH", "12345678");
|
||||
clearShortcutSquares("A", "1234567");
|
||||
var $game = $("#GameBoard");
|
||||
$game.mousewheel(function(event) {
|
||||
if (event.deltaY == -1) {
|
||||
|
|
|
@ -107,11 +107,11 @@ div.fen_pgn textarea {
|
|||
|
||||
#GameBoard {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#GameBoard table.boardTable {
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
#GameBoard.flip table, #GameBoard.flip img.pieceImage {
|
||||
-o-transform: rotate(180deg);
|
||||
-webkit-transform: rotate(180deg);
|
||||
|
@ -119,14 +119,6 @@ div.fen_pgn textarea {
|
|||
-ms-transform: rotate(180deg);
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
#GameBoard td.highlightWhiteSquare img,
|
||||
#GameBoard td.highlightBlackSquare img {
|
||||
background: url(../images/over5.png) no-repeat;
|
||||
}
|
||||
#GameBoard td img.bestmove {
|
||||
background: url(../images/sover.png) no-repeat;
|
||||
background-position: 0 -64px;
|
||||
}
|
||||
#GameBoard td img {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
|
|
|
@ -68,37 +68,13 @@ body.canvas #chessboard .board-b72b1,
|
|||
#top div.color_demo.canvas {
|
||||
background-image: url(../images/board/canvas.jpg);
|
||||
}
|
||||
#GameBoard {
|
||||
background-position: 1px 1px;
|
||||
}
|
||||
div.lcsi {
|
||||
position: absolute;
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
background: url(../images/sover.png) top left no-repeat;
|
||||
background-position: 0 -320px;
|
||||
}
|
||||
div.lcs.moved div.lcsi {
|
||||
background-position: 0 -192px;
|
||||
}
|
||||
div.lcs.check div.lcsi {
|
||||
background-position: 0 -256px;
|
||||
}
|
||||
div.lcs.premoved div.lcsi {
|
||||
background-position: 0 -64px !important;
|
||||
}
|
||||
div.my_turn.not_spectator div.lcs:hover div.lcsi {
|
||||
background-position: 0 0px;
|
||||
}
|
||||
div.lcs.droppable-hover div.lcsi {
|
||||
background-position: 0 -64px !important;
|
||||
}
|
||||
div.lichess_board div.lcs.selected div.lcsi,
|
||||
div.lichess_board div.lcs.selectable div.lcsi {
|
||||
background-position: 0 -64px !important;
|
||||
cursor: pointer;
|
||||
}
|
||||
div.lichess_board div.lcs.selectable div.lichess_piece {
|
||||
cursor: pointer;
|
||||
}
|
||||
div.lichess_piece {
|
||||
|
@ -626,15 +602,32 @@ div.replay_and_analyse a {
|
|||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
#chessboard div.last {
|
||||
background: url(../images/over5.png);
|
||||
#chessboard div.last,
|
||||
#GameBoard td.highlightWhiteSquare,
|
||||
#GameBoard td.highlightBlackSquare,
|
||||
div.lcs.moved div.lcsi {
|
||||
box-shadow: inset 0 0 2px 3px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
#chessboard div.check {
|
||||
background: url(../images/sover.png) 0 -256px;
|
||||
#chessboard div.check,
|
||||
div.lcs.check div.lcsi {
|
||||
background: -moz-radial-gradient(center, ellipse cover, rgba(255, 0, 0, 1) 0%, rgba(231, 0, 0, 1) 25%, rgba(169, 0, 0, 0) 89%, rgba(158, 0, 0, 0) 100%);
|
||||
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, rgba(255, 0, 0, 1)), color-stop(25%, rgba(231, 0, 0, 1)), color-stop(89%, rgba(169, 0, 0, 0)), color-stop(100%, rgba(158, 0, 0, 0)));
|
||||
background: -webkit-radial-gradient(center, ellipse cover, rgba(255, 0, 0, 1) 0%, rgba(231, 0, 0, 1) 25%, rgba(169, 0, 0, 0) 89%, rgba(158, 0, 0, 0) 100%);
|
||||
background: -o-radial-gradient(center, ellipse cover, rgba(255, 0, 0, 1) 0%, rgba(231, 0, 0, 1) 25%, rgba(169, 0, 0, 0) 89%, rgba(158, 0, 0, 0) 100%);
|
||||
background: -ms-radial-gradient(center, ellipse cover, rgba(255, 0, 0, 1) 0%, rgba(231, 0, 0, 1) 25%, rgba(169, 0, 0, 0) 89%, rgba(158, 0, 0, 0) 100%);
|
||||
background: radial-gradient(ellipse at center, rgba(255, 0, 0, 1) 0%, rgba(231, 0, 0, 1) 25%, rgba(169, 0, 0, 0) 89%, rgba(158, 0, 0, 0) 100%);
|
||||
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#009e0000', GradientType=1);
|
||||
}
|
||||
#chessboard div.highlight2-9c5d2 {
|
||||
background: url(../images/sover.png) 0 -64px;
|
||||
#chessboard div.square-55d63:hover,
|
||||
#chessboard div.highlight2-9c5d2,
|
||||
div.my_turn div.lcs:hover div.lcsi,
|
||||
div.lcs.premoved div.lcsi,
|
||||
div.lcs.droppable-hover div.lcsi,
|
||||
div.lichess_board div.lcs.selected div.lcsi,
|
||||
div.lichess_board div.lcs.selectable div.lcsi,
|
||||
#GameBoard td img.bestmove {
|
||||
box-shadow: inset 0 0 0px 3px rgba(216, 85, 0, 1);
|
||||
}
|
||||
#chessboard div.square-55d63:hover {
|
||||
background: url(../images/sover.png) 0 0;
|
||||
div.my_turn.not_spectator div.lcs:hover div.lcsi {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
|
|
@ -441,8 +441,14 @@ ul.ui-autocomplete li a.ui-state-focus {
|
|||
body {
|
||||
font: 12px'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, Sans-Serif;
|
||||
color: #848484;
|
||||
background: #F7F7F7;
|
||||
background-image: linear-gradient(to bottom, #d7d7d7 0%, #f7f7f7 6%);
|
||||
background: #d7d7d7;
|
||||
background: -moz-linear-gradient(top, #d7d7d7 0%, #f7f7f7 6%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #d7d7d7), color-stop(6%, #f7f7f7));
|
||||
background: -webkit-linear-gradient(top, #d7d7d7 0%, #f7f7f7 6%);
|
||||
background: -o-linear-gradient(top, #d7d7d7 0%, #f7f7f7 6%);
|
||||
background: -ms-linear-gradient(top, #d7d7d7 0%, #f7f7f7 6%);
|
||||
background: linear-gradient(to bottom, #d7d7d7 0%, #f7f7f7 6%);
|
||||
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#d7d7d7', endColorstr='#f7f7f7', GradientType=0);
|
||||
}
|
||||
a,
|
||||
a:visited {
|
||||
|
|
|
@ -1,38 +1,150 @@
|
|||
body.dark {
|
||||
background: #1a1a1a;
|
||||
background-image: linear-gradient(to bottom, #303030 0%, #1a1a1a 6%);
|
||||
background: #303030;
|
||||
background: -moz-linear-gradient(top, #303030 0%, #1a1a1a 6%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #303030), color-stop(6%, #1a1a1a));
|
||||
background: -webkit-linear-gradient(top, #303030 0%, #1a1a1a 6%);
|
||||
background: -o-linear-gradient(top, #303030 0%, #1a1a1a 6%);
|
||||
background: -ms-linear-gradient(top, #303030 0%, #1a1a1a 6%);
|
||||
background: linear-gradient(to bottom, #303030 0%, #1a1a1a 6%);
|
||||
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#303030', endColorstr='#1a1a1a', GradientType=0);
|
||||
color: #8a8a8a;
|
||||
}
|
||||
body.dark a, body.dark a:visited, body.dark #powerTip > .actions a, body.dark .button {
|
||||
body.dark a,
|
||||
body.dark a:visited,
|
||||
body.dark #powerTip > .actions a,
|
||||
body.dark .button {
|
||||
color: #8a8a8a;
|
||||
}
|
||||
body.dark input, body.dark textarea, body.dark div.analysis_menu > a.active {
|
||||
body.dark input,
|
||||
body.dark textarea,
|
||||
body.dark div.analysis_menu > a.active {
|
||||
background: #1a1a1a;
|
||||
color: #8a8a8a;
|
||||
}
|
||||
body.dark div.analysis_menu > a.active {
|
||||
border-bottom-color: #1a1a1a;
|
||||
}
|
||||
body.dark #reconnecting, body.dark #chessboard .board-b72b1, body.dark .mini_board, body.dark #nb_connected_players, body.dark div.lichess_chat_top, body.dark div.lichess_chat .lichess_messages, body.dark div.undertable_top, body.dark div.undertable_inner, body.dark div.undertable td, body.dark div.lichess_table .lichess_button, body.dark div.lichess_chat form input, body.dark div.lichess_board_wrap, body.dark #translation_call, body.dark div.footer_wrap, body.dark div.game_config .optional_config, body.dark .ui-state-default, body.dark .ui-widget-content, body.dark div.lichess_goodies div.box, body.dark #puzzle div.box, body.dark #puzzle h1, body.dark div.lichess_table, body.dark div.lichess_separator, body.dark div.clock, body.dark .button, body.dark #GameText, body.dark #tournament_side, body.dark #GameBoard table.boardTable, body.dark div.shortcuts .title, body.dark div.content_box, body.dark div.content_box_top, body.dark div.content_box_top a, body.dark div.content_box_inter, body.dark div.content_box_inter a.active, body.dark #site_header div.side_menu a.active, body.dark div.game_row, body.dark form.search_user_form input, body.dark div.user_show div.boxed_data, body.dark #lichess_forum div.post, body.dark #lichess_forum textarea, body.dark #lichess_forum form.wide input, body.dark #lichess_message tr, body.dark #lichess_message div.thread_message, body.dark #lichess_message textarea, body.dark #lichess_message input, body.dark .content_box form input, body.dark div.progressbar, body.dark form.translation_form div.messages, body.dark form.translation_form input, body.dark div.locale_menu a, body.dark #adv_chart, body.dark #top .dropdown, body.dark div.search_status, body.dark table.slist, body.dark table.slist thead th, body.dark #notifications > div, body.dark form.wide input[type="text"], body.dark form.wide textarea, body.dark #team .team-left, body.dark #team .team-right, body.dark #team h2, body.dark .leaderboard_title, body.dark #friend_box, body.dark #friend_box .title, body.dark div.user_show div.mod_zone, body.dark div.user_show div.user-infos, body.dark div.game_config input[type="text"], body.dark #powerTip, body.dark #powerTip > .title, body.dark #powerTip > .actions a, body.dark #hooks_table th, body.dark #hooks_table td, body.dark #hooks_wrap > div.tabs > a, body.dark #hooks_chart > div.grid, body.dark div.analysis_menu, body.dark div.analysis_menu > a {
|
||||
body.dark #reconnecting,
|
||||
body.dark #chessboard .board-b72b1,
|
||||
body.dark .mini_board,
|
||||
body.dark #nb_connected_players,
|
||||
body.dark div.lichess_chat_top,
|
||||
body.dark div.lichess_chat .lichess_messages,
|
||||
body.dark div.undertable_top,
|
||||
body.dark div.undertable_inner,
|
||||
body.dark div.undertable td,
|
||||
body.dark div.lichess_table .lichess_button,
|
||||
body.dark div.lichess_chat form input,
|
||||
body.dark div.lichess_board_wrap,
|
||||
body.dark #translation_call,
|
||||
body.dark div.footer_wrap,
|
||||
body.dark div.game_config .optional_config,
|
||||
body.dark .ui-state-default,
|
||||
body.dark .ui-widget-content,
|
||||
body.dark div.lichess_goodies div.box,
|
||||
body.dark #puzzle div.box,
|
||||
body.dark #puzzle h1,
|
||||
body.dark div.lichess_table,
|
||||
body.dark div.lichess_separator,
|
||||
body.dark div.clock,
|
||||
body.dark .button,
|
||||
body.dark #GameText,
|
||||
body.dark #tournament_side,
|
||||
body.dark #GameBoard table.boardTable,
|
||||
body.dark div.shortcuts .title,
|
||||
body.dark div.content_box,
|
||||
body.dark div.content_box_top,
|
||||
body.dark div.content_box_top a,
|
||||
body.dark div.content_box_inter,
|
||||
body.dark div.content_box_inter a.active,
|
||||
body.dark #site_header div.side_menu a.active,
|
||||
body.dark div.game_row,
|
||||
body.dark form.search_user_form input,
|
||||
body.dark div.user_show div.boxed_data,
|
||||
body.dark #lichess_forum div.post,
|
||||
body.dark #lichess_forum textarea,
|
||||
body.dark #lichess_forum form.wide input,
|
||||
body.dark #lichess_message tr,
|
||||
body.dark #lichess_message div.thread_message,
|
||||
body.dark #lichess_message textarea,
|
||||
body.dark #lichess_message input,
|
||||
body.dark .content_box form input,
|
||||
body.dark div.progressbar,
|
||||
body.dark form.translation_form div.messages,
|
||||
body.dark form.translation_form input,
|
||||
body.dark div.locale_menu a,
|
||||
body.dark #adv_chart,
|
||||
body.dark #top .dropdown,
|
||||
body.dark div.search_status,
|
||||
body.dark table.slist,
|
||||
body.dark table.slist thead th,
|
||||
body.dark #notifications > div,
|
||||
body.dark form.wide input[type="text"],
|
||||
body.dark form.wide textarea,
|
||||
body.dark #team .team-left,
|
||||
body.dark #team .team-right,
|
||||
body.dark #team h2,
|
||||
body.dark .leaderboard_title,
|
||||
body.dark #friend_box,
|
||||
body.dark #friend_box .title,
|
||||
body.dark div.user_show div.mod_zone,
|
||||
body.dark div.user_show div.user-infos,
|
||||
body.dark div.game_config input[type="text"],
|
||||
body.dark #powerTip,
|
||||
body.dark #powerTip > .title,
|
||||
body.dark #powerTip > .actions a,
|
||||
body.dark #hooks_table th,
|
||||
body.dark #hooks_table td,
|
||||
body.dark #hooks_wrap > div.tabs > a,
|
||||
body.dark #hooks_chart > div.grid,
|
||||
body.dark div.analysis_menu,
|
||||
body.dark div.analysis_menu > a {
|
||||
border-color: #3d3d3d;
|
||||
}
|
||||
body.dark #timeline, body.dark #timeline > .entry {
|
||||
body.dark #timeline,
|
||||
body.dark #timeline > .entry {
|
||||
border-color: #303030;
|
||||
}
|
||||
body.dark .ui-slider, body.dark div.progressbar, body.dark #translation_call div.progressbar, body.dark #top div.themepicker.shown div.theme:hover {
|
||||
body.dark .ui-slider,
|
||||
body.dark div.progressbar,
|
||||
body.dark #translation_call div.progressbar,
|
||||
body.dark #top div.themepicker.shown div.theme:hover {
|
||||
background-color: #505050;
|
||||
}
|
||||
body.dark #hooks_wrap > div.tabs > a, body.dark #top div.auth .links a:hover, body.dark #top ul.language_links a:hover, body.dark #top ul.language_links a.current {
|
||||
body.dark #hooks_wrap > div.tabs > a,
|
||||
body.dark #top div.auth .links a:hover,
|
||||
body.dark #top ul.language_links a:hover,
|
||||
body.dark #top ul.language_links a.current {
|
||||
background-color: #3e3e3e;
|
||||
color: #b0b0b0;
|
||||
}
|
||||
body.dark #notifications > div, body.dark #top a.signin, body.dark #top a.toggle:hover, body.dark #top .dropdown, body.dark #top a.goto_nav.current, body.dark #top a.goto_nav:hover, body.dark #top ul.language_links a.accepted {
|
||||
body.dark #notifications > div,
|
||||
body.dark #top a.signin,
|
||||
body.dark #top a.toggle:hover,
|
||||
body.dark #top .dropdown,
|
||||
body.dark #top a.goto_nav.current,
|
||||
body.dark #top a.goto_nav:hover,
|
||||
body.dark #top ul.language_links a.accepted {
|
||||
color: #b0b0b0;
|
||||
}
|
||||
body.dark #top .dropdown, body.dark #top .shown a.toggle, body.dark div.analysis_menu > a {
|
||||
body.dark #top .dropdown,
|
||||
body.dark #top .shown a.toggle,
|
||||
body.dark div.analysis_menu > a {
|
||||
background: #2a2a2a;
|
||||
}
|
||||
body.dark #site_title, body.dark #timeline a, body.dark #site_baseline, body.dark div.lichess_chat span, body.dark div.lichess_chat a.user_link, body.dark div.lichess_chat a.user_link, body.dark div.new_posts li span, body.dark #team .forum a.user_link, body.dark span.board_mark, body.dark div.user_show div.content_box_top > span, body.dark #timeline time, body.dark span.progress > .zero, body.dark div.undertable_top span.title {
|
||||
body.dark #site_title,
|
||||
body.dark #timeline a,
|
||||
body.dark #site_baseline,
|
||||
body.dark div.lichess_chat span,
|
||||
body.dark div.lichess_chat a.user_link,
|
||||
body.dark div.lichess_chat a.user_link,
|
||||
body.dark div.new_posts li span,
|
||||
body.dark #team .forum a.user_link,
|
||||
body.dark span.board_mark,
|
||||
body.dark div.user_show div.content_box_top > span,
|
||||
body.dark #timeline time,
|
||||
body.dark span.progress > .zero,
|
||||
body.dark div.undertable_top span.title {
|
||||
color: #777;
|
||||
}
|
||||
body.dark span.progress > .negative {
|
||||
|
@ -41,13 +153,23 @@ body.dark span.progress > .negative {
|
|||
body.dark span.progress > .positive {
|
||||
color: #308030;
|
||||
}
|
||||
body.dark #site_title span.extension, body.dark div.sub_ratings h3 {
|
||||
body.dark #site_title span.extension,
|
||||
body.dark div.sub_ratings h3 {
|
||||
color: #606060;
|
||||
}
|
||||
body.dark #GameText a:hover, body.dark #hooks_wrap a.filter:hover, body.dark #hooks_wrap a.filter.active {
|
||||
body.dark #GameText a:hover,
|
||||
body.dark #hooks_wrap a.filter:hover,
|
||||
body.dark #hooks_wrap a.filter.active {
|
||||
background: #000;
|
||||
}
|
||||
body.dark div.lichess_chat .lichess_messages, body.dark div.undertable_inner, body.dark div.lichess_goodies div.box, body.dark div.undertable td, body.dark div.lichess_table, body.dark div.lichess_table_wrap div.clock, body.dark #friend_box .content a:hover, body.dark div.footer_wrap {
|
||||
body.dark div.lichess_chat .lichess_messages,
|
||||
body.dark div.undertable_inner,
|
||||
body.dark div.lichess_goodies div.box,
|
||||
body.dark div.undertable td,
|
||||
body.dark div.lichess_table,
|
||||
body.dark div.lichess_table_wrap div.clock,
|
||||
body.dark #friend_box .content a:hover,
|
||||
body.dark div.footer_wrap {
|
||||
background: #242424;
|
||||
}
|
||||
body.dark #hooks_table tr:nth-child(even) td {
|
||||
|
@ -71,7 +193,10 @@ body.dark #hook_filter td > label {
|
|||
body.dark #hook_filter td > label.hover:hover {
|
||||
background: #000;
|
||||
}
|
||||
body.dark div.undertable tr:nth-child(even) td, body.dark #hooks_wrap, body.dark #hooks_wrap > div.tabs > a:hover, body.dark #hooks_wrap > div.tabs > a.active {
|
||||
body.dark div.undertable tr:nth-child(even) td,
|
||||
body.dark #hooks_wrap,
|
||||
body.dark #hooks_wrap > div.tabs > a:hover,
|
||||
body.dark #hooks_wrap > div.tabs > a.active {
|
||||
background: #303030;
|
||||
}
|
||||
body.dark div.lichess_overboard {
|
||||
|
@ -84,17 +209,38 @@ body.dark div.lichess_table_not_started {
|
|||
box-shadow: none;
|
||||
background: none;
|
||||
}
|
||||
body.dark div.lichess_table a.lichess_button:hover, body.dark div.lichess_table a.lichess_button.active {
|
||||
body.dark div.lichess_table a.lichess_button:hover,
|
||||
body.dark div.lichess_table a.lichess_button.active {
|
||||
border: 1px solid #d85000;
|
||||
}
|
||||
body.dark div.content_box, body.dark div.content_box_inter a.active, body.dark #GameText, body.dark #tournament_side, body.dark table.translations tbody tr, body.dark form.translation_form div.message, body.dark div.content_box_inter a.intertab:hover {
|
||||
body.dark div.content_box,
|
||||
body.dark div.content_box_inter a.active,
|
||||
body.dark #GameText,
|
||||
body.dark #tournament_side,
|
||||
body.dark table.translations tbody tr,
|
||||
body.dark form.translation_form div.message,
|
||||
body.dark div.content_box_inter a.intertab:hover {
|
||||
background: #2b2b2b;
|
||||
}
|
||||
body.dark #site_header div.side_menu a.active {
|
||||
background: #2b2b2b;
|
||||
box-shadow: -3px 0 5px #505050;
|
||||
}
|
||||
body.dark div.game_row:nth-child(odd), body.dark #lichess_forum table.forum_table tr:nth-child(odd), body.dark #lichess_message tr:nth-child(even), body.dark div.user_show div.boxed_data, body.dark div.content_box_inter, body.dark #GameText tr:nth-child(even), body.dark table.slist tbody tr:nth-child(even), body.dark #team .forum li:nth-child(odd), body.dark table.translations tbody tr:nth-child(odd), body.dark form.translation_form div.message:nth-child(even), body.dark div.content_box table.datatable tr:nth-child(odd), body.dark div.game_config .optional_config, body.dark div.search_status, body.dark #friend_box, body.dark #powerTip {
|
||||
body.dark div.game_row:nth-child(odd),
|
||||
body.dark #lichess_forum table.forum_table tr:nth-child(odd),
|
||||
body.dark #lichess_message tr:nth-child(even),
|
||||
body.dark div.user_show div.boxed_data,
|
||||
body.dark div.content_box_inter,
|
||||
body.dark #GameText tr:nth-child(even),
|
||||
body.dark table.slist tbody tr:nth-child(even),
|
||||
body.dark #team .forum li:nth-child(odd),
|
||||
body.dark table.translations tbody tr:nth-child(odd),
|
||||
body.dark form.translation_form div.message:nth-child(even),
|
||||
body.dark div.content_box table.datatable tr:nth-child(odd),
|
||||
body.dark div.game_config .optional_config,
|
||||
body.dark div.search_status,
|
||||
body.dark #friend_box,
|
||||
body.dark #powerTip {
|
||||
background: #343434;
|
||||
}
|
||||
body.dark #lichess_forum table.forum_table thead tr:nth-child(odd) {
|
||||
|
@ -103,7 +249,12 @@ body.dark #lichess_forum table.forum_table thead tr:nth-child(odd) {
|
|||
body.dark #lichess_forum table.forum_table td.subject a {
|
||||
color: #44a0b0;
|
||||
}
|
||||
body.dark #lichess_forum div.post .message, body.dark #lichess_message div.thread_message div.thread_message_body, body.dark #GameText .move, body.dark form.translation_form div.message label, body.dark div.content_box h1, body.dark div.user_show div.content_box_top > span strong {
|
||||
body.dark #lichess_forum div.post .message,
|
||||
body.dark #lichess_message div.thread_message div.thread_message_body,
|
||||
body.dark #GameText .move,
|
||||
body.dark form.translation_form div.message label,
|
||||
body.dark div.content_box h1,
|
||||
body.dark div.user_show div.content_box_top > span strong {
|
||||
color: #b0b0b0;
|
||||
}
|
||||
body.dark div.lmcs.white {
|
||||
|
@ -164,12 +315,26 @@ body.dark div.lichess_table_wrap div.clock.running {
|
|||
background: #505a60;
|
||||
color: #fff;
|
||||
}
|
||||
body.dark div.lichess_table_wrap div.clock.running.emerg, body.dark div.lichess_table_wrap div.clock.outoftime {
|
||||
body.dark div.lichess_table_wrap div.clock.running.emerg,
|
||||
body.dark div.lichess_table_wrap div.clock.outoftime {
|
||||
background-color: #a00000;
|
||||
color: #d0d0d0;
|
||||
}
|
||||
/* soft inactive gradient */
|
||||
body.dark #top a.signin, body.dark #powerTip > .actions a, body.dark div.lichess_chat_top, body.dark #friend_box .title, body.dark div.undertable_top, body.dark .button, body.dark .button:visited, body.dark .ui-state-default, body.dark div.content_box_top, body.dark #translation_call, body.dark #notifications > div, body.dark div.locale_menu a, body.dark table.slist thead {
|
||||
|
||||
body.dark #top a.signin,
|
||||
body.dark #powerTip > .actions a,
|
||||
body.dark div.lichess_chat_top,
|
||||
body.dark #friend_box .title,
|
||||
body.dark div.undertable_top,
|
||||
body.dark .button,
|
||||
body.dark .button:visited,
|
||||
body.dark .ui-state-default,
|
||||
body.dark div.content_box_top,
|
||||
body.dark #translation_call,
|
||||
body.dark #notifications > div,
|
||||
body.dark div.locale_menu a,
|
||||
body.dark table.slist thead {
|
||||
background: #2a2a2a;
|
||||
background: linear-gradient(to bottom, #2a2a2a, #202020);
|
||||
}
|
||||
|
@ -206,16 +371,15 @@ body.dark #puzzle > .right .please_vote {
|
|||
background: #103410;
|
||||
color: #74a962;
|
||||
}
|
||||
|
||||
body.dark ::-webkit-input-placeholder {
|
||||
body.dark::-webkit-input-placeholder {
|
||||
color: #666;
|
||||
}
|
||||
body.dark :-moz-placeholder {
|
||||
body.dark:-moz-placeholder {
|
||||
color: #666;
|
||||
}
|
||||
body.dark ::-moz-placeholder {
|
||||
body.dark::-moz-placeholder {
|
||||
color: #666;
|
||||
}
|
||||
body.dark :-ms-input-placeholder {
|
||||
body.dark:-ms-input-placeholder {
|
||||
color: #666;
|
||||
}
|
||||
|
|
BIN
public/vendor/pgn4web/lichess/64/bb.png
vendored
Before Width: | Height: | Size: 950 B |
BIN
public/vendor/pgn4web/lichess/64/bk.png
vendored
Before Width: | Height: | Size: 1.5 KiB |
BIN
public/vendor/pgn4web/lichess/64/bn.png
vendored
Before Width: | Height: | Size: 1.1 KiB |
BIN
public/vendor/pgn4web/lichess/64/bp.png
vendored
Before Width: | Height: | Size: 685 B |
BIN
public/vendor/pgn4web/lichess/64/bq.png
vendored
Before Width: | Height: | Size: 1.5 KiB |
BIN
public/vendor/pgn4web/lichess/64/br.png
vendored
Before Width: | Height: | Size: 597 B |
BIN
public/vendor/pgn4web/lichess/64/clear.png
vendored
Before Width: | Height: | Size: 245 B |
BIN
public/vendor/pgn4web/lichess/64/wb.png
vendored
Before Width: | Height: | Size: 1.2 KiB |
BIN
public/vendor/pgn4web/lichess/64/wk.png
vendored
Before Width: | Height: | Size: 1.4 KiB |
BIN
public/vendor/pgn4web/lichess/64/wn.png
vendored
Before Width: | Height: | Size: 1.2 KiB |
BIN
public/vendor/pgn4web/lichess/64/wp.png
vendored
Before Width: | Height: | Size: 862 B |
BIN
public/vendor/pgn4web/lichess/64/wq.png
vendored
Before Width: | Height: | Size: 1.8 KiB |
BIN
public/vendor/pgn4web/lichess/64/wr.png
vendored
Before Width: | Height: | Size: 714 B |
26
public/vendor/pgn4web/pgn4web-compacted.js
vendored
|
@ -1,4 +1,4 @@
|
|||
var pgn4web_version="2.79",pgn4web_project_url="http://pgn4web.casaschi.net",pgn4web_project_author="Paolo Casaschi",pgn4web_project_email;"undefined"==typeof pgn4web_project_email&&(pgn4web_project_email="pgn4web@casaschi.net");var helpWin;function displayHelp(a){helpWin&&!helpWin.closed&&helpWin.close();(helpWin=window.open(detectHelpLocation()+(a?"?"+a:""),"pgn4web_help","resizable=yes,scrollbars=yes,toolbar=no,location=no,menubar=no,status=no"))&&window.focus&&helpWin.focus()}
|
||||
var pgn4web_version="2.80",pgn4web_project_url="http://pgn4web.casaschi.net",pgn4web_project_author="Paolo Casaschi",pgn4web_project_email;"undefined"==typeof pgn4web_project_email&&(pgn4web_project_email="pgn4web@casaschi.net");var helpWin;function displayHelp(a){helpWin&&!helpWin.closed&&helpWin.close();(helpWin=window.open(detectHelpLocation()+(a?"?"+a:""),"pgn4web_help","resizable=yes,scrollbars=yes,toolbar=no,location=no,menubar=no,status=no"))&&window.focus&&helpWin.focus()}
|
||||
function customFunctionOnPgnTextLoad(){}function customFunctionOnPgnGameLoad(){}function customFunctionOnMove(){}function customFunctionOnAlert(a){}function customFunctionOnCheckLiveBroadcastStatus(){}function customPgnHeaderTag(a,b,c){var d,e="";a=a.replace(/\W+/g,"");void 0===c&&(c=currentGame);pgnHeader[c]&&(d=pgnHeader[c].match("\\[\\s*"+a+'\\s*"([^"]+)"\\s*\\]'))&&(e=d[1]);b&&(a=document.getElementById(b))&&"string"==typeof a.innerHTML&&(a.innerHTML=e);return e}
|
||||
function customPgnCommentTag(a,b,c,d){var e,f="",g;a=a.replace(/\W+/g,"");"undefined"==typeof d&&(d=0);"undefined"==typeof c&&(c=CurrentPly);MoveCommentsVar[d][c]&&(e=MoveCommentsVar[d][c].match("\\[%"+a+'\\s+((?:,?(?:"[^"]*"|[^,\\]]*))*)\\s*\\]'))&&(f=e[1].replace(/\s+$/,""));b&&(g=document.getElementById(b))&&"string"==typeof g.innerHTML&&(g.innerHTML=f);return f}function simpleAddEvent(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)}
|
||||
simpleAddEvent(document,"keydown",pgn4web_handleKey_event);simpleAddEvent(window,"load",pgn4web_onload_event);function pgn4web_onload_event(a){pgn4web_onload(a)}function pgn4web_onload(a){start_pgn4web()}function start_pgn4web(){alertFirstResetLoadingPgn?alertFirstResetLoadingPgn=!1:resetAlert();InitImages();createBoard();0<LiveBroadcastDelay&&restartLiveBroadcastTimeout();pgn4web_initTouchEvents()}
|
||||
|
@ -128,7 +128,7 @@ d;){if(isNaN(d)){myAlertFEN(a,"invalid halfmove clock");break}InitialHalfMoveClo
|
|||
0;HistVar[StartPly]=0}}}
|
||||
function assumedCastleRights(){var a,b="";if(0===PieceRow[0][0]&&4===PieceCol[0][0])for(a=0;a<PieceType[0].length;a++)3===PieceType[0][a]&&0===PieceRow[0][a]&&7===PieceCol[0][a]&&(b+=FenPieceName.charAt(0).toUpperCase()),3===PieceType[0][a]&&0===PieceRow[0][a]&&0===PieceCol[0][a]&&(b+=FenPieceName.charAt(1).toUpperCase());if(7===PieceRow[1][0]&&4===PieceCol[1][0])for(a=0;a<PieceType[1].length;a++)3===PieceType[1][a]&&7===PieceRow[1][a]&&7===PieceCol[1][a]&&(b+=FenPieceName.charAt(0).toLowerCase()),3===
|
||||
PieceType[1][a]&&7===PieceRow[1][a]&&0===PieceCol[1][a]&&(b+=FenPieceName.charAt(1).toLowerCase());return b||"-"}function SetImageType(a){imageType=a}
|
||||
function InitImages(){if(ImagePathOld!==ImagePath){0<ImagePath.length&&"/"!=ImagePath[ImagePath.length-1]&&(ImagePath+="/");ClearImg=new Image;ClearImg.src=ImagePath+"clear."+imageType;for(var a=["w","b"],b="kqrbnp".split(""),c=0;2>c;++c)for(var d=1;7>d;d++)PieceImg[c][d]=new Image,PieceImg[c][d].src=ImagePath+a[c]+b[d-1]+"."+imageType;ImagePathOld=ImagePath}}
|
||||
function InitImages(){if(ImagePathOld!==ImagePath){0<ImagePath.length&&"/"!=ImagePath[ImagePath.length-1]&&(ImagePath+="/");ClearImg=new Image;ClearImg.src=ImagePath+"clear."+imageType;for(var a=["w","b"],b="KQRBNP".split(""),c=0;2>c;++c)for(var d=1;7>d;d++)PieceImg[c][d]=new Image,PieceImg[c][d].src=ImagePath+a[c]+b[d-1]+"."+imageType;ImagePathOld=ImagePath}}
|
||||
function IsCheck(a,b,c){var d,e=2*c-1;if(1>=Math.abs(PieceCol[1-c][0]-a)&&1>=Math.abs(PieceRow[1-c][0]-b))return!0;for(c=-2;2>=c;c+=4)for(d=-1;1>=d;d+=2)if(SquareOnBoard(a+c,b+d)&&Board[a+c][b+d]==5*e||SquareOnBoard(a+d,b+c)&&Board[a+d][b+c]==5*e)return!0;for(c=-1;1>=c;c+=2)if(SquareOnBoard(a+c,b-e)&&Board[a+c][b-e]==6*e)return!0;for(c=-1;1>=c;++c)for(d=-1;1>=d;++d)if(0!==c||0!==d)for(var f=a+c,g=b+d,h=0;SquareOnBoard(f,g)&&0===h;)if(h=Board[f][g],0===h)f+=c,g+=d;else if(h==2*e||h==3*e&&(0===c||0===
|
||||
d)||h==4*e&&0!==c&&0!==d)return!0;return!1}function fixRegExp(a){return a.replace(/([\[\]\(\)\{\}\.\*\+\^\$\|\?\\])/g,"\\$1")}
|
||||
function LoadGameHeaders(){var a,b;gameEvent.length=gameSite.length=gameRound.length=gameDate.length=0;gameWhite.length=gameBlack.length=gameResult.length=0;gameSetUp.length=gameFEN.length=0;gameInitialWhiteClock.length=gameInitialBlackClock.length=0;gameVariant.length=0;for(a=pgnHeaderTagRegExpGlobal.lastIndex=0;a<numberOfGames;++a){var c=pgnHeader[a];gameEvent[a]=gameSite[a]=gameRound[a]=gameDate[a]="";gameWhite[a]=gameBlack[a]=gameResult[a]="";gameInitialWhiteClock[a]=gameInitialBlackClock[a]=
|
||||
|
@ -173,17 +173,17 @@ var clickedSquareInterval=null;function clickedSquare(a,b){if(!clickedSquareInte
|
|||
function gameNumberSearchPgn(a,b,c){lastSearchPgnExpression=a;if(""===a)return!1;var d=RegExp("[\n\r]","gm");a=RegExp(a,"im");var e=0>currentGame||currentGame>=numberOfGames?0:currentGame,f=fullPgnGame(e);if(c&&f.replace(d," ").match(a))return e;b=b?-1:1;for(c=(e+b+numberOfGames)%numberOfGames;c!=e;c=(c+b+numberOfGames)%numberOfGames)if(f=fullPgnGame(c),f.replace(d," ").match(a))return c;return!1}
|
||||
function searchPgnGame(a,b){"undefined"==typeof a&&(a="");lastSearchPgnExpression=a;var c=document.getElementById("searchPgnExpression");c&&(c.value=a);""===a||2>numberOfGames||(c=gameNumberSearchPgn(a,b,!1),!1!==c&&c!=currentGame&&Init(c))}function searchPgnGamePrompt(){if(2>numberOfGames)alert("info: search prompt disabled with less than 2 games");else{var a=prompt("Please enter search pattern for PGN games:",lastSearchPgnExpression);a&&searchPgnGame(a)}}
|
||||
function searchPgnGameForm(){document.getElementById("searchPgnExpression")&&searchPgnGame(document.getElementById("searchPgnExpression").value)}var chessMovesRegExp=RegExp("\\b((\\d+(\\.{1,3}|\\s)\\s*)?((([KQRBN][a-h1-8]?)|[a-h])?x?[a-h][1-8](=[QRNB])?|O-O-O|O-O)\\b[!?+#]*)","g");function fixCommentForDisplay(a){return a.replace(chessMovesRegExp,'<SPAN CLASS="commentMove">$1</SPAN>')}var tableSize=0,textSelectOptions="";
|
||||
function PrintHTML(){var a,b,c,d,e,f;if(d=document.getElementById("GameBoard")){c='<TABLE CLASS="boardTable" ID="boardTable" CELLSPACING=0 CELLPADDING=0'+(0<tableSize?' STYLE="width: '+tableSize+"px; height: "+tableSize+'px;">':">");for(a=0;8>a;++a){c+="<TR>";for(b=0;8>b;++b)e="tcol"+b+"trow"+a,f="img_"+e,c+=0===(a+b)%2?'<TD CLASS="whiteSquare" ID="'+e+'" BGCOLOR="#FFFFFF"':'<TD CLASS="blackSquare" ID="'+e+'" BGCOLOR="#D3D3D3"',c+=' ALIGN="center" VALIGN="middle" ONCLICK="clickedSquare('+a+","+b+
|
||||
')">',e=IsRotated?String.fromCharCode(72-b,49+a):String.fromCharCode(b+65,56-a),""!==boardTitle[b][a]&&(e+=": "+boardTitle[b][a]),c+='<IMG SRC="'+ClearImg.src+'" CLASS="pieceImage" STYLE="border: none; display: block; vertical-align: middle;" ONCLICK="boardOnClick['+b+"]["+a+'](this, event);" ID="'+f+'" TITLE="'+e+'" ONFOCUS="this.blur()" /></TD>';c+="</TR>"}d.innerHTML=c+"</TABLE>"}if(d=document.getElementById("boardTable"))tableSize=d.offsetWidth,0<tableSize&&(d.style.height=tableSize+"px");if(d=
|
||||
document.getElementById("GameButtons"))a=(tableSize-12)/5,c='<FORM NAME="GameButtonsForm" STYLE="display:inline;"><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0"><TR><TD><INPUT ID="startButton" TYPE="BUTTON" VALUE="<<" STYLE="',0<a&&(c+="width: "+a+"px;"),c+='"; CLASS="buttonControl" TITLE="go to game start" ID="btnGoToStart" onClick="clickedBbtn(this,event);" ONFOCUS="this.blur();"></TD><TD CLASS="buttonControlSpace" WIDTH="3"></TD><TD><INPUT ID="backButton" TYPE="BUTTON" VALUE="<" STYLE="',
|
||||
0<a&&(c+="width: "+a+"px;"),c+='"; CLASS="buttonControl" TITLE="move backward" ID="btnMoveBackward1" onClick="clickedBbtn(this,event);" ONFOCUS="this.blur();"></TD><TD CLASS="buttonControlSpace" WIDTH="3"></TD><TD>',c+='<INPUT ID="autoplayButton" TYPE="BUTTON" VALUE='+(isAutoPlayOn?"=":"+")+' STYLE="',0<a&&(c+="width: "+a+"px;"),c+=isAutoPlayOn?'"; CLASS="buttonControlStop" TITLE="toggle autoplay (stop)" ':'"; CLASS="buttonControlPlay" TITLE="toggle autoplay (start)" ',c+=' ID="btnPlay" NAME="AutoPlay" onClick="clickedBbtn(this,event);" ONFOCUS="this.blur();"></TD><TD CLASS="buttonControlSpace" WIDTH="3"></TD><TD><INPUT ID="forwardButton" TYPE="BUTTON" VALUE=">" STYLE="',
|
||||
0<a&&(c+="width: "+a+"px;"),c+='"; CLASS="buttonControl" TITLE="move forward" ID="btnMoveForward1" onClick="clickedBbtn(this,event);" ONFOCUS="this.blur();"></TD><TD CLASS="buttonControlSpace" WIDTH="3"></TD><TD><INPUT ID="endButton" TYPE="BUTTON" VALUE=">>" STYLE="',0<a&&(c+="width: "+a+"px;"),c+='"; CLASS="buttonControl" TITLE="go to game end" ID="btnGoToEnd" onClick="clickedBbtn(this,event);" ONFOCUS="this.blur();"></TD></TR></TABLE></FORM>',d.innerHTML=c;if(d=document.getElementById("GameSelector"))if(firstStart&&
|
||||
(textSelectOptions=""),2>numberOfGames){for(;d.firstChild;)d.removeChild(d.firstChild);textSelectOptions=""}else if(""===textSelectOptions){gameSelectorNum&&(gameSelectorNumLenght=Math.floor(Math.log(numberOfGames)/Math.log(10))+1);c='<FORM NAME="GameSel" STYLE="display:inline;"> <SELECT ID="GameSelSelect" NAME="GameSelSelect" STYLE="';0<tableSize&&(c+="width: "+tableSize+"px; ");c+='font-family: monospace;" CLASS="selectControl" TITLE="select a game" ONCHANGE="this.blur(); if (this.value >= 0) { Init(this.value); this.value = -1; }" ONFOCUS="disableShortcutKeysAndStoreStatus();" ONBLUR="restoreShortcutKeysStatus();" > <OPTION CLASS="optionSelectControl" value=-1>';
|
||||
b="";for(a=0;32>a;a++)b+=" ";a=(gameSelectorNum?b.substring(0,gameSelectorNumLenght)+" ":"")+gameSelectorHead;c+=a.replace(/ /g," ");for(a=0;a<numberOfGames;a++)textSelectOptions+='<OPTION CLASS="optionSelectControl" value='+a+">",e="",gameSelectorNum&&(f=" "+(a+1),e+=b.substr(0,gameSelectorNumLenght-(f.length-1))+f+" "),0<gameSelectorChEvent&&(e+=" "+gameEvent[a].substring(0,gameSelectorChEvent)+b.substr(0,gameSelectorChEvent-gameEvent[a].length)+" "),0<gameSelectorChSite&&(e+=" "+gameSite[a].substring(0,
|
||||
gameSelectorChSite)+b.substr(0,gameSelectorChSite-gameSite[a].length)+" "),0<gameSelectorChRound&&(e+=" "+b.substr(0,gameSelectorChRound-gameRound[a].length)+gameRound[a].substring(0,gameSelectorChRound)+" "),0<gameSelectorChWhite&&(e+=" "+gameWhite[a].substring(0,gameSelectorChWhite)+b.substr(0,gameSelectorChWhite-gameWhite[a].length)+" "),0<gameSelectorChBlack&&(e+=" "+gameBlack[a].substring(0,gameSelectorChBlack)+b.substr(0,gameSelectorChBlack-gameBlack[a].length)+" "),0<gameSelectorChResult&&
|
||||
(e+=" "+gameResult[a].substring(0,gameSelectorChResult)+b.substr(0,gameSelectorChResult-gameResult[a].length)+" "),0<gameSelectorChDate&&(e+=" "+gameDate[a].substring(0,gameSelectorChDate)+b.substr(0,gameSelectorChDate-gameDate[a].length)+" "),textSelectOptions+=e.replace(/ /g," ");c+=textSelectOptions.replace(/&(amp|lt|gt);/g,"&$1;")+"</SELECT></FORM>";d.innerHTML=c}if(d=document.getElementById("GameEvent"))d.innerHTML=gameEvent[currentGame];if(d=document.getElementById("GameRound"))d.innerHTML=
|
||||
gameRound[currentGame];if(d=document.getElementById("GameSite"))d.innerHTML=gameSite[currentGame];if(d=document.getElementById("GameDate"))d.innerHTML=gameDate[currentGame],d.style.whiteSpace="nowrap";if(d=document.getElementById("GameWhite"))d.innerHTML=gameWhite[currentGame];if(d=document.getElementById("GameBlack"))d.innerHTML=gameBlack[currentGame];if(d=document.getElementById("GameResult"))d.innerHTML=gameResult[currentGame],d.style.whiteSpace="nowrap";if(d=document.getElementById("GameText"))variationTextDepth=
|
||||
-1,c='<SPAN ID="ShowPgnText">'+variationTextFromId(0),NaN,d.innerHTML=c;setB1C1F1G1boardShortcuts();if((d=document.getElementById("GameSearch"))&&firstStart)if(2>numberOfGames)for(;d.firstChild;)d.removeChild(d.firstChild);else if(c='<FORM ID="searchPgnForm" STYLE="display: inline;" ACTION="javascript:searchPgnGameForm();"><INPUT ID="searchPgnButton" CLASS="searchPgnButton" STYLE="display: inline; ',0<tableSize&&(c+="width: "+tableSize/4+"px; "),c+='" TITLE="find games matching the search string (regular expression)" TYPE="submit" VALUE="?"><INPUT ID="searchPgnExpression" CLASS="searchPgnExpression" TITLE="find games matching the search string (regular expression)" TYPE="input" VALUE="" STYLE="display: inline; box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box;',
|
||||
function PrintHTML(){var a,b,c,d,e,f;if(d=document.getElementById("GameBoard")){c='<TABLE CLASS="boardTable" ID="boardTable" CELLSPACING=0 CELLPADDING=0'+(0<tableSize?' STYLE="width: '+tableSize+"px; height: "+tableSize+'px;">':">");for(a=0;8>a;++a){c+="<TR>";for(b=0;8>b;++b)e="tcol"+b+"trow"+a,f="img_"+e,c+=0===(a+b)%2?'<TD CLASS="whiteSquare" ID="'+e+'" BGCOLOR="#FFFFFF"':'<TD CLASS="blackSquare" ID="'+e+'" BGCOLOR="#D3D3D3"',c+=' ALIGN="center" VALIGN="middle">',IsRotated?String.fromCharCode(72-
|
||||
b,49+a):String.fromCharCode(b+65,56-a),c+='<IMG SRC="'+ClearImg.src+'" CLASS="pieceImage" STYLE="border: none; display: block; vertical-align: middle;" ID="'+f+'" ONFOCUS="this.blur()" /></TD>';c+="</TR>"}d.innerHTML=c+"</TABLE>"}if(d=document.getElementById("boardTable"))tableSize=d.offsetWidth,0<tableSize&&(d.style.height=tableSize+"px");if(d=document.getElementById("GameButtons"))a=(tableSize-12)/5,c='<FORM NAME="GameButtonsForm" STYLE="display:inline;"><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0"><TR><TD><INPUT ID="startButton" TYPE="BUTTON" VALUE="<<" STYLE="',
|
||||
0<a&&(c+="width: "+a+"px;"),c+='"; CLASS="buttonControl" TITLE="go to game start" ID="btnGoToStart" onClick="clickedBbtn(this,event);" ONFOCUS="this.blur();"></TD><TD CLASS="buttonControlSpace" WIDTH="3"></TD><TD><INPUT ID="backButton" TYPE="BUTTON" VALUE="<" STYLE="',0<a&&(c+="width: "+a+"px;"),c+='"; CLASS="buttonControl" TITLE="move backward" ID="btnMoveBackward1" onClick="clickedBbtn(this,event);" ONFOCUS="this.blur();"></TD><TD CLASS="buttonControlSpace" WIDTH="3"></TD><TD>',c+='<INPUT ID="autoplayButton" TYPE="BUTTON" VALUE='+
|
||||
(isAutoPlayOn?"=":"+")+' STYLE="',0<a&&(c+="width: "+a+"px;"),c+=isAutoPlayOn?'"; CLASS="buttonControlStop" TITLE="toggle autoplay (stop)" ':'"; CLASS="buttonControlPlay" TITLE="toggle autoplay (start)" ',c+=' ID="btnPlay" NAME="AutoPlay" onClick="clickedBbtn(this,event);" ONFOCUS="this.blur();"></TD><TD CLASS="buttonControlSpace" WIDTH="3"></TD><TD><INPUT ID="forwardButton" TYPE="BUTTON" VALUE=">" STYLE="',0<a&&(c+="width: "+a+"px;"),c+='"; CLASS="buttonControl" TITLE="move forward" ID="btnMoveForward1" onClick="clickedBbtn(this,event);" ONFOCUS="this.blur();"></TD><TD CLASS="buttonControlSpace" WIDTH="3"></TD><TD><INPUT ID="endButton" TYPE="BUTTON" VALUE=">>" STYLE="',
|
||||
0<a&&(c+="width: "+a+"px;"),c+='"; CLASS="buttonControl" TITLE="go to game end" ID="btnGoToEnd" onClick="clickedBbtn(this,event);" ONFOCUS="this.blur();"></TD></TR></TABLE></FORM>',d.innerHTML=c;if(d=document.getElementById("GameSelector"))if(firstStart&&(textSelectOptions=""),2>numberOfGames){for(;d.firstChild;)d.removeChild(d.firstChild);textSelectOptions=""}else if(""===textSelectOptions){gameSelectorNum&&(gameSelectorNumLenght=Math.floor(Math.log(numberOfGames)/Math.log(10))+1);c='<FORM NAME="GameSel" STYLE="display:inline;"> <SELECT ID="GameSelSelect" NAME="GameSelSelect" STYLE="';
|
||||
0<tableSize&&(c+="width: "+tableSize+"px; ");c+='font-family: monospace;" CLASS="selectControl" TITLE="select a game" ONCHANGE="this.blur(); if (this.value >= 0) { Init(this.value); this.value = -1; }" ONFOCUS="disableShortcutKeysAndStoreStatus();" ONBLUR="restoreShortcutKeysStatus();" > <OPTION CLASS="optionSelectControl" value=-1>';b="";for(a=0;32>a;a++)b+=" ";a=(gameSelectorNum?b.substring(0,gameSelectorNumLenght)+" ":"")+gameSelectorHead;c+=a.replace(/ /g," ");for(a=0;a<numberOfGames;a++)textSelectOptions+=
|
||||
'<OPTION CLASS="optionSelectControl" value='+a+">",f="",gameSelectorNum&&(e=" "+(a+1),f+=b.substr(0,gameSelectorNumLenght-(e.length-1))+e+" "),0<gameSelectorChEvent&&(f+=" "+gameEvent[a].substring(0,gameSelectorChEvent)+b.substr(0,gameSelectorChEvent-gameEvent[a].length)+" "),0<gameSelectorChSite&&(f+=" "+gameSite[a].substring(0,gameSelectorChSite)+b.substr(0,gameSelectorChSite-gameSite[a].length)+" "),0<gameSelectorChRound&&(f+=" "+b.substr(0,gameSelectorChRound-gameRound[a].length)+gameRound[a].substring(0,
|
||||
gameSelectorChRound)+" "),0<gameSelectorChWhite&&(f+=" "+gameWhite[a].substring(0,gameSelectorChWhite)+b.substr(0,gameSelectorChWhite-gameWhite[a].length)+" "),0<gameSelectorChBlack&&(f+=" "+gameBlack[a].substring(0,gameSelectorChBlack)+b.substr(0,gameSelectorChBlack-gameBlack[a].length)+" "),0<gameSelectorChResult&&(f+=" "+gameResult[a].substring(0,gameSelectorChResult)+b.substr(0,gameSelectorChResult-gameResult[a].length)+" "),0<gameSelectorChDate&&(f+=" "+gameDate[a].substring(0,gameSelectorChDate)+
|
||||
b.substr(0,gameSelectorChDate-gameDate[a].length)+" "),textSelectOptions+=f.replace(/ /g," ");c+=textSelectOptions.replace(/&(amp|lt|gt);/g,"&$1;")+"</SELECT></FORM>";d.innerHTML=c}if(d=document.getElementById("GameEvent"))d.innerHTML=gameEvent[currentGame];if(d=document.getElementById("GameRound"))d.innerHTML=gameRound[currentGame];if(d=document.getElementById("GameSite"))d.innerHTML=gameSite[currentGame];if(d=document.getElementById("GameDate"))d.innerHTML=gameDate[currentGame],d.style.whiteSpace=
|
||||
"nowrap";if(d=document.getElementById("GameWhite"))d.innerHTML=gameWhite[currentGame];if(d=document.getElementById("GameBlack"))d.innerHTML=gameBlack[currentGame];if(d=document.getElementById("GameResult"))d.innerHTML=gameResult[currentGame],d.style.whiteSpace="nowrap";if(d=document.getElementById("GameText"))variationTextDepth=-1,c='<SPAN ID="ShowPgnText">'+variationTextFromId(0)+"</SPAN>",d.innerHTML=c;setB1C1F1G1boardShortcuts();if((d=document.getElementById("GameSearch"))&&firstStart)if(2>numberOfGames)for(;d.firstChild;)d.removeChild(d.firstChild);
|
||||
else if(c='<FORM ID="searchPgnForm" STYLE="display: inline;" ACTION="javascript:searchPgnGameForm();"><INPUT ID="searchPgnButton" CLASS="searchPgnButton" STYLE="display: inline; ',0<tableSize&&(c+="width: "+tableSize/4+"px; "),c+='" TITLE="find games matching the search string (regular expression)" TYPE="submit" VALUE="?"><INPUT ID="searchPgnExpression" CLASS="searchPgnExpression" TITLE="find games matching the search string (regular expression)" TYPE="input" VALUE="" STYLE="display: inline; box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box;',
|
||||
0<tableSize&&(c+="width: "+3*tableSize/4+"px; "),c+='" ONFOCUS="disableShortcutKeysAndStoreStatus();" ONBLUR="restoreShortcutKeysStatus();">',c+="</FORM>",d.innerHTML=c,d=document.getElementById("searchPgnExpression"))d.value=lastSearchPgnExpression}function startButton(a){a.shiftKey?GoToMove(StartPlyVar[CurrentVar]+(CurrentPly<=StartPlyVar[CurrentVar]+1?0:1)):GoToMove(StartPlyVar[0],0)}function backButton(a){a.shiftKey?GoToMove(StartPlyVar[CurrentVar]):GoToMove(CurrentPly-1)}
|
||||
function forwardButton(a){a.shiftKey?goToNextVariationSibling()||GoToMove(CurrentPly+1):GoToMove(CurrentPly+1)}function endButton(a){a.shiftKey?CurrentPly===StartPlyVar[CurrentVar]+PlyNumberVar[CurrentVar]?goToFirstChild():GoToMove(StartPlyVar[CurrentVar]+PlyNumberVar[CurrentVar]):GoToMove(StartPlyVar[0]+PlyNumberVar[0],0)}
|
||||
function clickedBbtn(a,b){switch(a.id){case "startButton":startButton(b);break;case "backButton":backButton(b);break;case "autoplayButton":b.shiftKey?goToNextVariationSibling():SwitchAutoPlay();break;case "forwardButton":forwardButton(b);break;case "endButton":endButton(b)}}var basicNAGs=/^[\?!+#\s]+(\s|$)/;
|
||||
|
|
17
public/vendor/pgn4web/pgn4web.js
vendored
|
@ -1,13 +1,13 @@
|
|||
/*
|
||||
* pgn4web javascript chessboard
|
||||
* copyright (C) 2009-2013 Paolo Casaschi
|
||||
* copyright (C) 2009-2014 Paolo Casaschi
|
||||
* see README file and http://pgn4web.casaschi.net
|
||||
* for credits, license and more details
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
var pgn4web_version = '2.79';
|
||||
var pgn4web_version = '2.80';
|
||||
|
||||
var pgn4web_project_url = "http://pgn4web.casaschi.net";
|
||||
var pgn4web_project_author = "Paolo Casaschi";
|
||||
|
@ -2490,7 +2490,8 @@ function InitImages() {
|
|||
ClearImg.src = ImagePath + 'clear.' + imageType;
|
||||
|
||||
var ColorName = new Array ("w", "b");
|
||||
var PiecePrefix = new Array ("k", "q", "r", "b", "n", "p");
|
||||
// thib hack uppercase prefix
|
||||
var PiecePrefix = new Array ("K", "Q", "R", "B", "N", "P");
|
||||
for (var c=0; c<2; ++c) {
|
||||
for (var p=1; p<7; p++) {
|
||||
PieceImg[c][p] = new Image();
|
||||
|
@ -3419,14 +3420,12 @@ function PrintHTML() {
|
|||
text += (ii+jj)%2 === 0 ?
|
||||
'<TD CLASS="whiteSquare" ID="' + squareId + '" BGCOLOR="#FFFFFF"' :
|
||||
'<TD CLASS="blackSquare" ID="' + squareId + '" BGCOLOR="#D3D3D3"';
|
||||
text += ' ALIGN="center" VALIGN="middle" ONCLICK="clickedSquare(' + ii + ',' + jj + ')">';
|
||||
text += ' ALIGN="center" VALIGN="middle">';
|
||||
squareCoord = IsRotated ? String.fromCharCode(72-jj,49+ii) : String.fromCharCode(jj+65,56-ii);
|
||||
squareTitle = squareCoord;
|
||||
if (boardTitle[jj][ii] !== '') { squareTitle += ': ' + boardTitle[jj][ii]; }
|
||||
// thib hack remove onclick and title
|
||||
text += '<IMG SRC="'+ ClearImg.src + '" ' +
|
||||
'CLASS="pieceImage" STYLE="border: none; display: block; vertical-align: middle;" ' +
|
||||
'ONCLICK="boardOnClick[' + jj + '][' + ii + '](this, event);" ' +
|
||||
'ID="' + imageId + '" TITLE="' + squareTitle + '" ' + 'ONFOCUS="this.blur()" />' +
|
||||
'ID="' + imageId + '" ONFOCUS="this.blur()" />' +
|
||||
'</TD>';
|
||||
}
|
||||
text += '</TR>';
|
||||
|
@ -3603,7 +3602,7 @@ function PrintHTML() {
|
|||
|
||||
if (theObj = document.getElementById("GameText")) {
|
||||
variationTextDepth = -1;
|
||||
text = '<SPAN ID="ShowPgnText">' + variationTextFromId(0); + '</SPAN>';
|
||||
text = '<SPAN ID="ShowPgnText">' + variationTextFromId(0) + '</SPAN>';
|
||||
theObj.innerHTML = text;
|
||||
}
|
||||
|
||||
|
|