-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
209 lines (201 loc) · 8.14 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
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Simple typing game built with javascript">
<title>Document</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;700;900&display=swap" rel="stylesheet" crossorigin loading="eager">
<!-- <link rel="stylesheet" href="css/index.d.css" loading="eager"> -->
<link rel="stylesheet" href="css/app.css" loading="eager">
<script src="app.js"></script>
</head>
<body>
<main>
<h1 hidden>Typing game</h1>
<section aria-labelledby="accueil">
<section>
<aside>
<h2 id="accueil">Typing game</h2>
</aside>
<nav>
<ul>
<li><a href="javascript:void(0)" aria-labelledby="jouer">Jouer</a></li>
<li><a href="javascript:void(0)" aria-labelledby="history">Historique</a></li>
<li><a href="javascript:alert('Work in progress')" aria-labelledby="stats">Statistiques</a></li>
</ul>
</nav>
</section>
</section>
<section aria-labelledby="jouer" hidden>
<h2 id="jouer" hidden>Jouer</h2>
<section>
<aside>
<button data-name="quit-game">Quitter</button>
</aside>
<p>Ecrivez le mot suivant en <output name="time"></output> secondes :<br>
<output name="word"></output></p>
<input type="text" name="user-word" placeholder="Commencez à écrire...">
<output name="status"></output>
</section>
<aside>
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-info"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>
<span>Appuyer sur <kbd>Esc</kbd> pour quitter la partie ou pour mettre sur pause.</span>
</p>
</aside>
<aside role="status" aria-live="polite">
<div>
<div>
<p>Temps:
<output name="time-remaining"></output>
secondes
</p>
<p>Niveau:
<output name="level"></output>
</p>
<p>Score:
<output name="score"></output>
</p>
</div>
</div>
<div>
<div>
<p>Temps:
<output name="time-remaining"></output>
secondes
</p>
<p>Niveau:
<output name="level"></output>
</p>
<p>Score:
<output name="score"></output>
</p>
</div>
</div>
</aside>
</section>
<section aria-labelledby="fin" hidden>
<h2 id="fin">Fin de partie</h2>
<p>Vous avez terminé la partie avec un score de <output name="final-score"></output> points.</p>
<nav>
<ul>
<li><a href="javascript:void(0)" data-name="quit">Retour sur le menu</a></li>
<li><a href="javascript:void(0)" data-name="replay">Rejouer</a></li>
</ul>
</nav>
</section>
<section aria-labelledby="stats" hidden>
<h2 id="stats">Statistiques</h2>
</section>
<section aria-labelledby="history" hidden>
<header>
<a href="javascript:void(0)">
<button>< Retour</button>
</a>
<h2 id="history">Historique</h2>
</header>
<section>
<table>
<thead>
<tr>
<th>Difficulté</th>
<th>Date</th>
<th>Temps</th>
<th>Score</th>
</tr>
</thead>
<tbody></tbody>
</table>
</section>
</section>
</main>
<dialog class="select-difficulty">
<header>
<h2>Choisissez une difficulté</h2>
<nav>
<button class="maximize" hidden>
<img src="img/maximize.svg" alt="Maximize">
</button>
<button class="minimize">
<img src="img/minimize.svg" alt="Minimize">
</button>
<button class="close">
<img src="img/close.svg" alt="Close">
</button>
</nav>
</header>
<section>
<form action="javascript:void(0)">
<nav>
<ul>
<li>
<label>
<input type="radio" name="difficulty" value="facile">
<button>Facile</button>
</label>
</li>
<li>
<label>
<input type="radio" name="difficulty" value="moyen">
<button>Moyen</button>
</label>
</li>
<li>
<label>
<input type="radio" name="difficulty" value="difficile">
<button>Difficile</button>
</label>
</li>
<li>
<label>
<input type="radio" name="difficulty" value="personnalise">
<button>Personnalisé</button>
</label>
</li>
</ul>
</nav>
<section>
<label>
<span>Temps de départ</span>
<input type="number" name="start-time" value="16" min="1" max="60">
<span>sec.</span>
</label>
<label>
<span>Temps minimal</span>
<input type="number" name="min-time" value="3" min="1" max="60">
<span>sec.</span>
</label>
<label>
<span>Mots par niveau</span>
<input type="number" name="words-per-level" value="8" min="1" max="100">
<span>words</span>
</label>
<button>Commencer la partie</button>
</section>
</form>
</section>
</dialog>
<dialog class="confirm-quit">
<header>
<h2>Etes-vous sûr de quitter ?</h2>
<nav>
<button class="maximize" hidden>[]</button>
<button class="minimize">_</button>
<button class="close">X</button>
</nav>
</header>
<section>
<nav>
<ul>
<li><button data-name="no" autofocus>Non</button></li>
<li><button data-name="yes">Oui</button></li>
</ul>
</nav>
</section>
</dialog>
</body>
</html>