-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
47 lines (41 loc) · 1.96 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Message to you</title>
<link rel="stylesheet" href="style.css">
<!--styles link*-->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<!--"font-awesome" for displaying heart icon*-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<div class = "body">
<p class = "h-text italic">See you on Sunday?</p>
<p class = "h-text italic">(there is no wrong answer here)</p>
</div>
<div class = "buttons">
<button class="btn" id = "yesButton" onclick="clickYes()">Yes</button>
<button class="btn" id="noButton" onmouseover="moveButton()" onclick="moveButton()">No</button>
<script>
function clickYes()
{
window.location.href = "yes.html";
}
function moveButton()
{
var x = Math.random() * (window.innerWidth - document.getElementById('noButton').offsetWidth) - 85;
var y = Math.random() * (window.innerHeight - document.getElementById('noButton').offsetHeight) - 48;
document.getElementById('noButton').style.left = `${x}px`;
document.getElementById('noButton').style.top = `${y}px`;
}
</script>
</div>
<div class="base">
<i class="fa-solid fa-heart"></i> <!--creates a heart icon*-->
</div>
</body>
</html>