File size: 17,191 Bytes
4f596c4 |
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 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Snapchat Clone</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.camera-view {
position: relative;
width: 100%;
height: 100vh;
background: linear-gradient(to bottom, #FFFC00, #FFD700);
overflow: hidden;
}
.camera-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
}
.snap-button {
width: 70px;
height: 70px;
border-radius: 50%;
border: 4px solid white;
background: rgba(255, 255, 255, 0.3);
transition: all 0.2s;
}
.snap-button:active {
transform: scale(0.95);
}
.story-circle {
width: 60px;
height: 60px;
border-radius: 50%;
border: 3px solid #FFFC00;
background: linear-gradient(45deg, #FF5F6D, #FFC371);
}
.chat-bubble {
background: rgba(255, 255, 255, 0.9);
border-radius: 18px;
max-width: 70%;
}
.unread-badge {
width: 20px;
height: 20px;
border-radius: 50%;
background: #FF0000;
color: white;
font-size: 12px;
}
.tab-bar {
background: rgba(255, 255, 255, 0.9);
backdrop-filter: blur(10px);
}
.snap-animation {
animation: snapFlash 0.5s;
}
@keyframes snapFlash {
0% { opacity: 0; }
50% { opacity: 1; }
100% { opacity: 0; }
}
</style>
</head>
<body class="bg-gray-100 font-sans">
<!-- Camera View -->
<div class="camera-view" id="cameraView">
<!-- Camera overlay with controls -->
<div class="camera-overlay flex flex-col justify-between p-4">
<!-- Top bar -->
<div class="flex justify-between items-center">
<button class="pointer-events-auto bg-black bg-opacity-30 text-white rounded-full p-2">
<i class="fas fa-cog text-xl"></i>
</button>
<div class="flex space-x-2">
<button class="pointer-events-auto bg-black bg-opacity-30 text-white rounded-full px-3 py-1 text-sm">
Memories
</button>
<button class="pointer-events-auto bg-black bg-opacity-30 text-white rounded-full px-3 py-1 text-sm">
Scan
</button>
</div>
<button class="pointer-events-auto bg-black bg-opacity-30 text-white rounded-full p-2">
<i class="fas fa-bolt text-xl"></i>
</button>
</div>
<!-- Camera controls -->
<div class="flex flex-col items-center space-y-4">
<div class="flex space-x-4 items-center">
<button class="pointer-events-auto bg-black bg-opacity-30 text-white rounded-full p-2">
<i class="fas fa-music text-xl"></i>
</button>
<button class="pointer-events-auto bg-black bg-opacity-30 text-white rounded-full p-2">
<i class="fas fa-cut text-xl"></i>
</button>
</div>
</div>
<!-- Bottom controls -->
<div class="flex justify-between items-center">
<button class="pointer-events-auto bg-black bg-opacity-30 text-white rounded-full p-3">
<i class="fas fa-images text-xl"></i>
</button>
<!-- Snap button -->
<button id="snapButton" class="pointer-events-auto snap-button flex items-center justify-center">
<div class="w-full h-full rounded-full bg-white opacity-30"></div>
</button>
<button class="pointer-events-auto bg-black bg-opacity-30 text-white rounded-full p-3">
<i class="fas fa-sync-alt text-xl"></i>
</button>
</div>
</div>
<!-- Flash effect (hidden by default) -->
<div id="flashEffect" class="absolute inset-0 bg-white opacity-0 snap-animation hidden"></div>
</div>
<!-- Stories View (hidden by default) -->
<div id="storiesView" class="hidden h-screen bg-white">
<div class="p-4">
<div class="flex justify-between items-center mb-6">
<h1 class="text-2xl font-bold">Stories</h1>
<button class="text-gray-500">
<i class="fas fa-search text-xl"></i>
</button>
</div>
<div class="space-y-6">
<!-- My Story -->
<div class="flex items-center space-x-4">
<div class="story-circle flex items-center justify-center">
<i class="fas fa-plus text-white text-xl"></i>
</div>
<div>
<h3 class="font-bold">My Story</h3>
<p class="text-gray-500 text-sm">Tap to add to your story</p>
</div>
</div>
<!-- Friends Stories -->
<div>
<h3 class="font-bold text-gray-500 mb-3">Friends</h3>
<div class="space-y-4">
<!-- Story 1 -->
<div class="flex items-center space-x-4">
<div class="story-circle flex items-center justify-center">
<img src="https://randomuser.me/api/portraits/women/44.jpg" class="w-full h-full rounded-full object-cover" alt="Friend">
</div>
<div>
<h3 class="font-bold">Sarah</h3>
<p class="text-gray-500 text-sm">2h ago</p>
</div>
</div>
<!-- Story 2 -->
<div class="flex items-center space-x-4">
<div class="story-circle flex items-center justify-center">
<img src="https://randomuser.me/api/portraits/men/32.jpg" class="w-full h-full rounded-full object-cover" alt="Friend">
</div>
<div>
<h3 class="font-bold">Mike</h3>
<p class="text-gray-500 text-sm">4h ago</p>
</div>
</div>
<!-- Story 3 -->
<div class="flex items-center space-x-4">
<div class="story-circle flex items-center justify-center">
<img src="https://randomuser.me/api/portraits/women/68.jpg" class="w-full h-full rounded-full object-cover" alt="Friend">
</div>
<div>
<h3 class="font-bold">Emma</h3>
<p class="text-gray-500 text-sm">6h ago</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Chat View (hidden by default) -->
<div id="chatView" class="hidden h-screen bg-white">
<div class="p-4">
<div class="flex justify-between items-center mb-6">
<h1 class="text-2xl font-bold">Chat</h1>
<button class="text-gray-500">
<i class="fas fa-edit text-xl"></i>
</button>
</div>
<div class="space-y-4">
<!-- Chat 1 -->
<div class="flex items-center space-x-4">
<div class="w-12 h-12 rounded-full bg-yellow-300 flex items-center justify-center">
<img src="https://randomuser.me/api/portraits/women/44.jpg" class="w-full h-full rounded-full object-cover" alt="Friend">
</div>
<div class="flex-1">
<h3 class="font-bold">Sarah</h3>
<p class="text-gray-500 text-sm">Hey! How are you?</p>
</div>
<div class="text-right">
<p class="text-gray-500 text-sm">2m ago</p>
<div class="unread-badge flex items-center justify-center mt-1">3</div>
</div>
</div>
<!-- Chat 2 -->
<div class="flex items-center space-x-4">
<div class="w-12 h-12 rounded-full bg-pink-300 flex items-center justify-center">
<img src="https://randomuser.me/api/portraits/men/32.jpg" class="w-full h-full rounded-full object-cover" alt="Friend">
</div>
<div class="flex-1">
<h3 class="font-bold">Mike</h3>
<p class="text-gray-500 text-sm">Check out this snap!</p>
</div>
<div class="text-right">
<p class="text-gray-500 text-sm">15m ago</p>
</div>
</div>
<!-- Chat 3 -->
<div class="flex items-center space-x-4">
<div class="w-12 h-12 rounded-full bg-blue-300 flex items-center justify-center">
<img src="https://randomuser.me/api/portraits/women/68.jpg" class="w-full h-full rounded-full object-cover" alt="Friend">
</div>
<div class="flex-1">
<h3 class="font-bold">Emma</h3>
<p class="text-gray-500 text-sm">Let's meet up later</p>
</div>
<div class="text-right">
<p class="text-gray-500 text-sm">1h ago</p>
<div class="unread-badge flex items-center justify-center mt-1">1</div>
</div>
</div>
</div>
</div>
</div>
<!-- Tab Bar -->
<div class="tab-bar fixed bottom-0 left-0 right-0 flex justify-around items-center p-3 border-t border-gray-200">
<button id="cameraTab" class="text-gray-700 p-2 rounded-full bg-yellow-100">
<i class="fas fa-camera text-xl"></i>
</button>
<button id="storiesTab" class="text-gray-500 p-2 rounded-full">
<i class="fas fa-users text-xl"></i>
</button>
<button id="chatTab" class="text-gray-500 p-2 rounded-full">
<i class="fas fa-comment text-xl"></i>
</button>
</div>
<script>
// Tab switching functionality
const cameraTab = document.getElementById('cameraTab');
const storiesTab = document.getElementById('storiesTab');
const chatTab = document.getElementById('chatTab');
const cameraView = document.getElementById('cameraView');
const storiesView = document.getElementById('storiesView');
const chatView = document.getElementById('chatView');
cameraTab.addEventListener('click', () => {
cameraView.classList.remove('hidden');
storiesView.classList.add('hidden');
chatView.classList.add('hidden');
cameraTab.classList.add('bg-yellow-100');
cameraTab.classList.remove('text-gray-500');
cameraTab.classList.add('text-gray-700');
storiesTab.classList.remove('bg-yellow-100');
storiesTab.classList.add('text-gray-500');
storiesTab.classList.remove('text-gray-700');
chatTab.classList.remove('bg-yellow-100');
chatTab.classList.add('text-gray-500');
chatTab.classList.remove('text-gray-700');
});
storiesTab.addEventListener('click', () => {
cameraView.classList.add('hidden');
storiesView.classList.remove('hidden');
chatView.classList.add('hidden');
cameraTab.classList.remove('bg-yellow-100');
cameraTab.classList.add('text-gray-500');
cameraTab.classList.remove('text-gray-700');
storiesTab.classList.add('bg-yellow-100');
storiesTab.classList.remove('text-gray-500');
storiesTab.classList.add('text-gray-700');
chatTab.classList.remove('bg-yellow-100');
chatTab.classList.add('text-gray-500');
chatTab.classList.remove('text-gray-700');
});
chatTab.addEventListener('click', () => {
cameraView.classList.add('hidden');
storiesView.classList.add('hidden');
chatView.classList.remove('hidden');
cameraTab.classList.remove('bg-yellow-100');
cameraTab.classList.add('text-gray-500');
cameraTab.classList.remove('text-gray-700');
storiesTab.classList.remove('bg-yellow-100');
storiesTab.classList.add('text-gray-500');
storiesTab.classList.remove('text-gray-700');
chatTab.classList.add('bg-yellow-100');
chatTab.classList.remove('text-gray-500');
chatTab.classList.add('text-gray-700');
});
// Snap button functionality
const snapButton = document.getElementById('snapButton');
const flashEffect = document.getElementById('flashEffect');
snapButton.addEventListener('click', () => {
// Show flash effect
flashEffect.classList.remove('hidden');
flashEffect.classList.remove('opacity-0');
flashEffect.classList.add('opacity-100');
// Reset after animation
setTimeout(() => {
flashEffect.classList.add('opacity-0');
flashEffect.classList.remove('opacity-100');
setTimeout(() => {
flashEffect.classList.add('hidden');
}, 500);
}, 500);
// Vibrate on snap (if supported)
if ('vibrate' in navigator) {
navigator.vibrate(50);
}
});
// Swipe between tabs (simplified version)
let startX = 0;
let endX = 0;
document.addEventListener('touchstart', (e) => {
startX = e.changedTouches[0].screenX;
});
document.addEventListener('touchend', (e) => {
endX = e.changedTouches[0].screenX;
handleSwipe();
});
function handleSwipe() {
const threshold = 50;
if (startX - endX > threshold) {
// Swipe left - go to stories if on camera
if (!cameraView.classList.contains('hidden')) {
storiesTab.click();
}
// Or go to chat if on stories
else if (!storiesView.classList.contains('hidden')) {
chatTab.click();
}
} else if (endX - startX > threshold) {
// Swipe right - go to camera if on stories
if (!storiesView.classList.contains('hidden')) {
cameraTab.click();
}
// Or go to stories if on chat
else if (!chatView.classList.contains('hidden')) {
storiesTab.click();
}
}
}
</script>
<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=Kast8/https-snahct-com-post-targe" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |