-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprimarycolorlevel.html
More file actions
207 lines (181 loc) · 4.2 KB
/
primarycolorlevel.html
File metadata and controls
207 lines (181 loc) · 4.2 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
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
<!-- this file creates the primary color level of the color identification level -->
<html>
<style>
body {
background-color: black;
}
</style>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="stylesheet.css">
</head>
<body>
</body>
</html>
<!DOCTYPE html>
<html>
<style>
.multicolortext {
background-image: linear-gradient(to left, violet, indigo, green, blue, yellow, orange, red);
-webkit-background-clip: text;
-moz-background-clip: text;
background-clip:text;
color:transparent;
}
</style>
</html>
<div class="l1">
<h1>
<span class="multicolortext">PRIMARY COLORS</span>
</h1>
</div>
<div class="l2">
<p>SELECT ALL PRIMARY COLORS</p>
</div>
</html>
<!-- the code below creates the buttons for the game -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.btn {
border: none;
background-color: inherit;
padding: 55px 65px;
font-size: 50px;
margin-top: 1.5%;
cursor: pointer;
display: inline-flex;
border-radius: 10px;
top: 70px;
}
.cyan {
color: cyan;
}
.cyan:hover {
background: cyan;
color: white;
}
.blue {
color: blue;
}
.blue:hover {
background: blue;
color: white;
}
.yellow {
color: #FFDB58;
}
.yellow:hover {
background: #FFDB58;
color: white;
}
.green {
color: green;
}
.green:hover {
background: green;
color: white;
}
.magenta {
color: magenta;
}
.magenta:hover {
background: magenta;
color: white;
}
.red {
color: red;
}
.red:hover {
background: #f44336;
color: white;
}
</style>
</head>
<!-- The code below updates the score by adding or subtracting one point -->
<body>
<script>
var g=0;
function upOrDown(isUp) {
g = isUp? (++g>3?3:g):(--g<0?0:g)
document.getElementById('up').innerHTML = g;
return;
}
</script>
<center>
<button id="myButton1" onclick="upOrDown(false);doSomething1();" class="btn cyan">■</button>
<button id="myButton2" onclick="upOrDown(true);doSomething2();" class="btn blue">■</button>
<button id="myButton3" onclick="upOrDown(false);doSomething3();" class="btn yellow">■</button>
<button id="myButton4" onclick="upOrDown(true);doSomething4();" class="btn green">■</button>
<button id="myButton5" onclick="upOrDown(false);doSomething5();" class="btn magenta">■</button>
<button id="myButton6" onclick="upOrDown(true);doSomething6();" class="btn red">■</button>
<h2>Results:</h2>
</center>
<center>
<div class="q2">
<p>SCORE</p>
</div>
</center>
<center>
<scorebox id="up"></scorebox>
</center>
</body>
</html>
<!-- the below code creates the score box where the score is diplayed -->
<html>
<head>
<style>
scorebox {
display: inline-flex;
align-items: center;
justify-content: center;
height: 22%;
width: 20%;
margin-left: 0%;
margin-top: -2%;
background-color: white;
padding: 10px 90px 15px 90px;
border-radius: 10px;
position: relative;
font-family: koulen;
src: url(KoulenFont/koulen-regular-webfont.woff);
font-weight: bold;
font-size:80px;
}
</style>
<!-- the code below creates buttons that allow the user to go to the homepage,
restart the game or continue to the next level -->
<div class="restart1"<button onclick="location.href='primarycolorlevel.html'">
RESTART
</button>
</div>
<div class="homebuttonprimary"<button onclick="location.href='index.html'">
GO HOME
</button>
</div>
<div class="nextlevel2"<button onclick="location.href='secondarycolorlevel.html'">
NEXT LEVEL
</button>
</div>
</head>
<script>
function doSomething1 () {
document.getElementById("myButton1").disabled = true;
}
function doSomething2 () {
document.getElementById("myButton2").disabled = true;
}
function doSomething3 () {
document.getElementById("myButton3").disabled = true;
}
function doSomething4 () {
document.getElementById("myButton4").disabled = true;
}
function doSomething5 () {
document.getElementById("myButton5").disabled = true;
}
function doSomething6 () {
document.getElementById("myButton6").disabled = true;
}
</script>