-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
249 lines (191 loc) · 8.33 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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<meta name="keywords" content="" />
<meta
name="description"
content="Web site created using simple html css javascript"
/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/css2?family=Dancing+Script&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
<link rel="icon" type="image/png" href="favicon.ico"/>
<title>Fortune Teller</title>
</head>
<body>
<div id="center_fit">
<div class="nav">
<a class="active" href="index.html" name="a" >Home</a>
<a href="explore.html" name="b" >Explore</a>
<a href="about.html" name="c" >About</a>
</div>
<h1 class="heading">Deep dive into fortune telling Experience</h1>
<div class="initial">
<h1 class="headstart"> Start</h1>
<div class="start" onclick="startDraw()">
</div>
</div>
<div class="main">
<div class="fire">
</div>
<div class="earth">
</div>
<div class="water">
</div>
<div class="spirit">
</div>
<div class="air">
</div>
<div class="star1">
</div>
<div class="star2">
</div>
<div class="star3">
</div>
<div class="star4">
</div>
<div class="pentagon" onclick="startLoading()">
<h1 class="headstart" id="spin" style="line-height: 4; margin:0px 16px"></h1>
</div>
<div class="loading" id="load" >
<img src="loading.gif" height="150" width="150" />
</div>
<div class="container">
<div class="card" onclick="choseCard(1)" name="1"> </div>
<div class="card" onclick="choseCard(2)" name="2"> </div>
<div class="card" onclick="choseCard(3)" name="3"> </div>
<div class="card" onclick="choseCard(4)" name="4"> </div>
<div class="card" onclick="choseCard(5)" name="5"> </div>
<div class="card" onclick="choseCard(6)" name="6"> </div>
<div class="card" onclick="choseCard(7)" name="7"> </div>
<div class="card" onclick="choseCard(8)" name="8"> </div>
<div class="card" onclick="choseCard(9)" name="9"> </div>
<div class="card" onclick="choseCard(10)" name="10"> </div>
<div class="card" onclick="choseCard(11)" name="11"> </div>
<div class="card" onclick="choseCard(12)" name="12"> </div>
<div class="card" onclick="choseCard(13)" name="13"> </div>
<div class="card" onclick="choseCard(14)" name="14"> </div>
<div class="card" onclick="choseCard(15)" name="15"> </div>
</div>
</div>
</div>
<footer class="footer">
<div class="footer-content">
<div class="footer-section">
<h3>Gallery</h3>
<ul>
<li><a href="#">Talk Shows</a></li>
<li><a href="#">Daily Draws</a></li>
<li><a href="#">Picks</a></li>
</ul>
</div>
<div class="footer-section">
<h3>Written Works</h3>
<ul>
<li><a href="#">Trending</a></li>
<li><a href="#">Best selling</a></li>
<li><a href="#">Latest</a></li>
</ul>
</div>
<div class="footer-section">
<h3>Newspaper Headlines</h3>
<ul>
<li><a href="#">Trending</a></li>
<li><a href="#">Recent</a></li>
<li><a href="#">Old</a></li>
</ul>
</div>
<div class="footer-section form">
<h3>Tarot Draws</h3>
<p>Subscribe to get your weekly free tarot draws ,major discounts and enter the world of mystery.</p>
<input type="email" placeholder="Enter your email address">
<button>Subscribe</button>
</div>
</div>
<div class="footer-bottom">
© Adit Alware
</div>
</footer>
<script>
let count=0;
let m=new Map();
function startDraw(){
document.getElementsByClassName("initial")[0].style.display="none";
document.getElementsByClassName("main")[0].style.display="block";
document.getElementsByClassName("heading")[0].innerHTML="Take a deep breath. Choose Any 5 cards from the deck";
document.getElementsByClassName("heading")[0].style.fontSize="40px";
document.getElementsByClassName("heading")[0].style.animation="bringdown 2s forwards";
}
function startLoading(){
document.getElementById("spin").style.display="none";
document.getElementsByClassName("pentagon")[0].style.animation="spin 10s,fade 10s forwards";
document.getElementsByClassName("fire")[0].style.animation="spin 10s,fade 10s forwards";
document.getElementsByClassName("water")[0].style.animation="spin 10s,fade 10s forwards";
document.getElementsByClassName("air")[0].style.animation="spin 10s,fade 10s forwards";
document.getElementsByClassName("earth")[0].style.animation="spin 10s,fade 10s forwards";
}
function choseCard(index){
if(count<5 && !m[String(index)]){
m[String(index)]=1;
document.getElementsByClassName("card")[index-1].style.backgroundImage = "none";
var img = document.createElement('img');
img.src = `card${index}.jpg`;
img.width= "135";
img.height= "192";
img.setAttribute('onclick','bigImgView(this.src)');
document.getElementsByClassName("card")[index-1].appendChild(img);
document.getElementsByClassName("card")[index-1].style.animation = "moveup 2s forwards";
count+=1;
if(count==1){
document.getElementsByClassName("heading")[0].innerHTML="Focus on a question on your mind";
}
if(count<=4)
document.getElementsByClassName(`star${count}`)[0].style.display="block";
}
if(count==5){
document.getElementsByClassName("heading")[0].innerHTML="Alright! Here we go!";
let cards=document.getElementsByClassName("card");
for(var i=0 ;i<15;i++)
{
if(m[cards[i].getAttribute("name")]!=1){
cards[i].style.display="none";
}
}
document.getElementsByClassName("pentagon")[0].style.display="block";
setTimeout(function(){
document.getElementById("load").style.display="block";
}, 3000)
setTimeout(function(){
window.location.href = 'draw.html';
}, 6000)
}
}
let bigImgView = (imgSrc) => {
// Making elements
let divP = document.createElement('DIV');
let spanC = document.createElement('SPAN');
let imgC = document.createElement("IMG");
// Setting attributes
divP.setAttribute('class', 'bib-modal');
spanC.setAttribute('class', 'bib-close');
imgC.setAttribute('class', 'bib-modal-content');
imgC.setAttribute('src', imgSrc);
// Adding texts
spanC.innerHTML = '×';
// Handling events
spanC.onclick = function(){
this.parentElement.remove();
}
// Appending childs
divP.appendChild(spanC);
divP.appendChild(imgC);
// Appending to body
document.body.appendChild(divP);
divP.style.display = 'block';
console.log("Big image");
}
</script>
</body>
</html>