-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
36 lines (30 loc) · 1.39 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
<!doctype html>
<html class="no-js" 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">
<title>Let's talk CSS colours</title>
<meta name="description" content="Playing around with the WebSpeech API, CSS custom properties and CSS named colours">
<meta name="author" content="Chen Hui Jing">
<link rel="stylesheet" href="styles.css">
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<p class="warning">Tragically, your browser does not support the Speech Recognition API. When I wrote this, only Chrome supported it, so maybe try this out with Chrome.</p>
<div class="blender"></div>
<main>
<h1>CSS Colours</h1>
<p>How well do you know CSS named colours? Test both your knowledge as well as your browser's ability to recognise your accent when you speak English <span class="kaomoji">¯\_(ツ)_/¯</span></p>
<button type="button" id="activateMic" class="btn-speak">Speak</button>
<pre><code id="consoleLog">Click the button then say a colour…</code></pre>
<form id="hearResponse" class="response">
<select id="pickVoice"></select>
<button id="playResponse" class="btn-response">Hear response</button>
</form>
</main>
<script src="scripts.js"></script>
</body>
</html>