Redirect / index.html
abeea's picture
Update index.html
2a9f456 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Spin & Load Wheel</title>
<style>
:root {
--dark-blue: #002D62;
--light-blue: #B0E0E6;
--red-pointer: #DC143C;
--border-color: #A9A9A9;
}
body {
margin: 0;
font-family: Arial, sans-serif;
background: #E0FFFF;
color: var(--dark-blue);
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
.container {
width: 90%;
max-width: 400px;
padding: 20px;
}
.info {
margin-bottom: 20px;
font-size: 16px;
line-height: 22px;
opacity: 0.9;
color: var(--dark-blue);
}
/* --- Wheel Styling to Match Image --- */
.wheel {
width: 300px;
height: 300px;
border-radius: 50%;
border: 5px solid var(--border-color);
position: relative;
overflow: hidden;
/* Fast spin transition: 1.5 seconds */
transition: transform 1.5s cubic-bezier(.12,.66,.11,1.23);
margin: auto;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
.slice {
position: absolute;
width: 50%;
height: 50%;
top: 50%;
left: 50%;
transform-origin: 0% 0%;
color: white;
display: flex;
justify-content: center;
align-items: center;
font-size: 20px;
font-weight: bold;
}
.slice:nth-child(odd) {
background: var(--dark-blue);
color: white;
}
.slice:nth-child(even) {
background: var(--light-blue);
color: var(--dark-blue);
}
/* Rotate slices for 10 segments (360/10 = 36 degrees per slice) */
.slice:nth-child(1) { transform: rotate(0deg) skewY(-54deg) rotate(18deg); }
.slice:nth-child(2) { transform: rotate(36deg) skewY(-54deg) rotate(18deg); }
.slice:nth-child(3) { transform: rotate(72deg) skewY(-54deg) rotate(18deg); }
.slice:nth-child(4) { transform: rotate(108deg) skewY(-54deg) rotate(18deg); }
.slice:nth-child(5) { transform: rotate(144deg) skewY(-54deg) rotate(18deg); }
.slice:nth-child(6) { transform: rotate(180deg) skewY(-54deg) rotate(18deg); }
.slice:nth-child(7) { transform: rotate(216deg) skewY(-54deg) rotate(18deg); }
.slice:nth-child(8) { transform: rotate(252deg) skewY(-54deg) rotate(18deg); }
.slice:nth-child(9) { transform: rotate(288deg) skewY(-54deg) rotate(18deg); }
.slice:nth-child(10) { transform: rotate(324deg) skewY(-54deg) rotate(18deg); }
/* Centered "PLAY" button */
.center-circle {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 80px;
height: 80px;
background-color: white;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
z-index: 10;
border: 5px solid var(--dark-blue);
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
cursor: pointer;
font-size: 18px;
font-weight: bold;
color: var(--dark-blue);
}
.pointer {
width: 0; height: 0;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-bottom: 20px solid var(--red-pointer);
margin: auto;
margin-bottom: 5px;
z-index: 20;
}
#message {
margin-top: 20px;
font-size: 18px;
display: none;
color: var(--dark-blue);
}
.try-your-luck {
margin-top: 20px;
font-size: 14px;
opacity: 0.7;
position: relative;
padding-top: 10px;
}
.try-your-luck:before {
content: '';
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
width: 60px;
height: 1px;
background: var(--dark-blue);
}
</style>
</head>
<body>
<div class="container">
<p class="info">
⚡ For load balancing we add this to handle high traffic.<br>
Click **PLAY** to unlock the main site!
</p>
<div class="pointer"></div>
<div class="wheel" id="wheel">
<div class="slice">$$</div>
<div class="slice">%</div>
<div class="slice">$$</div>
<div class="slice">%</div>
<div class="slice">$$</div>
<div class="slice">%</div>
<div class="slice">$$</div>
<div class="slice">%</div>
<div class="slice">$$</div>
<div class="slice">%</div>
<div class="center-circle" onclick="spinWheel()" id="centerBtn">PLAY</div>
</div>
<p class="try-your-luck">
Thanks for Waiting
</p>
<p id="message"></p>
</div>
<script>
const sites = [
"https://www.love.com",
"https://www.love1.com",
"https://www.love2.com",
"https://www.love3.com",
"https://www.love4.com",
"https://www.love.com",
"https://www.love1.com",
"https://www.love2.com",
"https://www.love3.com",
"https://www.love4.com"
];
let spinning = false;
function spinWheel() {
if (spinning) return;
spinning = true;
const wheel = document.getElementById("wheel");
const message = document.getElementById("message");
const centerBtn = document.getElementById("centerBtn");
// Disable the center button
centerBtn.style.pointerEvents = 'none';
centerBtn.textContent = '...';
const index = Math.floor(Math.random() * sites.length);
const totalSlices = sites.length;
const degreePerSlice = 360 / totalSlices;
/* Fast spin: 5 full rotations + landing angle */
const degrees = 360 * 5 + (360 - index * degreePerSlice) - (degreePerSlice / 2);
wheel.style.transform = `rotate(${degrees}deg)`;
message.style.display = "block";
message.textContent = "🎡 Fast spinning…";
/* Redirect logic after the animation finishes */
setTimeout(() => {
const selected = sites[index];
message.textContent = `Redirecting to ${selected}...`;
// ✅ REDIRECT ENABLED
window.location.href = selected;
// Note: The reset logic is removed as the page will navigate away.
}, 1600); // Timeout matches the 1.5s CSS transition plus a small buffer
}
</script>
</body>
</html>