-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
154 lines (141 loc) · 4.35 KB
/
Copy pathindex.html
File metadata and controls
154 lines (141 loc) · 4.35 KB
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
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Aşk Testi</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f0f0f0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
text-align: center;
overflow: hidden;
}
.container {
background-color: white;
padding: 40px;
border-radius: 15px;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}
img {
max-width: 300px;
border-radius: 10px;
margin-bottom: 20px;
}
h1 {
font-size: 2em;
color: #333;
}
.buttons {
margin-top: 30px;
display: flex; /* Butonları yan yana getirmek için */
justify-content: center; /* Butonları ortalamak için */
gap: 20px; /* Butonlar arasına boşluk koymak için */
}
.buttons.reversed {
flex-direction: row-reverse; /* Butonların sırasını tersine çevirir */
}
button {
padding: 15px 30px;
font-size: 1.2em;
border: none;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
color: white;
}
#yes-btn {
background-color: #28a745;
order: 1; /* Normal sıradaki yeri */
}
#no-btn {
background-color: #dc3545;
order: 2; /* Normal sıradaki yeri */
}
button:hover {
transform: translateY(-3px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
#result {
display: none;
}
#result h1 {
color: #e83e8c;
}
/* Toast Notification Stilleri */
#toast {
visibility: hidden;
min-width: 250px;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 5px;
padding: 16px;
position: fixed;
z-index: 1;
left: 50%;
transform: translateX(-50%);
bottom: 30px;
font-size: 17px;
opacity: 0;
transition: visibility 0s, opacity 0.5s linear;
}
#toast.show {
visibility: visible;
opacity: 1;
}
</style>
</head>
<body>
<audio src="https://archive.org/download/78_only-you-and-you-alone_the-platters-tony-williams-buck-ram_gbia0012389a/Only%20You%20(And%20You%20Alone).mp3" autoplay loop></audio>
<div id="question-container" class="container">
<img id="mcqueen-img" src="https://res.cloudinary.com/tasit-com/images/c_scale,w_609,h_381,dpr_2/f_webp,q_auto/v1677147726/simsek-mcqueen/simsek-mcqueen.jpg?_i=AA" alt="Şimşek McQueen">
<h1>Beni seviyor musun?</h1>
<div class="buttons">
<button id="yes-btn">Evet</button>
<button id="no-btn">Hayır</button>
</div>
</div>
<div id="result" class="container">
<img id="romance-img" src="https://i.ytimg.com/vi/_fwiuIo66zs/maxresdefault.jpg" alt="McQueen ve Sally">
<h1>Ben de seniii! ❤️</h1>
</div>
<!-- Toast Bildirim Kutusu -->
<div id="toast"></div>
<script>
const toastMessages = [
"Emin misin?",
"Bir daha düşün...",
"Son kararın mı?",
"Ama bu üzer...",
"Lütfeeen?"
];
const yesBtn = document.getElementById('yes-btn');
const noBtn = document.getElementById('no-btn');
const buttonContainer = document.querySelector('.buttons');
function showToast() {
const toast = document.getElementById("toast");
toast.textContent = toastMessages[Math.floor(Math.random() * toastMessages.length)];
toast.className = "show";
setTimeout(function(){ toast.className = toast.className.replace("show", ""); }, 3000);
}
function showResult() {
document.getElementById('question-container').style.display = 'none';
document.getElementById('result').style.display = 'block';
}
function swapButtonPositions() {
// .buttons div'ine 'reversed' class'ını ekleyip çıkararak sırayı değiştirir
buttonContainer.classList.toggle('reversed');
showToast();
}
// Başlangıç eylemlerini ata
yesBtn.addEventListener('click', showResult);
noBtn.addEventListener('click', swapButtonPositions);
</script>
</body>
</html>