-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
97 lines (83 loc) · 2.2 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script src='https://code.responsivevoice.org/responsivevoice.js'></script>
</head>
<style type="text/css">
#container{
display: flex;
justify-content: center;
align-items: center;
height:100vh;
}
#el {
font-size: 1.5em;
text-align: center;
}
#el input{
font-size: 1.3em;
padding-left: 7px;
}
.green{
color:#8de88d;
}
.red{
color:#db6659;
}
#start{
background-color: #4caf50;
color:white;
padding:7px;
font-size: 1.3em;
}
.normal{
font-size:0.8em;
}
del{
color:#bababa;
}
@keyframes green {
from {background-color: #4caf50;}
to {background-color:white;}
}
.greenanimation{
animation-name: green;
animation-duration: 1s;
}
@keyframes red {
from {background-color: #db6659;}
to {background-color:white;}
}
.redanimation{
animation-name: red;
animation-duration: 1s;
}
</style>
<body>
<div id="container">
<div id="el">
<h4 v-if="!started">
Vous allez entendre des mots parmi les 600 mots les plus utilisés
de la langue français, essayez de les écrire correctement.
</h4>
<button v-on:click="newWord()" v-if="!started" id="start">Commencer</button><br />
<div v-if="started">
<input type="text" v-on:keyup.enter="check" v-model="wordTyped" placeholder="Ecriver le mot ici"
v-bind:class="animation"
/>
<h2><span class="green">{{rightAnswer}}</span><br /><span class="red">{{wrongAnswer }}</span></h2>
<button v-on:click="listenAgain">Réécouter</button>
<br />
<br />
<!--Erreurs :-->
<span class="normal" v-for="word in wrongTypedWords" v-if="wrongTypedWords.length>0" >
<del>{{word[0]+" "}}</del> {{": "+word[1]+" , "}} </span>
</div>
</div>
</div>
<script src="index.js"></script>
</body>
</html>