feat: new boared design
@@ -28,8 +28,13 @@
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "arabian-chess",
|
||||
"output": "/arabian-chess"
|
||||
"input": "assets/arabian-chess",
|
||||
"output": "/assets/arabian-chess"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "assets/ChessAssets",
|
||||
"output": "/assets/ChessAssets"
|
||||
}
|
||||
],
|
||||
"styles": [
|
||||
@@ -99,8 +104,13 @@
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "arabian-chess",
|
||||
"output": "/arabian-chess"
|
||||
"input": "assets/arabian-chess",
|
||||
"output": "/assets/arabian-chess"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "assets/ChessAssets",
|
||||
"output": "/assets/ChessAssets"
|
||||
}
|
||||
],
|
||||
"styles": [
|
||||
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 518 KiB After Width: | Height: | Size: 518 KiB |
|
Before Width: | Height: | Size: 4.8 MiB After Width: | Height: | Size: 4.8 MiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 907 B After Width: | Height: | Size: 907 B |
|
Before Width: | Height: | Size: 919 B After Width: | Height: | Size: 919 B |
|
Before Width: | Height: | Size: 818 B After Width: | Height: | Size: 818 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 161 B After Width: | Height: | Size: 161 B |
|
Before Width: | Height: | Size: 188 B After Width: | Height: | Size: 188 B |
|
Before Width: | Height: | Size: 188 B After Width: | Height: | Size: 188 B |
|
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 237 B |
|
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 243 B |
|
Before Width: | Height: | Size: 264 B After Width: | Height: | Size: 264 B |
|
Before Width: | Height: | Size: 244 B After Width: | Height: | Size: 244 B |
|
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 240 B |
|
Before Width: | Height: | Size: 232 B After Width: | Height: | Size: 232 B |
|
Before Width: | Height: | Size: 287 B After Width: | Height: | Size: 287 B |
|
Before Width: | Height: | Size: 211 B After Width: | Height: | Size: 211 B |
|
Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 238 B |
|
Before Width: | Height: | Size: 227 B After Width: | Height: | Size: 227 B |
|
Before Width: | Height: | Size: 267 B After Width: | Height: | Size: 267 B |
|
Before Width: | Height: | Size: 300 B After Width: | Height: | Size: 300 B |
|
Before Width: | Height: | Size: 218 B After Width: | Height: | Size: 218 B |
|
Before Width: | Height: | Size: 244 B After Width: | Height: | Size: 244 B |
|
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 245 B |
|
Before Width: | Height: | Size: 229 B After Width: | Height: | Size: 229 B |
|
Before Width: | Height: | Size: 286 B After Width: | Height: | Size: 286 B |
|
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 245 B |
|
Before Width: | Height: | Size: 266 B After Width: | Height: | Size: 266 B |
|
Before Width: | Height: | Size: 297 B After Width: | Height: | Size: 297 B |
|
Before Width: | Height: | Size: 258 B After Width: | Height: | Size: 258 B |
|
Before Width: | Height: | Size: 263 B After Width: | Height: | Size: 263 B |
|
Before Width: | Height: | Size: 313 B After Width: | Height: | Size: 313 B |
|
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 251 B |
|
Before Width: | Height: | Size: 275 B After Width: | Height: | Size: 275 B |
|
Before Width: | Height: | Size: 305 B After Width: | Height: | Size: 305 B |
|
Before Width: | Height: | Size: 281 B After Width: | Height: | Size: 281 B |
|
Before Width: | Height: | Size: 280 B After Width: | Height: | Size: 280 B |
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
@@ -42,11 +42,41 @@
|
||||
}
|
||||
|
||||
.square.light {
|
||||
background-image: url('/arabian-chess/sprites/board/board_square_white.png');
|
||||
background-image: url('/assets/arabian-chess/sprites/board/board_square_white.png');
|
||||
}
|
||||
|
||||
.square.dark {
|
||||
background-image: url('/arabian-chess/sprites/board/board_square_black.png');
|
||||
background-image: url('/assets/arabian-chess/sprites/board/board_square_black.png');
|
||||
}
|
||||
|
||||
.board-grid--classic {
|
||||
border-radius: var(--border-radius-md);
|
||||
}
|
||||
|
||||
.board-grid--classic .square {
|
||||
background-image: none;
|
||||
transition: filter 160ms ease;
|
||||
}
|
||||
|
||||
.board-grid--classic .square.light {
|
||||
background-color: #f3c8a0;
|
||||
}
|
||||
|
||||
.board-grid--classic .square.dark {
|
||||
background-color: #ba6d4b;
|
||||
}
|
||||
|
||||
.board-grid--classic .square.drag-over {
|
||||
outline-color: #5a2c28;
|
||||
}
|
||||
|
||||
.board-grid--classic .square.selected {
|
||||
outline-color: #5a2c28;
|
||||
}
|
||||
|
||||
.board-grid--classic .square.highlighted::after {
|
||||
background: #b9dad1;
|
||||
border-color: #5a2c28;
|
||||
}
|
||||
|
||||
.square.highlighted::after {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="board-shell">
|
||||
<div class="board-grid">
|
||||
<div class="board-grid" [class.board-grid--classic]="boardTheme === 'classic'" [class.board-grid--arabian]="boardTheme === 'arabian'">
|
||||
@for (square of squares; track trackByCoordinate($index, square)) {
|
||||
<button
|
||||
type="button"
|
||||
@@ -17,6 +17,7 @@
|
||||
>
|
||||
<app-chess-piece
|
||||
[pieceCode]="square.pieceCode"
|
||||
[boardTheme]="boardTheme"
|
||||
[draggable]="!!square.pieceCode"
|
||||
(pieceDragStart)="onPieceDragStart($event, square)"
|
||||
(pieceDragEnd)="onSquareDragEnd()"
|
||||
@@ -25,5 +26,7 @@
|
||||
}
|
||||
</div>
|
||||
|
||||
<img class="board-bottom" src="/arabian-chess/sprites/board/board_bottom.png" alt="Board frame" />
|
||||
@if (boardTheme === 'arabian') {
|
||||
<img class="board-bottom" src="/assets/arabian-chess/sprites/board/board_bottom.png" alt="Board frame" />
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -7,6 +7,8 @@ interface BoardSquare {
|
||||
pieceCode: string | null;
|
||||
}
|
||||
|
||||
type BoardTheme = 'arabian' | 'classic';
|
||||
|
||||
@Component({
|
||||
selector: 'app-chess-board',
|
||||
standalone: true,
|
||||
@@ -18,6 +20,7 @@ export class ChessBoardComponent implements OnChanges {
|
||||
@Input({ required: true }) fen = '';
|
||||
@Input() selectedSquare: string | null = null;
|
||||
@Input() highlightedSquares: string[] = [];
|
||||
@Input() boardTheme: BoardTheme = 'arabian';
|
||||
@Output() squareSelected = new EventEmitter<string>();
|
||||
|
||||
squares: BoardSquare[] = [];
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
|
||||
type BoardTheme = 'arabian' | 'classic';
|
||||
|
||||
@Component({
|
||||
selector: 'app-chess-piece',
|
||||
standalone: true,
|
||||
@@ -8,6 +10,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
})
|
||||
export class ChessPieceComponent {
|
||||
@Input({ required: true }) pieceCode: string | null = null;
|
||||
@Input() boardTheme: BoardTheme = 'arabian';
|
||||
@Input() draggable = false;
|
||||
@Output() pieceDragStart = new EventEmitter<DragEvent>();
|
||||
@Output() pieceDragEnd = new EventEmitter<void>();
|
||||
@@ -30,12 +33,21 @@ export class ChessPieceComponent {
|
||||
return '';
|
||||
}
|
||||
|
||||
const color = this.pieceCode === this.pieceCode.toUpperCase() ? 'white' : 'black';
|
||||
const pieceName = this.getPieceName(this.pieceCode.toLowerCase());
|
||||
return `/arabian-chess/sprites/pieces/${color}_${pieceName}.png`;
|
||||
const isWhite = this.pieceCode === this.pieceCode.toUpperCase();
|
||||
const pieceCode = this.pieceCode.toLowerCase();
|
||||
|
||||
if (this.boardTheme === 'classic') {
|
||||
const colorPrefix = isWhite ? 'w' : 'b';
|
||||
const classicPieceName = this.getClassicPieceName(pieceCode);
|
||||
return `/assets/ChessAssets/${colorPrefix}_${classicPieceName}.png`;
|
||||
}
|
||||
|
||||
const arabianColor = isWhite ? 'white' : 'black';
|
||||
const arabianPieceName = this.getArabianPieceName(pieceCode);
|
||||
return `/assets/arabian-chess/sprites/pieces/${arabianColor}_${arabianPieceName}.png`;
|
||||
}
|
||||
|
||||
private getPieceName(piece: string): string {
|
||||
private getArabianPieceName(piece: string): string {
|
||||
switch (piece) {
|
||||
case 'k':
|
||||
return 'king';
|
||||
@@ -53,4 +65,23 @@ export class ChessPieceComponent {
|
||||
return 'pawn';
|
||||
}
|
||||
}
|
||||
|
||||
private getClassicPieceName(piece: string): string {
|
||||
switch (piece) {
|
||||
case 'k':
|
||||
return 'King';
|
||||
case 'q':
|
||||
return 'Queen';
|
||||
case 'r':
|
||||
return 'Rook';
|
||||
case 'b':
|
||||
return 'Bishop';
|
||||
case 'n':
|
||||
return 'Knight';
|
||||
case 'p':
|
||||
return 'Pawn';
|
||||
default:
|
||||
return 'Pawn';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +48,39 @@ h2 {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.board-theme-card {
|
||||
background: var(--color-bg-card);
|
||||
border: var(--border-width) solid var(--color-border);
|
||||
border-radius: var(--border-radius-md);
|
||||
padding: var(--size-md-padding);
|
||||
display: grid;
|
||||
gap: var(--size-sm);
|
||||
}
|
||||
|
||||
.board-theme-card h3 {
|
||||
margin: 0;
|
||||
color: var(--color-text-primary);
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.board-theme-group {
|
||||
display: flex;
|
||||
gap: var(--size-md);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.board-theme-option {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--size-xs);
|
||||
color: var(--color-text-primary);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.board-theme-option input {
|
||||
accent-color: var(--color-primary);
|
||||
}
|
||||
|
||||
.move-card {
|
||||
padding: var(--size-lg-padding);
|
||||
}
|
||||
|
||||
@@ -48,11 +48,37 @@
|
||||
[fen]="facade.state.fen"
|
||||
[selectedSquare]="facade.selectedSquare"
|
||||
[highlightedSquares]="facade.highlightedSquares"
|
||||
[boardTheme]="boardTheme"
|
||||
(squareSelected)="facade.onBoardSquareSelected($event)"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<section class="top-section">
|
||||
<section class="board-theme-card" aria-label="Board design chooser">
|
||||
<h3>Board Design</h3>
|
||||
<div class="board-theme-group" role="radiogroup" aria-label="Board design">
|
||||
<label class="board-theme-option">
|
||||
<input
|
||||
type="radio"
|
||||
name="boardTheme"
|
||||
[checked]="boardTheme === 'arabian'"
|
||||
(change)="setBoardTheme('arabian')"
|
||||
/>
|
||||
<span>Arabian</span>
|
||||
</label>
|
||||
|
||||
<label class="board-theme-option">
|
||||
<input
|
||||
type="radio"
|
||||
name="boardTheme"
|
||||
[checked]="boardTheme === 'classic'"
|
||||
(change)="setBoardTheme('classic')"
|
||||
/>
|
||||
<span>Classic</span>
|
||||
</label>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<app-input-card
|
||||
label="Play move (UCI)"
|
||||
placeholder="e2e4"
|
||||
|
||||
@@ -9,6 +9,7 @@ import { PromotionDialogComponent } from '../../components/promotion-dialog/prom
|
||||
import { GameFacade } from './game.facade';
|
||||
|
||||
type TimerTurn = 'white' | 'black';
|
||||
type BoardTheme = 'arabian' | 'classic';
|
||||
|
||||
interface TimerSnapshot {
|
||||
whiteSeconds: number;
|
||||
@@ -27,18 +28,21 @@ interface TimerSnapshot {
|
||||
})
|
||||
export class GameComponent implements OnInit, OnDestroy {
|
||||
private static readonly TIMER_START_SECONDS = 10 * 60;
|
||||
private static readonly BOARD_THEME_STORAGE_KEY = 'nowchess.boardTheme';
|
||||
private readonly route = inject(ActivatedRoute);
|
||||
private readonly destroyRef = inject(DestroyRef);
|
||||
readonly facade = inject(GameFacade);
|
||||
whiteTimerSeconds = GameComponent.TIMER_START_SECONDS;
|
||||
blackTimerSeconds = GameComponent.TIMER_START_SECONDS;
|
||||
exportType: 'fen' | 'pgn' = 'fen';
|
||||
boardTheme: BoardTheme = 'arabian';
|
||||
exportValue = '';
|
||||
exportNotice = '';
|
||||
private timerIntervalId: number | null = null;
|
||||
private activeGameId = '';
|
||||
|
||||
ngOnInit(): void {
|
||||
this.boardTheme = this.resolveStoredBoardTheme();
|
||||
this.startDummyTimers();
|
||||
|
||||
this.route.paramMap.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((paramMap) => {
|
||||
@@ -70,6 +74,11 @@ export class GameComponent implements OnInit, OnDestroy {
|
||||
this.syncExportValue();
|
||||
}
|
||||
|
||||
setBoardTheme(theme: BoardTheme): void {
|
||||
this.boardTheme = theme;
|
||||
localStorage.setItem(GameComponent.BOARD_THEME_STORAGE_KEY, theme);
|
||||
}
|
||||
|
||||
completeExport(): void {
|
||||
this.syncExportValue();
|
||||
if (!this.exportValue.trim()) {
|
||||
@@ -220,4 +229,9 @@ export class GameComponent implements OnInit, OnDestroy {
|
||||
private getTimerStorageKey(gameId: string): string {
|
||||
return `nowchess.timer.${gameId}`;
|
||||
}
|
||||
|
||||
private resolveStoredBoardTheme(): BoardTheme {
|
||||
const stored = localStorage.getItem(GameComponent.BOARD_THEME_STORAGE_KEY);
|
||||
return stored === 'classic' ? 'classic' : 'arabian';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,67 @@
|
||||
.welcome-shell {
|
||||
min-height: 100vh;
|
||||
--city-sky-top: #dbefff;
|
||||
--city-sky-mid: #bfd7eb;
|
||||
--city-sky-bottom: #95b3ca;
|
||||
--city-fog: rgba(168, 203, 226, 0.35);
|
||||
--city-building-a: #8ba8be;
|
||||
--city-building-b: #7696af;
|
||||
--city-building-c: #6787a3;
|
||||
--city-building-edge: rgba(230, 247, 255, 0.2);
|
||||
--city-window: #bdeeff;
|
||||
--city-window-soft: rgba(189, 238, 255, 0.25);
|
||||
--city-billboard-bg: rgba(223, 246, 255, 0.92);
|
||||
--city-billboard-border: rgba(111, 161, 195, 0.6);
|
||||
--city-billboard-text: #21435a;
|
||||
--city-panel-bg: rgba(235, 248, 255, 0.9);
|
||||
--city-panel-border: rgba(122, 170, 201, 0.55);
|
||||
--city-panel-input: rgba(255, 255, 255, 0.92);
|
||||
|
||||
min-height: 100svh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: var(--size-xl);
|
||||
padding: clamp(1rem, 2.3vw, 1.75rem);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: linear-gradient(180deg, var(--city-sky-top) 0%, var(--city-sky-mid) 58%, var(--city-sky-bottom) 100%);
|
||||
}
|
||||
|
||||
:host-context([data-theme='dark']) .welcome-shell {
|
||||
--city-sky-top: #010f1f;
|
||||
--city-sky-mid: #051424;
|
||||
--city-sky-bottom: #00626e;
|
||||
--city-fog: rgba(0, 218, 243, 0.14);
|
||||
--city-building-a: #122131;
|
||||
--city-building-b: #1c2b3c;
|
||||
--city-building-c: #273647;
|
||||
--city-building-edge: rgba(255, 255, 255, 0.08);
|
||||
--city-window: #00e5ff;
|
||||
--city-window-soft: rgba(0, 229, 255, 0.22);
|
||||
--city-billboard-bg: rgba(0, 218, 243, 0.16);
|
||||
--city-billboard-border: rgba(0, 229, 255, 0.45);
|
||||
--city-billboard-text: #d4e4fa;
|
||||
--city-panel-bg: rgba(18, 33, 49, 0.88);
|
||||
--city-panel-border: rgba(0, 218, 243, 0.35);
|
||||
--city-panel-input: rgba(5, 20, 36, 0.88);
|
||||
}
|
||||
|
||||
.sky-vignette {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
pointer-events: none;
|
||||
background: linear-gradient(180deg, transparent 45%, var(--city-fog) 100%);
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.clouds-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
gap: 60px;
|
||||
gap: clamp(1.25rem, 4vw, 3.5rem);
|
||||
width: 100%;
|
||||
max-width: 900px;
|
||||
margin-bottom: var(--size-xl);
|
||||
position: relative;
|
||||
max-width: 980px;
|
||||
margin-top: clamp(2.8rem, 6vh, 5.2rem);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
@@ -27,7 +72,7 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.12));
|
||||
filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.18));
|
||||
}
|
||||
|
||||
.plane-body {
|
||||
@@ -54,7 +99,7 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.12));
|
||||
filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.15));
|
||||
}
|
||||
|
||||
.cloud::before {
|
||||
@@ -85,91 +130,288 @@
|
||||
height: 100px;
|
||||
object-fit: contain;
|
||||
z-index: 10;
|
||||
filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.gif-with-halo {
|
||||
.welcome-intro {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.gif-with-halo::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 75px;
|
||||
height: 15px;
|
||||
border: 2px solid rgba(255, 215, 0, 0.7);
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.welcome-card {
|
||||
width: min(900px, 100%);
|
||||
border-radius: var(--border-radius-lg);
|
||||
border: var(--border-width) solid var(--color-border);
|
||||
background: var(--color-bg-main);
|
||||
padding: var(--size-xl-padding);
|
||||
box-shadow: var(--shadow-md);
|
||||
z-index: 2;
|
||||
margin-top: clamp(0.4rem, 1.1vh, 1rem);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0 0 var(--size-xs);
|
||||
color: var(--color-text-primary);
|
||||
font-size: var(--heading-h1);
|
||||
margin: 0;
|
||||
color: var(--city-billboard-text);
|
||||
font-size: clamp(1.65rem, 3.6vw, 2.65rem);
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 0 var(--size-lg);
|
||||
margin: 0;
|
||||
color: var(--city-billboard-text);
|
||||
}
|
||||
|
||||
.mode-grid {
|
||||
.welcome-intro p {
|
||||
margin-top: 0.25rem;
|
||||
opacity: 0.9;
|
||||
font-size: clamp(0.88rem, 1.6vw, 1.02rem);
|
||||
}
|
||||
|
||||
.skyline-controls {
|
||||
position: relative;
|
||||
width: min(1200px, 100%);
|
||||
min-height: clamp(280px, 43vh, 500px);
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
||||
gap: var(--size-xl-gap);
|
||||
grid-template-columns: repeat(4, minmax(110px, 1fr));
|
||||
gap: clamp(0.6rem, 1.2vw, 1.2rem);
|
||||
align-items: end;
|
||||
z-index: 2;
|
||||
padding-inline: clamp(0.2rem, 1.2vw, 0.9rem);
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
.tower {
|
||||
--tower-height: clamp(210px, 38vh, 430px);
|
||||
position: relative;
|
||||
height: var(--tower-height);
|
||||
border-radius: 14px 14px 0 0;
|
||||
overflow: visible;
|
||||
background: linear-gradient(180deg, var(--city-building-b) 0%, var(--city-building-a) 65%, var(--city-building-c) 100%);
|
||||
border: 1px solid var(--city-building-edge);
|
||||
box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.tower::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.08) 48%, transparent 52%);
|
||||
opacity: 0.55;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.tower-windows {
|
||||
position: absolute;
|
||||
left: 18%;
|
||||
right: 18%;
|
||||
bottom: 22px;
|
||||
display: grid;
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.tower-windows span {
|
||||
height: 2px;
|
||||
border-radius: 999px;
|
||||
background: var(--city-window);
|
||||
box-shadow: 0 0 5px var(--city-window);
|
||||
opacity: 0.28;
|
||||
}
|
||||
|
||||
.tower-bot {
|
||||
--tower-height: clamp(245px, 48vh, 520px);
|
||||
}
|
||||
|
||||
.tower-1v1 {
|
||||
--tower-height: clamp(200px, 39vh, 430px);
|
||||
}
|
||||
|
||||
.tower-join {
|
||||
--tower-height: clamp(225px, 44vh, 480px);
|
||||
}
|
||||
|
||||
.tower-import {
|
||||
--tower-height: clamp(265px, 51vh, 560px);
|
||||
}
|
||||
|
||||
.mode {
|
||||
border: var(--border-width) solid var(--color-border);
|
||||
border-radius: var(--border-radius-md);
|
||||
padding: var(--size-lg-padding);
|
||||
border-radius: 0.8rem;
|
||||
border: 1px solid var(--city-billboard-border);
|
||||
background: var(--city-billboard-bg);
|
||||
color: var(--city-billboard-text);
|
||||
backdrop-filter: blur(4px);
|
||||
text-align: left;
|
||||
display: grid;
|
||||
gap: var(--size-xs);
|
||||
gap: 0.2rem;
|
||||
transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
|
||||
}
|
||||
|
||||
.mode-billboard {
|
||||
position: absolute;
|
||||
left: 12%;
|
||||
right: 12%;
|
||||
top: 0;
|
||||
transform: translateY(-56%);
|
||||
padding: 0.8rem 0.9rem;
|
||||
}
|
||||
|
||||
.mode span {
|
||||
font-size: 1.15rem;
|
||||
color: var(--color-text-primary);
|
||||
font-size: clamp(0.95rem, 1.4vw, 1.12rem);
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
|
||||
.mode small {
|
||||
color: var(--color-text-primary);
|
||||
opacity: 0.9;
|
||||
color: var(--city-billboard-text);
|
||||
opacity: 0.85;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.mode-active {
|
||||
background: var(--color-secondary-mint);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.mode-active:hover:enabled {
|
||||
background: var(--color-secondary-blue);
|
||||
transform: translateY(-60%) scale(1.01);
|
||||
box-shadow: 0 0 22px var(--city-window-soft);
|
||||
}
|
||||
|
||||
.mode-disabled {
|
||||
background: var(--color-bg-card);
|
||||
opacity: 0.75;
|
||||
.mode-active:disabled {
|
||||
opacity: 0.6;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.interaction-deck {
|
||||
width: min(880px, 100%);
|
||||
display: grid;
|
||||
gap: 0.7rem;
|
||||
margin-top: 0.45rem;
|
||||
margin-bottom: clamp(0.5rem, 1.4vh, 0.95rem);
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.difficulty-selector,
|
||||
.join-game-form,
|
||||
.import-game-form {
|
||||
background: var(--city-panel-bg);
|
||||
border: 1px solid var(--city-panel-border);
|
||||
border-radius: 12px;
|
||||
padding: 0.8rem;
|
||||
backdrop-filter: blur(6px);
|
||||
}
|
||||
|
||||
.difficulty-selector p,
|
||||
.join-game-form p,
|
||||
.import-game-form p {
|
||||
margin: 0 0 0.65rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.difficulty-buttons {
|
||||
display: flex;
|
||||
gap: 0.55rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.difficulty-btn {
|
||||
flex: 1;
|
||||
min-width: 78px;
|
||||
padding: 0.45rem 0.65rem;
|
||||
border: 1px solid var(--city-panel-border);
|
||||
border-radius: 9px;
|
||||
cursor: pointer;
|
||||
font-weight: 600;
|
||||
background: rgba(170, 226, 255, 0.68);
|
||||
color: var(--city-billboard-text);
|
||||
}
|
||||
|
||||
.difficulty-btn:hover:enabled {
|
||||
filter: brightness(0.96);
|
||||
}
|
||||
|
||||
.join-game-input-group {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.join-game-input,
|
||||
.import-game-text {
|
||||
width: 100%;
|
||||
border: 1px solid var(--city-panel-border);
|
||||
border-radius: 9px;
|
||||
background: var(--city-panel-input);
|
||||
color: var(--city-billboard-text);
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
.join-game-input {
|
||||
flex: 1;
|
||||
min-width: 155px;
|
||||
padding: 0.58rem 0.72rem;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.import-game-text {
|
||||
margin-top: 0.55rem;
|
||||
margin-bottom: 0.55rem;
|
||||
min-height: 110px;
|
||||
resize: vertical;
|
||||
padding: 0.58rem 0.72rem;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.join-game-input:focus,
|
||||
.import-game-text:focus {
|
||||
outline: none;
|
||||
border-color: var(--city-window);
|
||||
box-shadow: 0 0 0 2px var(--city-window-soft);
|
||||
}
|
||||
|
||||
.import-mode-group {
|
||||
display: flex;
|
||||
gap: 0.8rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.import-mode-option {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
font-size: 0.92rem;
|
||||
}
|
||||
|
||||
.join-game-btn {
|
||||
padding: 0.52rem 0.72rem;
|
||||
border-radius: 9px;
|
||||
border: 1px solid var(--city-panel-border);
|
||||
cursor: pointer;
|
||||
font-weight: 600;
|
||||
color: var(--city-billboard-text);
|
||||
}
|
||||
|
||||
.join-game-btn.join {
|
||||
background: rgba(170, 226, 255, 0.68);
|
||||
}
|
||||
|
||||
.join-game-btn.join:hover:enabled {
|
||||
filter: brightness(0.95);
|
||||
}
|
||||
|
||||
.join-game-btn.cancel {
|
||||
background: rgba(238, 243, 252, 0.82);
|
||||
}
|
||||
|
||||
.join-game-btn.cancel:hover:enabled {
|
||||
filter: brightness(0.96);
|
||||
}
|
||||
|
||||
.join-game-btn:disabled,
|
||||
.difficulty-btn:disabled {
|
||||
opacity: 0.56;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.error {
|
||||
color: var(--color-text-primary);
|
||||
font-weight: 700;
|
||||
margin-top: var(--size-xl);
|
||||
margin-top: 0.05rem;
|
||||
margin-bottom: 0;
|
||||
color: #ffd0d0;
|
||||
background: rgba(146, 0, 16, 0.45);
|
||||
border: 1px solid rgba(255, 170, 170, 0.6);
|
||||
border-radius: 9px;
|
||||
padding: 0.5rem 0.65rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.plane-left {
|
||||
@@ -187,281 +429,57 @@ p {
|
||||
}
|
||||
|
||||
@keyframes float {
|
||||
0%, 100% {
|
||||
transform: translateY(0px);
|
||||
0%,
|
||||
100% {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: translateY(-15px);
|
||||
transform: translateY(-12px);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.welcome-shell {
|
||||
padding: var(--size-lg);
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.clouds-container {
|
||||
gap: 30px;
|
||||
margin-bottom: var(--size-lg);
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.plane {
|
||||
width: 240px;
|
||||
height: 110px;
|
||||
.skyline-controls {
|
||||
grid-template-columns: repeat(2, minmax(130px, 1fr));
|
||||
min-height: clamp(350px, 53vh, 620px);
|
||||
}
|
||||
|
||||
.plane-gif {
|
||||
width: 55px;
|
||||
height: 55px;
|
||||
transform: translateX(-20px) translateY(12px);
|
||||
.tower {
|
||||
--tower-height: clamp(170px, 25vh, 280px);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 560px) {
|
||||
.welcome-shell {
|
||||
padding: 0.75rem;
|
||||
}
|
||||
|
||||
.cloud {
|
||||
width: 170px;
|
||||
height: 75px;
|
||||
.skyline-controls {
|
||||
gap: 0.45rem;
|
||||
min-height: clamp(360px, 57vh, 650px);
|
||||
}
|
||||
|
||||
.cloud::before {
|
||||
width: 65px;
|
||||
height: 65px;
|
||||
box-shadow: 40px 0 0 7px #ffffff, 80px 0 0 3px #ffffff, 20px -13px 0 10px #ffffff, 60px -10px 0 8px #ffffff;
|
||||
}
|
||||
|
||||
.cloud::after {
|
||||
width: 170px;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.cloud-gif {
|
||||
width: 140px;
|
||||
height: 140px;
|
||||
}
|
||||
|
||||
.gif-with-halo::before {
|
||||
top: -8px;
|
||||
width: 80px;
|
||||
height: 12px;
|
||||
border: 1.5px solid rgba(255, 215, 0, 0.7);
|
||||
}
|
||||
|
||||
.welcome-card {
|
||||
padding: var(--size-xl);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: var(--heading-h1-mobile);
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 0.875rem;
|
||||
margin: 0 0 var(--size-lg);
|
||||
}
|
||||
|
||||
.mode-grid {
|
||||
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
||||
gap: var(--size-md-gap);
|
||||
}
|
||||
|
||||
.mode {
|
||||
padding: var(--size-md-padding);
|
||||
gap: var(--size-xs-gap);
|
||||
.mode-billboard {
|
||||
left: 10%;
|
||||
right: 10%;
|
||||
padding: 0.72rem 0.72rem;
|
||||
}
|
||||
|
||||
.mode span {
|
||||
font-size: 1rem;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.mode small {
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
|
||||
.error {
|
||||
font-size: 0.75rem;
|
||||
.interaction-deck {
|
||||
margin-top: 0.3rem;
|
||||
margin-bottom: 0.45rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.welcome-shell {
|
||||
padding: var(--size-sm);
|
||||
}
|
||||
|
||||
.welcome-card {
|
||||
padding: var(--size-lg-padding);
|
||||
border-radius: var(--border-radius-md);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: var(--heading-h1-small);
|
||||
margin: 0 0 var(--size-xs);
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 0.8rem;
|
||||
margin: 0 0 var(--size-md);
|
||||
}
|
||||
|
||||
.mode-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.mode {
|
||||
padding: var(--size-md-padding);
|
||||
}
|
||||
|
||||
.mode span {
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
}
|
||||
|
||||
.difficulty-selector {
|
||||
grid-column: 1 / -1;
|
||||
background: var(--color-bg-card);
|
||||
border: var(--border-width) solid var(--color-border);
|
||||
border-radius: var(--border-radius-md);
|
||||
padding: var(--size-lg-padding);
|
||||
margin: var(--size-md) 0;
|
||||
}
|
||||
|
||||
.difficulty-selector p {
|
||||
margin: 0 0 var(--size-md);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.difficulty-buttons {
|
||||
display: flex;
|
||||
gap: var(--size-md-gap);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.difficulty-btn {
|
||||
flex: 1;
|
||||
min-width: 80px;
|
||||
padding: var(--size-md-padding);
|
||||
border: var(--border-width) solid var(--color-border);
|
||||
border-radius: var(--border-radius-md);
|
||||
cursor: pointer;
|
||||
font-weight: 600;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.difficulty-btn.easy {
|
||||
background: var(--color-success-light, #d4edda);
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.difficulty-btn.easy:hover:enabled {
|
||||
background: var(--color-success, #28a745);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.difficulty-btn.medium {
|
||||
background: var(--color-warning-light, #fff3cd);
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.difficulty-btn.medium:hover:enabled {
|
||||
background: var(--color-warning, #ffc107);
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.difficulty-btn.hard {
|
||||
background: var(--color-danger-light, #f8d7da);
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.difficulty-btn.hard:hover:enabled {
|
||||
background: var(--color-danger, #dc3545);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.join-game-form {
|
||||
grid-column: 1 / -1;
|
||||
background: var(--color-bg-card);
|
||||
border: var(--border-width) solid var(--color-border);
|
||||
border-radius: var(--border-radius-md);
|
||||
padding: var(--size-lg-padding);
|
||||
margin: var(--size-md) 0;
|
||||
}
|
||||
|
||||
.join-game-form p {
|
||||
margin: 0 0 var(--size-md);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.join-game-input-group {
|
||||
display: flex;
|
||||
gap: var(--size-md-gap);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.join-game-input {
|
||||
flex: 1;
|
||||
min-width: 150px;
|
||||
padding: var(--size-md-padding);
|
||||
border: var(--border-width) solid var(--color-border);
|
||||
border-radius: var(--border-radius-md);
|
||||
background: var(--color-bg-input);
|
||||
color: var(--color-text-primary);
|
||||
font-family: inherit;
|
||||
font-size: 1rem;
|
||||
transition: border-color 0.3s ease;
|
||||
}
|
||||
|
||||
.join-game-input:focus {
|
||||
outline: none;
|
||||
border-color: var(--color-secondary-mint);
|
||||
box-shadow: 0 0 0 3px rgba(185, 218, 209, 0.2);
|
||||
}
|
||||
|
||||
.join-game-input:disabled {
|
||||
background: var(--color-bg-card);
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.join-game-btn {
|
||||
padding: var(--size-md-padding) var(--size-lg);
|
||||
border: var(--border-width) solid var(--color-border);
|
||||
border-radius: var(--border-radius-md);
|
||||
cursor: pointer;
|
||||
font-weight: 600;
|
||||
font-size: 0.95rem;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.join-game-btn.join {
|
||||
background: var(--color-secondary-mint);
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.join-game-btn.join:hover:enabled {
|
||||
background: var(--color-secondary-blue);
|
||||
}
|
||||
|
||||
.join-game-btn.join:disabled {
|
||||
opacity: 0.6;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.join-game-btn.cancel {
|
||||
background: var(--color-bg-card);
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.join-game-btn.cancel:hover:enabled {
|
||||
background: var(--color-border);
|
||||
}
|
||||
|
||||
.join-game-btn.cancel:disabled {
|
||||
opacity: 0.6;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.difficulty-btn.hard:hover:enabled {
|
||||
background: var(--color-danger, #dc3545);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.difficulty-btn:disabled {
|
||||
opacity: 0.6;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
@@ -8,62 +8,88 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sky-vignette" aria-hidden="true"></div>
|
||||
|
||||
<div class="clouds-container">
|
||||
<div class="cloud cloud-left">
|
||||
<img src="arabian-chess/player-one.gif" alt="Player One" class="cloud-gif" />
|
||||
<img src="/assets/arabian-chess/player-one.gif" alt="Player One" class="cloud-gif" />
|
||||
</div>
|
||||
<div class="plane plane-left">
|
||||
<img src="arabian-chess/plane.png" alt="Plane" class="plane-body" />
|
||||
<img src="arabian-chess/raf.gif" alt="Raf" class="plane-gif" />
|
||||
<img src="/assets/arabian-chess/plane.png" alt="Plane" class="plane-body" />
|
||||
<img src="/assets/arabian-chess/raf.gif" alt="Raf" class="plane-gif" />
|
||||
</div>
|
||||
<div class="cloud cloud-right">
|
||||
<div class="gif-with-halo">
|
||||
<img src="arabian-chess/player-two.gif" alt="Player Two" class="cloud-gif" />
|
||||
<img src="/assets/arabian-chess/player-two.gif" alt="Player Two" class="cloud-gif" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<section class="welcome-card">
|
||||
|
||||
<section class="welcome-intro">
|
||||
<h1>Welcome to NowChess</h1>
|
||||
<p>Pick a mode to begin.</p>
|
||||
</section>
|
||||
|
||||
<div class="mode-grid">
|
||||
<button type="button" class="mode mode-active" (click)="toggleDifficultySelector()" [disabled]="creating">
|
||||
<section class="skyline-controls" aria-label="Game mode skyline">
|
||||
<article class="tower tower-bot">
|
||||
<button type="button" class="mode mode-active mode-billboard" (click)="toggleDifficultySelector()" [disabled]="creating">
|
||||
<span>Bot</span>
|
||||
<small>{{ creating ? 'Creating game...' : 'Choose difficulty' }}</small>
|
||||
</button>
|
||||
<div class="tower-windows" aria-hidden="true">
|
||||
<span></span><span></span><span></span><span></span>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
@if (showDifficultySelector) {
|
||||
<div class="difficulty-selector">
|
||||
<p>Select difficulty:</p>
|
||||
<div class="difficulty-buttons">
|
||||
<button type="button" class="difficulty-btn easy" (click)="startVsBot('easy')" [disabled]="creating">
|
||||
Easy
|
||||
</button>
|
||||
<button type="button" class="difficulty-btn medium" (click)="startVsBot('medium')" [disabled]="creating">
|
||||
Medium
|
||||
</button>
|
||||
<button type="button" class="difficulty-btn hard" (click)="startVsBot('hard')" [disabled]="creating">
|
||||
Hard
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<button type="button" class="mode mode-active" (click)="startOneVsOne()" [disabled]="creating">
|
||||
<article class="tower tower-1v1">
|
||||
<button type="button" class="mode mode-active mode-billboard" (click)="startOneVsOne()" [disabled]="creating">
|
||||
<span>1 vs 1</span>
|
||||
<small>{{ creating ? 'Creating game...' : 'Start now' }}</small>
|
||||
</button>
|
||||
<div class="tower-windows" aria-hidden="true">
|
||||
<span></span><span></span><span></span><span></span><span></span>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<button type="button" class="mode mode-active" (click)="toggleJoinGameForm()" [disabled]="joiningGame">
|
||||
<article class="tower tower-join">
|
||||
<button type="button" class="mode mode-active mode-billboard" (click)="toggleJoinGameForm()" [disabled]="joiningGame">
|
||||
<span>Join Game</span>
|
||||
<small>{{ joiningGame ? 'Joining...' : 'Enter game ID' }}</small>
|
||||
</button>
|
||||
<div class="tower-windows" aria-hidden="true">
|
||||
<span></span><span></span><span></span><span></span>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<button type="button" class="mode mode-active" (click)="toggleImportGameForm()" [disabled]="importing">
|
||||
<article class="tower tower-import">
|
||||
<button type="button" class="mode mode-active mode-billboard" (click)="toggleImportGameForm()" [disabled]="importing">
|
||||
<span>Import Game</span>
|
||||
<small>{{ importing ? 'Importing...' : 'FEN or PGN' }}</small>
|
||||
</button>
|
||||
</div>
|
||||
<div class="tower-windows" aria-hidden="true">
|
||||
<span></span><span></span><span></span><span></span><span></span><span></span>
|
||||
</div>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<section class="interaction-deck">
|
||||
@if (showDifficultySelector) {
|
||||
<div class="difficulty-selector">
|
||||
<p>Select difficulty:</p>
|
||||
<div class="difficulty-buttons">
|
||||
<button type="button" class="difficulty-btn easy" (click)="startVsBot('easy')" [disabled]="creating">
|
||||
Easy
|
||||
</button>
|
||||
<button type="button" class="difficulty-btn medium" (click)="startVsBot('medium')" [disabled]="creating">
|
||||
Medium
|
||||
</button>
|
||||
<button type="button" class="difficulty-btn hard" (click)="startVsBot('hard')" [disabled]="creating">
|
||||
Hard
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (showJoinGameForm) {
|
||||
<div class="join-game-form">
|
||||
|
||||
@@ -11,7 +11,7 @@ import { GameApiService } from '../../services/game-api.service';
|
||||
standalone: true,
|
||||
imports: [CommonModule, FormsModule],
|
||||
templateUrl: './welcome.component.html',
|
||||
styleUrl: './welcome.component.css'
|
||||
styleUrls: ['./welcome.component.css']
|
||||
})
|
||||
export class WelcomeComponent {
|
||||
creating = false;
|
||||
|
||||