-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
111 lines (95 loc) · 3.17 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
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-image: url("./romantica.png");
background-size: cover;
background-repeat: no-repeat;
background-position: center;
height: 100vh;
width: 100vw;
font-family: Arial, sans-serif;
}
#noButton {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding: 15px 30px;
}
#noButton,
#yesButton {
display: inline-block;
border-radius: 50px;
background-color: pink;
color: black;
font-size: 20px;
border: none;
cursor: pointer;
margin-top: 30px;
}
#yesButton {
position: absolute;
left: 50%;
margin-top: 10%;
transform: translate(-50%, -50%);
padding: 15px 30px;
}
h2 {
text-align: center;
color: white;
font-size: 50px;
margin-top: 2%;
font-family: cursive;
pointer-events: none;
caret-color: transparent;
/* Add this line */
}
footer {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
background-color: black;
color: white;
text-align: center;
}
</style>
</head>
<body>
<h2 id="h2Element">VOCE ACEITA NAMORAR COMIGO!?!</h2>
<button id="yesButton">SIMMMMMMM ❤️🥰</button>
<button id="noButton">NAO.</button>
<script>
const noButton = document.getElementById('noButton');
const yesButton = document.getElementById('yesButton');
const h2Element = document.getElementById('h2Element');
h2Element.addEventListener('click', () => {
// Add your desired behavior here
alert('You clicked the h2 element!');
});
noButton.addEventListener('mouseover', () => {
const yesButtonRect = yesButton.getBoundingClientRect();
const maxX = window.innerWidth - noButton.offsetWidth;
const maxY = window.innerHeight - noButton.offsetHeight;
let randomX = Math.random() * maxX;
let randomY = Math.random() * maxY;
// Ensure that the noButton never goes above the yesButton
if (randomX > yesButtonRect.left && randomX < yesButtonRect.right &&
randomY > yesButtonRect.top && randomY < yesButtonRect.bottom) {
randomX = Math.random() * maxX;
randomY = Math.random() * maxY;
}
noButton.style.top = `${randomY}px`;
noButton.style.left = `${randomX}px`;
});
yesButton.addEventListener('click', () => {
// Add your desired behavior here
alert('AH, MUITO BEM!!! AGORA CLIQUE OK PRA TER UMA SURPRESA!!!');
window.location.href = 'https://www.youtube.com/watch?v=WLtVtMdRvmo'; // Replace with the URL of the new page
});
</script>
</body>
<footer>Made by Silvio</footer>
</html>