-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
37 lines (37 loc) · 1.04 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>Chess</title>
<link rel="stylesheet" href="chessboard.css"/>
<script src="jquery.js"></script>
<style>
@media (orientation: landscape) {
#board {
width: 75vh;
}
}
@media (orientation: portrait) {
#board {
width: 95vw;
}
}
</style>
</head>
<body>
<div id="board"></div>
<script src="chessboard.js"></script>
<script>
var board = Chessboard("#board", {
draggable: true,
position: prompt("Enter fen: ", "start"),
onChange: (oldPos, newPos) => console.log(Chessboard.objToFen(newPos)),
dropOffBoard: "trash",
sparePieces: true
});
</script>
</body>
</html>