Skip to content

Instantly share code, notes, and snippets.

@sateeshchandel
Created July 12, 2025 04:39
Show Gist options
  • Save sateeshchandel/852cbb423b9943237505ebc26a78967c to your computer and use it in GitHub Desktop.
Save sateeshchandel/852cbb423b9943237505ebc26a78967c to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Do You Love Me?</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f0f0f0;
font-family: Arial, sans-serif;
position: relative;
overflow: hidden;
}
.question {
text-align: center;
font-size: 24px;
margin-bottom: 20px;
}
.button {
padding: 10px 20px;
font-size: 18px;
margin: 5px;
cursor: pointer;
border: none;
border-radius: 5px;
transition: background-color 0.3s;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.yes {
background-color: #4CAF50;
color: white;
}
.no {
background-color: #f44336;
color: white;
}
.yes:hover {
background-color: #45a049;
}
.no:hover {
background-color: #e53935;
}
.response-box {
border: 2px solid #4CAF50;
border-radius: 10px;
padding: 20px;
background-color: white;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
display: inline-block;
}
</style>
</head>
<body>
<div class="question" id="questionDiv">
<p>Do you love me?</p>
<button class="button yes" onclick="openLovePage()">Yes</button>
<button class="button no" onclick="teleportNo()">No</button>
</div>
<script>
function teleportNo() {
const questionDiv = document.getElementById('questionDiv');
const x = Math.random() * (window.innerWidth - questionDiv.offsetWidth);
const y = Math.random() * (window.innerHeight - questionDiv.offsetHeight);
questionDiv.style.position = 'absolute';
questionDiv.style.left = x + 'px';
questionDiv.style.top = y + 'px';
}
function openLovePage() {
document.body.innerHTML = `
<div class="response-box" id="responseDiv" style="text-align: center; margin-top: 20%;">
<h1>I LOVE YOU PRACHU BABU!</h1>
<p>Choose an option:</p>
<button class="button yes" onclick="showLoveResponse()">I LOVE YOU TOO BACHCHA</button>
<button class="button no" onclick="teleportHate()">I HATE YOU</button>
</div>
`;
}
function teleportHate() {
const responseDiv = document.getElementById('responseDiv');
const x = Math.random() * (window.innerWidth - responseDiv.offsetWidth);
const y = Math.random() * (window.innerHeight - responseDiv.offsetHeight);
responseDiv.style.position = 'absolute';
responseDiv.style.left = x + 'px';
responseDiv.style.top = y + 'px';
}
function showLoveResponse() {
document.body.innerHTML = `
<div style="text-align: center; margin-top: 20%;">
<h1>Yay! I'm so happy! 😊</h1>
</div>
`;
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment