91 lines
2.7 KiB
Plaintext
91 lines
2.7 KiB
Plaintext
<!-- <!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Chess Game</title>
|
|
<style>
|
|
.chessboard {
|
|
display: grid;
|
|
grid-template-columns: repeat(8, minmax(0, 1fr));
|
|
grid-template-rows: repeat(8, minmax(0, 1fr));
|
|
width: 400px;
|
|
height: 400px;
|
|
transform: rotate(0deg);
|
|
}
|
|
|
|
.piece.white {
|
|
color: white;
|
|
filter: drop-shadow(0 0 2px rgba(0, 0, 0, 1));
|
|
}
|
|
|
|
.piece.black {
|
|
color: black;
|
|
}
|
|
|
|
.flipped {
|
|
transform: rotate(180deg);
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="d-flex align-items-center justify-content-center vh-100">
|
|
<div class="bg-danger width: 24rem; height: 24rem;"></div>
|
|
</div>
|
|
|
|
|
|
<script src="https://cdn.socket.io/4.7.5/socket.io.min.js"
|
|
integrity="sha384-2huaZvOR9iDzHqslqwpR87isEmrfxqyWOF7hr7BY6KG0+hVKLoEXMPUJw3ynWuhO" crossorigin="anonymous">
|
|
</script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/chess.js/0.10.3/chess.min.js"
|
|
integrity="sha512-xRllwz2gdZciIB+AkEbeq+gVhX8VB8XsfqeFbUh+SzHlN96dEduwtTuVuc2u9EROlmW9+yhRlxjif66ORpsgVA=="
|
|
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
</body>
|
|
|
|
</html> -->
|
|
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Chess Game</title>
|
|
<style>
|
|
.chessboard {
|
|
display: grid;
|
|
grid-template-columns: repeat(8, minmax(0, 1fr));
|
|
grid-template-rows: repeat(8, minmax(0, 1fr));
|
|
width: 400px;
|
|
height: 400px;
|
|
}
|
|
.square {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 2rem;
|
|
width: 50px;
|
|
height: 50px;
|
|
}
|
|
.light { background-color: #f0d9b5; }
|
|
.dark { background-color: #b58863; }
|
|
.piece { position: relative; cursor: grab; }
|
|
.piece.white { color: white; text-shadow: 0 0 3px black; }
|
|
.piece.black { color: black; }
|
|
.flipped { transform: rotate(180deg); }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="d-flex align-items-center justify-content-center vh-100">
|
|
<div class="chessboard"></div>
|
|
</div>
|
|
|
|
<script src="https://cdn.socket.io/4.7.5/socket.io.min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/chess.js/0.10.3/chess.min.js"></script>
|
|
<script src="/js/chessGame.js"></script>
|
|
|
|
</body>
|
|
</html>
|