Compare commits

..

4 Commits

Author SHA1 Message Date
0880
fe84972374 Use optimized images 2026-01-17 15:30:52 +03:30
0880
ebfe70f0bb Optimize images 2026-01-17 15:30:32 +03:30
0880
6e61b4d3d0 Remove debug logs 2026-01-17 15:28:31 +03:30
0880
1d7defd069 Make game responsive 2026-01-17 15:27:11 +03:30
14 changed files with 21 additions and 18 deletions

View File

@@ -70,14 +70,21 @@
.game {
width: 600px;
height: 600px;
aspect-ratio: 1/1;
}
@media (max-width: 768px) {
.game {
width: 80%;
aspect-ratio: 1/1;
}
}
</style>
</head>
<body>
<header>
<img src="/static/logo.png" alt="">
<img src="/static/logo.webp" alt="">
</header>
<div class="center">
<div id="join-menu" class="join-menu"><input type="text" id="room-id" placeholder="Room ID"><button
@@ -151,9 +158,6 @@
i = mHouse[0];
j = mHouse[1];
if (ready && board) {
console.log(turn);
console.log(color);
console.log(selected);
if (board[j][i] !== "E" && (board[j][i] === board[j][i].toUpperCase() ? 0 : 1) === color && turn == color) {
selected = [i, j];
@@ -178,7 +182,6 @@
moves.forEach(move => {
console.log(move);
if (move[0] == i && move[1] == j) {
console.log("YAY");
fetch('{{ API_ROOT }}/move/' + ROOM_ID, {
method: 'POST',
headers: {
@@ -349,19 +352,19 @@
}
const assets = {
p: '/static/black_pawn.png',
r: '/static/black_rook.png',
c: '/static/black_castle.png',
b: '/static/black_bishop.png',
k: '/static/black_king.png',
q: '/static/black_queen.png',
p: '/static/black_pawn.webp',
r: '/static/black_rook.webp',
c: '/static/black_castle.webp',
b: '/static/black_bishop.webp',
k: '/static/black_king.webp',
q: '/static/black_queen.webp',
P: '/static/white_pawn.png',
R: '/static/white_rook.png',
C: '/static/white_castle.png',
B: '/static/white_bishop.png',
K: '/static/white_king.png',
Q: '/static/white_queen.png',
P: '/static/white_pawn.webp',
R: '/static/white_rook.webp',
C: '/static/white_castle.webp',
B: '/static/white_bishop.webp',
K: '/static/white_king.webp',
Q: '/static/white_queen.webp',
};
const loadPromises = Object.entries(assets).map(([key, src]) => {

BIN
static/black_bishop.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

BIN
static/black_castle.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

BIN
static/black_king.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

BIN
static/black_pawn.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 B

BIN
static/black_queen.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

BIN
static/black_rook.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 B

BIN
static/logo.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

BIN
static/white_bishop.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

BIN
static/white_castle.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 B

BIN
static/white_king.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 684 B

BIN
static/white_pawn.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 B

BIN
static/white_queen.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 794 B

BIN
static/white_rook.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B