play.jade 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. extends layout
  2. block head
  3. script(type='text/javascript')
  4. $token = '#{token}';
  5. $time = #{time};
  6. $increment = #{increment};
  7. block content
  8. header.clearfix
  9. ul#clock
  10. li.white
  11. li.black
  12. span#game-type
  13. a.button(href='/') New game
  14. a.button.button--red.resign Resign
  15. a.button.button--red.rematch Rematch
  16. a.chat
  17. img#bubble(src='/images/chat.svg', width='50', height='50')
  18. | Chat
  19. audio(id='moveSnd', preload='auto')
  20. source(src='/sounds/move.mp3')
  21. source(src='/sounds/move.ogg')
  22. audio(id='messageSnd', preload='auto')
  23. source(src='/sounds/message.mp3')
  24. #chat-wrapper
  25. h4 Chat
  26. a.close x
  27. ul#chat
  28. form#sendMessage
  29. input
  30. #board_moves_wrapper.clearfix
  31. label(id='sounds_label')
  32. input(type='checkbox', id='sounds')
  33. | Enable sounds
  34. #board_wrapper
  35. #captured-pieces
  36. ul.w
  37. ul.b
  38. table.chess_board.white
  39. tr
  40. td.A8(data-id='A8', draggable='true')
  41. a.black.rook(draggable='true') ♜
  42. td.B8(data-id='B8', draggable='true')
  43. a.black.knight(draggable='true') ♞
  44. td.C8(data-id='C8', draggable='true')
  45. a.black.bishop(draggable='true') ♝
  46. td.D8(data-id='D8', draggable='true')
  47. a.black.king(draggable='true') ♛
  48. td.E8(data-id='E8', draggable='true')
  49. a.black.queen(draggable='true') ♚
  50. td.F8(data-id='F8', draggable='true')
  51. a.black.bishop(draggable='true') ♝
  52. td.G8(data-id='G8', draggable='true')
  53. a.black.knight(draggable='true') ♞
  54. td.H8(data-id='H8', draggable='true')
  55. a.black.rook(draggable='true') ♜
  56. tr
  57. td.A7(data-id='A7', draggable='true')
  58. a.black.pawn(draggable='true') ♟
  59. td.B7(data-id='B7', draggable='true')
  60. a.black.pawn(draggable='true') ♟
  61. td.C7(data-id='C7', draggable='true')
  62. a.black.pawn(draggable='true') ♟
  63. td.D7(data-id='D7', draggable='true')
  64. a.black.pawn(draggable='true') ♟
  65. td.E7(data-id='E7', draggable='true')
  66. a.black.pawn(draggable='true') ♟
  67. td.F7(data-id='F7', draggable='true')
  68. a.black.pawn(draggable='true') ♟
  69. td.G7(data-id='G7', draggable='true')
  70. a.black.pawn(draggable='true') ♟
  71. td.H7(data-id='H7', draggable='true')
  72. a.black.pawn(draggable='true') ♟
  73. tr
  74. td.A6(data-id='A6')
  75. td.B6(data-id='B6')
  76. td.C6(data-id='C6')
  77. td.D6(data-id='D6')
  78. td.E6(data-id='E6')
  79. td.F6(data-id='F6')
  80. td.G6(data-id='G6')
  81. td.H6(data-id='H6')
  82. tr
  83. td.A5(data-id='A5')
  84. td.B5(data-id='B5')
  85. td.C5(data-id='C5')
  86. td.D5(data-id='D5')
  87. td.E5(data-id='E5')
  88. td.F5(data-id='F5')
  89. td.G5(data-id='G5')
  90. td.H5(data-id='H5')
  91. tr
  92. td.A4(data-id='A4')
  93. td.B4(data-id='B4')
  94. td.C4(data-id='C4')
  95. td.D4(data-id='D4')
  96. td.E4(data-id='E4')
  97. td.F4(data-id='F4')
  98. td.G4(data-id='G4')
  99. td.H4(data-id='H4')
  100. tr
  101. td.A3(data-id='A3')
  102. td.B3(data-id='B3')
  103. td.C3(data-id='C3')
  104. td.D3(data-id='D3')
  105. td.E3(data-id='E3')
  106. td.F3(data-id='F3')
  107. td.G3(data-id='G3')
  108. td.H3(data-id='H3')
  109. tr
  110. td.A2(data-id='A2', draggable='true')
  111. a.white.pawn(draggable='true') ♙
  112. td.B2(data-id='B2', draggable='true')
  113. a.white.pawn(draggable='true') ♙
  114. td.C2(data-id='C2', draggable='true')
  115. a.white.pawn(draggable='true') ♙
  116. td.D2(data-id='D2', draggable='true')
  117. a.white.pawn(draggable='true') ♙
  118. td.E2(data-id='E2', draggable='true')
  119. a.white.pawn(draggable='true') ♙
  120. td.F2(data-id='F2', draggable='true')
  121. a.white.pawn(draggable='true') ♙
  122. td.G2(data-id='G2', draggable='true')
  123. a.white.pawn(draggable='true') ♙
  124. td.H2(data-id='H2', draggable='true')
  125. a.white.pawn(draggable='true') ♙
  126. tr
  127. td.A1(data-id='A1', draggable='true')
  128. a.white.rook(draggable='true') ♖
  129. td.B1(data-id='B1', draggable='true')
  130. a.white.night(draggable='true') ♘
  131. td.C1(data-id='C1', draggable='true')
  132. a.white.bishop(draggable='true') ♗
  133. td.D1(data-id='D1', draggable='true')
  134. a.white.king(draggable='true') ♕
  135. td.E1(data-id='E1', draggable='true')
  136. a.white.wife(draggable='true') ♔
  137. td.F1(data-id='F1', draggable='true')
  138. a.white.bishop(draggable='true') ♗
  139. td.G1(data-id='G1', draggable='true')
  140. a.white.night(draggable='true') ♘
  141. td.H1(data-id='H1', draggable='true')
  142. a.white.rook(draggable='true') ♖
  143. table.chess_board.black(style='display: none;')
  144. tr
  145. td.H1(data-id='H1', draggable='true')
  146. a.white.rook(draggable='true') ♖
  147. td.G1(data-id='G1', draggable='true')
  148. a.white.night(draggable='true') ♘
  149. td.F1(data-id='F1', draggable='true')
  150. a.white.bishop(draggable='true') ♗
  151. td.E1(data-id='E1', draggable='true')
  152. a.white.king(draggable='true') ♔
  153. td.D1(data-id='D1', draggable='true')
  154. a.white.queen(draggable='true') ♕
  155. td.C1(data-id='C1', draggable='true')
  156. a.white.bishop(draggable='true') ♗
  157. td.B1(data-id='B1', draggable='true')
  158. a.white.knight(draggable='true') ♘
  159. td.A1(data-id='A1', draggable='true')
  160. a.white.rook(draggable='true') ♖
  161. tr
  162. td.H2(data-id='H2', draggable='true')
  163. a.white.pawn(draggable='true') ♙
  164. td.G2(data-id='G2', draggable='true')
  165. a.white.pawn(draggable='true') ♙
  166. td.F2(data-id='F2', draggable='true')
  167. a.white.pawn(draggable='true') ♙
  168. td.E2(data-id='E2', draggable='true')
  169. a.white.pawn(draggable='true') ♙
  170. td.D2(data-id='D2', draggable='true')
  171. a.white.pawn(draggable='true') ♙
  172. td.C2(data-id='C2', draggable='true')
  173. a.white.pawn(draggable='true') ♙
  174. td.B2(data-id='B2', draggable='true')
  175. a.white.pawn(draggable='true') ♙
  176. td.A2(data-id='A2', draggable='true')
  177. a.white.pawn(draggable='true') ♙
  178. tr
  179. td.H3(data-id='H3')
  180. td.G3(data-id='G3')
  181. td.F3(data-id='F3')
  182. td.E3(data-id='E3')
  183. td.D3(data-id='D3')
  184. td.C3(data-id='C3')
  185. td.B3(data-id='B3')
  186. td.A3(data-id='A3')
  187. tr
  188. td.H4(data-id='H4')
  189. td.G4(data-id='G4')
  190. td.F4(data-id='F4')
  191. td.E4(data-id='E4')
  192. td.D4(data-id='D4')
  193. td.C4(data-id='C4')
  194. td.B4(data-id='B4')
  195. td.A4(data-id='A4')
  196. tr
  197. td.H5(data-id='H5')
  198. td.G5(data-id='G5')
  199. td.F5(data-id='F5')
  200. td.E5(data-id='E5')
  201. td.D5(data-id='D5')
  202. td.C5(data-id='C5')
  203. td.B5(data-id='B5')
  204. td.A5(data-id='A5')
  205. tr
  206. td.H6(data-id='H6')
  207. td.G6(data-id='G6')
  208. td.F6(data-id='F6')
  209. td.E6(data-id='E6')
  210. td.D6(data-id='D6')
  211. td.C6(data-id='C6')
  212. td.B6(data-id='B6')
  213. td.A6(data-id='A6')
  214. tr
  215. td.H7(data-id='H7', draggable='true')
  216. a.black.pawn(draggable='true') ♟
  217. td.G7(data-id='G7', draggable='true')
  218. a.black.pawn(draggable='true') ♟
  219. td.F7(data-id='F7', draggable='true')
  220. a.black.pawn(draggable='true') ♟
  221. td.E7(data-id='E7', draggable='true')
  222. a.black.pawn(draggable='true') ♟
  223. td.D7(data-id='D7', draggable='true')
  224. a.black.pawn(draggable='true') ♟
  225. td.C7(data-id='C7', draggable='true')
  226. a.black.pawn(draggable='true') ♟
  227. td.B7(data-id='B7', draggable='true')
  228. a.black.pawn(draggable='true') ♟
  229. td.A7(data-id='A7', draggable='true')
  230. a.black.pawn(draggable='true') ♟
  231. tr
  232. td.H8(data-id='H8', draggable='true')
  233. a.black.rook(draggable='true') ♜
  234. td.G8(data-id='G8', draggable='true')
  235. a.black.knight(draggable='true') ♞
  236. td.F8(data-id='F8', draggable='true')
  237. a.black.bishop(draggable='true') ♝
  238. td.E8(data-id='E8', draggable='true')
  239. a.black.king(draggable='true') ♚
  240. td.D8(data-id='D8', draggable='true')
  241. a.black.queen(draggable='true') ♛
  242. td.C8(data-id='C8', draggable='true')
  243. a.black.bishop(draggable='true') ♝
  244. td.B8(data-id='B8', draggable='true')
  245. a.black.knight(draggable='true') ♞
  246. td.A8(data-id='A8', draggable='true')
  247. a.black.rook(draggable='true') ♜
  248. table#moves.clearfix
  249. thead
  250. tr
  251. th Table of moves
  252. tbody
  253. tr
  254. span.promotion
  255. label(id='for_promotion') Promotion:
  256. select(id='promotion')
  257. option(value='q', selected) Queen
  258. option(value='r') Rook
  259. option(value='n') Knight
  260. option(value='b') Bishop
  261. span.feedback.whitefeedback
  262. span.feedback-move White to move.
  263. span.feedback-status
  264. block scripts
  265. script(type='text/javascript', src='/javascripts/play.js')