forked from nigeldias27/wordle-clone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
177 lines (156 loc) · 3.99 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
<html>
<head>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.8.2.js"></script>
<style>
#dif {
display: flex;
justify-content: center;
gap: 5px;
}
</style>
<style type="text/css">
.dif_but {
background-color: #dff9fb;
font-size: 24px;
border-radius: 5px;
width: 10vw;
text-align: center;
}
.dif_but:hover {
background-color: grey;
}
#overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #000;
filter: alpha(opacity=40);
-moz-opacity: 0.4;
-khtml-opacity: 0.4;
opacity: 0.4;
z-index: 100;
display: none;
}
.blue a {
text-decoration: none;
}
.popup {
width: 100%;
margin: 0 auto;
display: none;
position: fixed;
z-index: 101;
}
.blue {
min-width: 600px;
width: 600px;
min-height: 150px;
margin: 100px auto;
background: #f3f3f3;
position: relative;
z-index: 103;
padding: 15px 35px;
border-radius: 5px;
box-shadow: 0 2px 5px #000;
}
.blue p {
clear: both;
color: #555555;
/* text-align: justify; */
font-size: 20px;
font-family: monospace;
}
.blue p a {
color: #681daa;
font-weight: bold;
}
.blue .x {
float: right;
height: 35px;
left: 22px;
position: relative;
top: -25px;
width: 34px;
}
.blue .x:hover {
cursor: pointer;
}
.timercount {
height: 30px;
font-size: 30px;
font-family: monospace;
text-align: center;
padding: 20px;
}
</style>
<script type="text/javascript">
$(function () {
var overlay = $('<div id="overlay"></div>');
overlay.show();
overlay.appendTo(document.body);
$(".popup").show();
$(".close").click(function () {
$(".popup").hide();
overlay.appendTo(document.body).remove();
return false;
});
$(".x").click(function () {
$(".popup").hide();
overlay.appendTo(document.body).remove();
return false;
});
});
</script>
<div class="popup">
<div class="blue">
<h1>Game Rules!</h1>
<p>
<ul>
<li>
You get 4 attempts to guess the right word
</li>
<li>
Each guess must be a valid 5 letter word. Press Enter to submit
</li>
<li>
To start playing, just begin typing your first guess
</li>
</ul>
<br />
<a href="" class="close">Close</a>
</p>
</div>
</div>
<body style="background-color: #7dc734">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.js"></script>
<script src="wordle.js"></script>
<script src="Falling_words.js"></script>
<script src="check.js"></script>
<script>
// When the user clicks on <div>, open the popup
function myFunction() {
var popup = document.getElementById("myPopup");
popup.classList.toggle("show");
}
</script>
<body style="background-color: #7dc734;">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.js"></script>
<script src="wordle.js"></script>
<script src="Falling_words.js"></script>
<script src="check.js"></script>
<div style="width:100vw;">
<div style="display: flex;justify-content: center;">
<h1 style="font-family: monospace;font-size: 64px;">Wordle Clone</h1>
</div>
<div id="dif">
<div id="dif_title"></div>
<button id="3" class="dif_but" onClick="difficultyHandle(event, 3)">Easy</button>
<button id="2" class="dif_but" onClick="difficultyHandle(event, 2)">Medium</button>
<button id="1" class="dif_but" onClick="difficultyHandle(event, 1)">Hard</button>
</div>
<div class="timercount">Time left = <span id="timer"></span></div>
<div id="wordle_canvas" style="display: flex;justify-content: center;"></div>
</body>
</html>