-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
94 lines (89 loc) · 3.96 KB
/
index.html
File metadata and controls
94 lines (89 loc) · 3.96 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ChessPT</title>
<link rel="stylesheet" href="lib/chessboard-1.0.0.min.css">
<link rel="stylesheet" href="style.css">
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
<link rel="manifest" href="site.webmanifest">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="ChessPT">
</head>
<body>
<div class="main-layout">
<!-- Left Panel: Training Stats and Selection -->
<div class="left-panel">
<h2>Training Selection</h2>
<div class="training-controls">
<a href="black.html" class="button play-as-btn play-as-black">Play as Black</a>
<select id="trainingSelect"></select>
<button id="importPgnButton" class="button">Load PGN...</button>
<input type="file" id="pgnFileInput" accept=".pgn" style="display: none;" />
<button id="newTrainingButton" class="button">Start Training</button>
</div>
<h2>Training Stats</h2>
<div id="stats">
<p>Opening: <span id="currentOpeningName">N/A</span></p>
<p>Error-Free Completions: <span id="statsOpenings">0 / 5</span></p>
<p>Total Errors: <span id="statsErrors">0 / 0</span></p>
<p>Total Time: <span id="statsTotalTime">00:00:00</span></p>
<p>Average Time: <span id="statsAvgTime">00:00:00</span></p>
<p>Min. Time: <span id="statsMinTime">00:00:00</span></p>
<p> <span id="objectiveMessage" class="objective-message"></span></p>
</div>
</div>
<!-- Center Panel: Board and Controls -->
<div class="center-panel">
<h1>Chess Personal Trainer</h1>
<div id="board"></div>
<div id="message" class="message"></div>
<div class="game-buttons-container">
<button id="resetButton" class="button button-restart">Restart Game</button>
<div class="button-group-right">
<button id="hintButton" class="button button-hint">Hint</button>
<button id="showOpeningButton" class="button button-show">Show</button>
</div>
</div>
</div>
<!-- Right Panel: Timer and Move List -->
<div class="right-panel">
<h2>Game Info</h2>
<div id="timer">00:00</div>
<div id="moveList" class="move-list"></div>
<div id="openingNoteDisplay" class="opening-note-display"></div>
</div>
</div>
<footer>
<p>
<a href="help.html">Help</a> |
<a href="achievements.html">Achievements</a> |
<a href="privacy.html">Privacy Policy</a> |
<a href="terms.html">Terms of Service</a>
</p>
<p>© 2025 ChessPT. Licensed under the Apache License, Version 2.0.</p>
</footer>
<script src="lib/jquery-3.7.1.min.js"></script>
<script src="lib/chessboard-1.0.0.min.js"></script>
<script src="lib/chess.min.js"></script>
<script>
window.playerColor = 'w';
</script>
<script src="main.js"></script>
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/sw.js').then(registration => {
console.log('Service Worker registered with scope:', registration.scope);
}).catch(err => {
console.error('Service Worker registration failed:', err);
});
});
}
</script>
</body>
</html>