undefined - Initial Deployment
Browse files- README.md +7 -5
- index.html +207 -19
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: lynx
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: green
|
| 5 |
+
colorTo: green
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,207 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Lynx Balloons</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<script src="https://cdn.jsdelivr.net/npm/canvas-confetti@1.6.0/dist/confetti.browser.min.js"></script>
|
| 9 |
+
<style>
|
| 10 |
+
@keyframes float {
|
| 11 |
+
0%, 100% {
|
| 12 |
+
transform: translateY(0) rotate(0deg);
|
| 13 |
+
}
|
| 14 |
+
50% {
|
| 15 |
+
transform: translateY(-20px) rotate(5deg);
|
| 16 |
+
}
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
.balloon {
|
| 20 |
+
animation: float 4s ease-in-out infinite;
|
| 21 |
+
cursor: pointer;
|
| 22 |
+
transition: transform 0.3s ease;
|
| 23 |
+
position: absolute;
|
| 24 |
+
z-index: 10;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
.balloon:hover {
|
| 28 |
+
transform: scale(1.1);
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
.balloon:nth-child(1) { animation-delay: 0s; }
|
| 32 |
+
.balloon:nth-child(2) { animation-delay: 0.5s; }
|
| 33 |
+
.balloon:nth-child(3) { animation-delay: 1s; }
|
| 34 |
+
.balloon:nth-child(4) { animation-delay: 1.5s; }
|
| 35 |
+
|
| 36 |
+
.confetti {
|
| 37 |
+
position: absolute;
|
| 38 |
+
width: 10px;
|
| 39 |
+
height: 10px;
|
| 40 |
+
background-color: #f00;
|
| 41 |
+
opacity: 0;
|
| 42 |
+
z-index: 5;
|
| 43 |
+
}
|
| 44 |
+
</style>
|
| 45 |
+
</head>
|
| 46 |
+
<body class="bg-gradient-to-b from-blue-100 to-purple-100 min-h-screen overflow-hidden relative">
|
| 47 |
+
<div class="container mx-auto px-4 py-8">
|
| 48 |
+
<h1 class="text-4xl md:text-6xl font-bold text-center text-purple-800 mb-12">Balloon Lynx</h1>
|
| 49 |
+
<p class="text-center text-gray-600 mb-8">Click on the balloons to turn them into confetti!</p>
|
| 50 |
+
|
| 51 |
+
<div id="balloons-container" class="relative w-full h-[70vh]">
|
| 52 |
+
<!-- Balloons will be added here by JavaScript -->
|
| 53 |
+
</div>
|
| 54 |
+
|
| 55 |
+
<div class="text-center mt-8">
|
| 56 |
+
<button id="reset-btn" class="bg-purple-600 hover:bg-purple-700 text-white font-bold py-3 px-6 rounded-full shadow-lg transition-all">
|
| 57 |
+
Reset Balloons
|
| 58 |
+
</button>
|
| 59 |
+
</div>
|
| 60 |
+
</div>
|
| 61 |
+
|
| 62 |
+
<script>
|
| 63 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 64 |
+
const container = document.getElementById('balloons-container');
|
| 65 |
+
const resetBtn = document.getElementById('reset-btn');
|
| 66 |
+
const colors = ['bg-red-500', 'bg-yellow-400', 'bg-green-400', 'bg-blue-400', 'bg-purple-400', 'bg-pink-400'];
|
| 67 |
+
const letters = ['L', 'y', 'n', 'x'];
|
| 68 |
+
let balloons = [];
|
| 69 |
+
|
| 70 |
+
function createBalloons() {
|
| 71 |
+
// Clear existing balloons
|
| 72 |
+
container.innerHTML = '';
|
| 73 |
+
balloons = [];
|
| 74 |
+
|
| 75 |
+
// Create balloon for each letter
|
| 76 |
+
letters.forEach((letter, index) => {
|
| 77 |
+
const balloon = document.createElement('div');
|
| 78 |
+
const color = colors[index % colors.length];
|
| 79 |
+
|
| 80 |
+
balloon.className = `balloon w-20 h-24 ${color} rounded-full flex items-center justify-center text-white font-bold text-2xl shadow-lg`;
|
| 81 |
+
balloon.textContent = letter;
|
| 82 |
+
balloon.style.left = `${20 + index * 20}%`;
|
| 83 |
+
balloon.style.top = `${30 + Math.random() * 40}%`;
|
| 84 |
+
|
| 85 |
+
// Add string
|
| 86 |
+
const string = document.createElement('div');
|
| 87 |
+
string.className = 'absolute w-1 h-16 bg-gray-300 bottom-[-4rem] left-1/2 transform -translate-x-1/2';
|
| 88 |
+
balloon.appendChild(string);
|
| 89 |
+
|
| 90 |
+
balloon.addEventListener('click', function(e) {
|
| 91 |
+
e.stopPropagation();
|
| 92 |
+
popBalloon(balloon);
|
| 93 |
+
});
|
| 94 |
+
|
| 95 |
+
container.appendChild(balloon);
|
| 96 |
+
balloons.push(balloon);
|
| 97 |
+
});
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
function popBalloon(balloon) {
|
| 101 |
+
// Get position
|
| 102 |
+
const rect = balloon.getBoundingClientRect();
|
| 103 |
+
const x = rect.left + rect.width / 2;
|
| 104 |
+
const y = rect.top + rect.height / 2;
|
| 105 |
+
|
| 106 |
+
// Create confetti effect
|
| 107 |
+
confetti({
|
| 108 |
+
particleCount: 100,
|
| 109 |
+
angle: 270,
|
| 110 |
+
spread: 180,
|
| 111 |
+
origin: { x: x / window.innerWidth, y: y / window.innerHeight },
|
| 112 |
+
colors: ['#ff0000', '#ffff00', '#00ff00', '#0000ff', '#ff00ff']
|
| 113 |
+
});
|
| 114 |
+
|
| 115 |
+
// Remove balloon
|
| 116 |
+
balloon.style.display = 'none';
|
| 117 |
+
|
| 118 |
+
// Play pop sound
|
| 119 |
+
const popSound = new Audio('https://assets.mixkit.co/sfx/preview/mixkit-balloon-pop-with-delay-2350.mp3');
|
| 120 |
+
popSound.play();
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
function handleBackgroundClick(e) {
|
| 124 |
+
// Create random balloon where clicked
|
| 125 |
+
if (e.target === container) {
|
| 126 |
+
const balloon = document.createElement('div');
|
| 127 |
+
const color = colors[Math.floor(Math.random() * colors.length)];
|
| 128 |
+
|
| 129 |
+
balloon.className = `balloon w-20 h-24 ${color} rounded-full flex items-center justify-center text-white font-bold text-2xl shadow-lg`;
|
| 130 |
+
balloon.textContent = letters[Math.floor(Math.random() * letters.length)];
|
| 131 |
+
|
| 132 |
+
// Position at click location
|
| 133 |
+
const x = e.clientX - container.getBoundingClientRect().left - 40;
|
| 134 |
+
const y = e.clientY - container.getBoundingClientRect().top - 40;
|
| 135 |
+
|
| 136 |
+
balloon.style.left = `${x}px`;
|
| 137 |
+
balloon.style.top = `${y}px`;
|
| 138 |
+
|
| 139 |
+
// Add string
|
| 140 |
+
const string = document.createElement('div');
|
| 141 |
+
string.className = 'absolute w-1 h-16 bg-gray-300 bottom-[-4rem] left-1/2 transform -translate-x-1/2';
|
| 142 |
+
balloon.appendChild(string);
|
| 143 |
+
|
| 144 |
+
balloon.addEventListener('click', function(e) {
|
| 145 |
+
e.stopPropagation();
|
| 146 |
+
popBalloon(balloon);
|
| 147 |
+
});
|
| 148 |
+
|
| 149 |
+
container.appendChild(balloon);
|
| 150 |
+
balloons.push(balloon);
|
| 151 |
+
}
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
// Initialize
|
| 155 |
+
createBalloons();
|
| 156 |
+
|
| 157 |
+
// Event listeners
|
| 158 |
+
container.addEventListener('click', handleBackgroundClick);
|
| 159 |
+
resetBtn.addEventListener('click', createBalloons);
|
| 160 |
+
|
| 161 |
+
// Make balloons draggable
|
| 162 |
+
balloons.forEach(balloon => {
|
| 163 |
+
makeDraggable(balloon);
|
| 164 |
+
});
|
| 165 |
+
|
| 166 |
+
function makeDraggable(element) {
|
| 167 |
+
let pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
|
| 168 |
+
|
| 169 |
+
element.onmousedown = dragMouseDown;
|
| 170 |
+
|
| 171 |
+
function dragMouseDown(e) {
|
| 172 |
+
e = e || window.event;
|
| 173 |
+
e.preventDefault();
|
| 174 |
+
|
| 175 |
+
// Get initial position
|
| 176 |
+
pos3 = e.clientX;
|
| 177 |
+
pos4 = e.clientY;
|
| 178 |
+
|
| 179 |
+
document.onmouseup = closeDragElement;
|
| 180 |
+
document.onmousemove = elementDrag;
|
| 181 |
+
}
|
| 182 |
+
|
| 183 |
+
function elementDrag(e) {
|
| 184 |
+
e = e || window.event;
|
| 185 |
+
e.preventDefault();
|
| 186 |
+
|
| 187 |
+
// Calculate new position
|
| 188 |
+
pos1 = pos3 - e.clientX;
|
| 189 |
+
pos2 = pos4 - e.clientY;
|
| 190 |
+
pos3 = e.clientX;
|
| 191 |
+
pos4 = e.clientY;
|
| 192 |
+
|
| 193 |
+
// Set new position
|
| 194 |
+
element.style.top = (element.offsetTop - pos2) + "px";
|
| 195 |
+
element.style.left = (element.offsetLeft - pos1) + "px";
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
+
function closeDragElement() {
|
| 199 |
+
// Stop moving when mouse button is released
|
| 200 |
+
document.onmouseup = null;
|
| 201 |
+
document.onmousemove = null;
|
| 202 |
+
}
|
| 203 |
+
}
|
| 204 |
+
});
|
| 205 |
+
</script>
|
| 206 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=triptrap/lynx" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 207 |
+
</html>
|