-
Notifications
You must be signed in to change notification settings - Fork 819
/
love.html
88 lines (77 loc) · 3.81 KB
/
love.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Love Calculator</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Tangerine:wght@700&display=swap" rel="stylesheet">
<!-- Stylesheet -->
<link rel="stylesheet" href="love.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" />
</head>
<body>
<div style="text-align: left;
font-size: 30px;
padding: 5px; background-color: transparent; "><a href="https://kunjgit.github.io/GameZone/"><i style="color:white;
" class="fas fa-home home-icon "></i></a>
</div>
<main>
<div class="heading">
<h1>Love Calculator</h1>
</div>
</main>
<section class="game">
<div class="love_calculator">
<div class="content">
<img src="Pheart-removebg-preview.png" alt="">
<div class="inputarea">
<input type="text" placeholder="Your Name" id="NameOne" onfocus="this.value = ''">
<input type="text" placeholder="Your Lover" id="NameTwo" onfocus="this.value = ''">
</div>
<a href="#" onclick="love()">Calculate</a>
<p id="print">Test the compatibility of you and your partner.</p>
<p id="statement"></p>
</div>
</div>
</section>
<script>
function love() {
var name1 = document.getElementById("NameOne").value;
var name2 = document.getElementById("NameTwo").value;
var random = Math.round(Math.random()*100);
document.getElementById("print").innerHTML = "Your love score is " +random + "%" ;
if (random >90 && random <=100) {
document.getElementById("statement").innerHTML="You both have an inseperable bond like Night-sky and Stars....";
}
if (random >80 && random <=90) {
document.getElementById("statement").innerHTML="You both go very well together like Ice-cream and Waffles <3 ";
}
if (random >70 && random <=80) {
document.getElementById("statement").innerHTML="You both have a good compatibility. Maybe go for more coffee dates together.";
}
if (random >60 && random <=70) {
document.getElementById("statement").innerHTML="You definitely have a good bond together. Go and explore more about each other !";
}
if (random >50 && random <=60) {
document.getElementById("statement").innerHTML="Universe wants you to be together but you are busy with other things !!";
}
if (random >40 && random <=50) {
document.getElementById("statement").innerHTML="Try to understand and learn about eachother.";
}
if (random >30 && random <=40) {
document.getElementById("statement").innerHTML="First understand about yourself and then you would get along well !";
}
if (random <=30) {
document.getElementById("statement").innerHTML="You go together like oil and water !";
}
}
</script>
</body>
</html>