Spaces:
Running
Running
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Spark - Dating App</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> | |
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap'); | |
body { | |
font-family: 'Inter', sans-serif; | |
-webkit-tap-highlight-color: transparent; | |
} | |
.profile-card { | |
box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1); | |
border-radius: 16px; | |
overflow: hidden; | |
transform-style: preserve-3d; | |
} | |
.swipe-left { | |
transform: translateX(-100%) rotate(-15deg); | |
opacity: 0; | |
transition: all 0.5s ease; | |
} | |
.swipe-right { | |
transform: translateX(100%) rotate(15deg); | |
opacity: 0; | |
transition: all 0.5s ease; | |
} | |
.prompt-answer { | |
background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%); | |
border-radius: 12px; | |
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); | |
} | |
.like-button { | |
box-shadow: 0 4px 15px rgba(251, 113, 133, 0.4); | |
} | |
.dislike-button { | |
box-shadow: 0 4px 15px rgba(156, 163, 175, 0.4); | |
} | |
.comment-button { | |
box-shadow: 0 4px 15px rgba(96, 165, 250, 0.4); | |
} | |
.tab-active { | |
color: #ec4899; | |
position: relative; | |
} | |
.tab-active:after { | |
content: ''; | |
position: absolute; | |
bottom: -8px; | |
left: 50%; | |
transform: translateX(-50%); | |
width: 6px; | |
height: 6px; | |
background-color: #ec4899; | |
border-radius: 50%; | |
} | |
.profile-image { | |
transition: transform 0.3s ease; | |
} | |
.profile-image:hover { | |
transform: scale(1.03); | |
} | |
.match-badge { | |
position: absolute; | |
bottom: 10px; | |
right: 10px; | |
background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%); | |
color: white; | |
width: 24px; | |
height: 24px; | |
border-radius: 50%; | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
font-size: 12px; | |
font-weight: bold; | |
} | |
.spark-animation { | |
position: absolute; | |
width: 100%; | |
height: 100%; | |
top: 0; | |
left: 0; | |
pointer-events: none; | |
z-index: 10; | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
opacity: 0; | |
} | |
.spark-animation i { | |
font-size: 120px; | |
color: #ec4899; | |
text-shadow: 0 0 20px rgba(236, 72, 153, 0.6); | |
animation: pulse 0.8s ease-out; | |
} | |
@keyframes pulse { | |
0% { transform: scale(0.8); opacity: 0; } | |
50% { transform: scale(1.2); opacity: 1; } | |
100% { transform: scale(1.5); opacity: 0; } | |
} | |
.profile-badge { | |
position: absolute; | |
bottom: -5px; | |
right: -5px; | |
background: white; | |
border-radius: 50%; | |
padding: 2px; | |
box-shadow: 0 2px 4px rgba(0,0,0,0.1); | |
} | |
.profile-badge i { | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
width: 20px; | |
height: 20px; | |
border-radius: 50%; | |
font-size: 10px; | |
} | |
.verified-badge { | |
background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); | |
color: white; | |
} | |
.premium-badge { | |
background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); | |
color: white; | |
} | |
</style> | |
</head> | |
<body class="bg-gray-50 text-gray-800 max-w-md mx-auto relative overflow-x-hidden"> | |
<!-- Header --> | |
<header class="sticky top-0 z-10 bg-white bg-opacity-90 backdrop-blur-sm p-4 border-b border-gray-100 flex justify-between items-center"> | |
<button class="text-gray-500 hover:text-gray-700 transition-colors"> | |
<i class="fas fa-gear text-xl"></i> | |
</button> | |
<h1 class="text-2xl font-bold bg-gradient-to-r from-pink-500 to-rose-500 bg-clip-text text-transparent">Spark</h1> | |
<button class="text-gray-500 hover:text-gray-700 transition-colors"> | |
<i class="fas fa-inbox text-xl"></i> | |
<span class="absolute top-3 right-3 w-2 h-2 bg-rose-500 rounded-full"></span> | |
</button> | |
</header> | |
<!-- Main Content --> | |
<main class="pb-24"> | |
<!-- Discovery Section --> | |
<section id="discovery" class="px-4 pt-4"> | |
<!-- Profile Card --> | |
<div class="profile-card bg-white mb-4 relative"> | |
<!-- Spark Animation (hidden by default) --> | |
<div class="spark-animation"> | |
<i class="fas fa-heart"></i> | |
</div> | |
<!-- Profile Image --> | |
<div class="relative h-96 w-full overflow-hidden"> | |
<img src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=774&q=80" | |
alt="Profile" | |
class="w-full h-full object-cover profile-image"> | |
<div class="absolute bottom-4 left-4 flex space-x-2"> | |
<span class="bg-white bg-opacity-90 text-gray-800 px-3 py-1 rounded-full text-sm font-medium">27</span> | |
<span class="bg-white bg-opacity-90 text-gray-800 px-3 py-1 rounded-full text-sm font-medium flex items-center"> | |
<i class="fas fa-map-marker-alt text-rose-400 mr-1"></i> 3 miles | |
</span> | |
</div> | |
</div> | |
<!-- Profile Info --> | |
<div class="p-4"> | |
<div class="flex justify-between items-start mb-2"> | |
<div> | |
<h2 class="text-xl font-bold flex items-center"> | |
Sarah | |
<span class="profile-badge ml-1"> | |
<i class="fas fa-check verified-badge"></i> | |
</span> | |
</h2> | |
<p class="text-gray-500 text-sm">Artist • UCLA Grad</p> | |
</div> | |
<div class="flex space-x-1"> | |
<span class="bg-gray-100 text-gray-600 px-2 py-1 rounded-full text-xs">5'7"</span> | |
<span class="bg-gray-100 text-gray-600 px-2 py-1 rounded-full text-xs">ENFJ</span> | |
</div> | |
</div> | |
<!-- Compatibility Meter --> | |
<div class="mb-4"> | |
<div class="flex justify-between text-xs text-gray-500 mb-1"> | |
<span>Compatibility</span> | |
<span>92%</span> | |
</div> | |
<div class="w-full bg-gray-200 rounded-full h-1.5"> | |
<div class="bg-gradient-to-r from-pink-500 to-rose-500 h-1.5 rounded-full" style="width: 92%"></div> | |
</div> | |
</div> | |
<!-- Prompts --> | |
<div class="space-y-3"> | |
<div class="prompt-answer p-3"> | |
<p class="text-sm text-gray-500 mb-1">My simple pleasures</p> | |
<p class="font-medium">Morning coffee, museum visits, and spontaneous road trips</p> | |
</div> | |
<div class="prompt-answer p-3"> | |
<p class="text-sm text-gray-500 mb-1">I'll pick the first date spot</p> | |
<p class="font-medium">A cozy bookstore café with great ambiance</p> | |
</div> | |
<div class="prompt-answer p-3"> | |
<p class="text-sm text-gray-500 mb-1">Together, we could</p> | |
<p class="font-medium">Explore local art galleries and try every ice cream shop in town</p> | |
<div class="flex items-center mt-2"> | |
<div class="flex -space-x-2"> | |
<img class="w-6 h-6 rounded-full border-2 border-white" src="https://images.unsplash.com/photo-1573496359142-b8d87734a5cd?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=688&q=80" alt=""> | |
<img class="w-6 h-6 rounded-full border-2 border-white" src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=774&q=80" alt=""> | |
</div> | |
<span class="text-xs text-gray-500 ml-2">2 friends in common</span> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<!-- Action Buttons --> | |
<div class="flex justify-center items-center space-x-6 py-4"> | |
<button class="dislike-button bg-white w-14 h-14 rounded-full flex items-center justify-center text-gray-500 text-2xl hover:bg-gray-100 transition-colors"> | |
<i class="fas fa-times"></i> | |
</button> | |
<button class="comment-button bg-white w-14 h-14 rounded-full flex items-center justify-center text-blue-400 text-xl hover:bg-blue-50 transition-colors"> | |
<i class="fas fa-comment"></i> | |
</button> | |
<button class="like-button bg-rose-400 w-16 h-16 rounded-full flex items-center justify-center text-white text-2xl hover:bg-rose-500 transition-colors"> | |
<i class="fas fa-heart"></i> | |
</button> | |
</div> | |
</section> | |
<!-- Matches Section (Hidden by default) --> | |
<section id="matches" class="hidden px-4 pt-4"> | |
<div class="flex justify-between items-center mb-4"> | |
<h2 class="text-xl font-bold">Your Matches</h2> | |
<button class="text-pink-500 text-sm font-medium">See all</button> | |
</div> | |
<!-- New Matches --> | |
<div class="mb-6"> | |
<h3 class="text-sm font-medium text-gray-500 mb-3">NEW MATCHES</h3> | |
<div class="flex space-x-3 overflow-x-auto pb-2"> | |
<!-- New Match Circle --> | |
<div class="flex flex-col items-center shrink-0"> | |
<div class="relative"> | |
<img src="https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=774&q=80" | |
alt="Match" | |
class="w-16 h-16 rounded-full object-cover border-2 border-pink-500"> | |
<div class="match-badge"> | |
<i class="fas fa-bolt"></i> | |
</div> | |
</div> | |
<span class="text-xs mt-1 font-medium">Michael</span> | |
</div> | |
<!-- New Match Circle --> | |
<div class="flex flex-col items-center shrink-0"> | |
<div class="relative"> | |
<img src="https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=870&q=80" | |
alt="Match" | |
class="w-16 h-16 rounded-full object-cover border-2 border-pink-500"> | |
</div> | |
<span class="text-xs mt-1 font-medium">Jessica</span> | |
</div> | |
<!-- New Match Circle --> | |
<div class="flex flex-col items-center shrink-0"> | |
<div class="relative"> | |
<img src="https://images.unsplash.com/photo-1531123897727-8f129e1688ce?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=774&q=80" | |
alt="Match" | |
class="w-16 h-16 rounded-full object-cover border-2 border-pink-500"> | |
<div class="match-badge"> | |
<i class="fas fa-bolt"></i> | |
</div> | |
</div> | |
<span class="text-xs mt-1 font-medium">David</span> | |
</div> | |
<!-- New Match Circle --> | |
<div class="flex flex-col items-center shrink-0"> | |
<div class="relative"> | |
<img src="https://images.unsplash.com/photo-1544005313-94ddf0286df2?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=776&q=80" | |
alt="Match" | |
class="w-16 h-16 rounded-full object-cover border-2 border-pink-500"> | |
</div> | |
<span class="text-xs mt-1 font-medium">Emma</span> | |
</div> | |
</div> | |
</div> | |
<!-- Messages --> | |
<div> | |
<h3 class="text-sm font-medium text-gray-500 mb-3">MESSAGES</h3> | |
<div class="space-y-3"> | |
<!-- Message Card --> | |
<div class="bg-white rounded-xl p-3 flex items-center space-x-3 shadow-sm"> | |
<div class="relative"> | |
<img src="https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=774&q=80" | |
alt="Match" | |
class="w-12 h-12 rounded-full object-cover"> | |
<div class="absolute bottom-0 right-0 w-3 h-3 bg-green-500 rounded-full border-2 border-white"></div> | |
</div> | |
<div class="flex-1"> | |
<div class="flex justify-between items-center"> | |
<h3 class="font-bold">Michael</h3> | |
<span class="text-xs text-gray-400">2h ago</span> | |
</div> | |
<p class="text-sm text-gray-500 truncate">Hey! How about we check out that new hiking trail this weekend?</p> | |
</div> | |
</div> | |
<!-- Message Card --> | |
<div class="bg-white rounded-xl p-3 flex items-center space-x-3 shadow-sm"> | |
<div class="relative"> | |
<img src="https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=870&q=80" | |
alt="Match" | |
class="w-12 h-12 rounded-full object-cover"> | |
</div> | |
<div class="flex-1"> | |
<div class="flex justify-between items-center"> | |
<h3 class="font-bold">Jessica</h3> | |
<span class="text-xs text-gray-400">1d ago</span> | |
</div> | |
<p class="text-sm text-gray-500 truncate">I found this amazing Italian place we should try!</p> | |
</div> | |
<span class="w-2 h-2 bg-pink-500 rounded-full"></span> | |
</div> | |
<!-- Message Card --> | |
<div class="bg-white rounded-xl p-3 flex items-center space-x-3 shadow-sm"> | |
<div class="relative"> | |
<img src="https://images.unsplash.com/photo-1531123897727-8f129e1688ce?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=774&q=80" | |
alt="Match" | |
class="w-12 h-12 rounded-full object-cover"> | |
</div> | |
<div class="flex-1"> | |
<div class="flex justify-between items-center"> | |
<h3 class="font-bold">David</h3> | |
<span class="text-xs text-gray-400">2d ago</span> | |
</div> | |
<p class="text-sm text-gray-500 truncate">Are you still up for the concert next week?</p> | |
</div> | |
</div> | |
</div> | |
</div> | |
</section> | |
<!-- Profile Section (Hidden by default) --> | |
<section id="profile" class="hidden px-4 pt-4"> | |
<div class="bg-white rounded-xl p-4 shadow-sm mb-4"> | |
<div class="flex items-center space-x-4 mb-4"> | |
<div class="relative"> | |
<img src="https://images.unsplash.com/photo-1573496359142-b8d87734a5cd?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=688&q=80" | |
alt="Your Profile" | |
class="w-16 h-16 rounded-full object-cover"> | |
<span class="profile-badge"> | |
<i class="fas fa-crown premium-badge"></i> | |
</span> | |
</div> | |
<div> | |
<h2 class="font-bold text-lg flex items-center"> | |
Alex | |
<span class="profile-badge ml-1"> | |
<i class="fas fa-check verified-badge"></i> | |
</span> | |
</h2> | |
<p class="text-gray-500">Software Developer</p> | |
<div class="flex items-center mt-1"> | |
<i class="fas fa-map-marker-alt text-xs text-gray-400 mr-1"></i> | |
<span class="text-xs text-gray-500">Los Angeles, CA</span> | |
</div> | |
</div> | |
</div> | |
<button class="w-full border border-gray-200 py-2 rounded-lg text-sm font-medium hover:bg-gray-50 transition-colors"> | |
Edit Profile | |
</button> | |
<!-- Stats --> | |
<div class="flex justify-between mt-4 pt-4 border-t border-gray-100"> | |
<div class="text-center"> | |
<p class="text-sm text-gray-500">Matches</p> | |
<p class="font-bold text-pink-500">24</p> | |
</div> | |
<div class="text-center"> | |
<p class="text-sm text-gray-500">Likes</p> | |
<p class="font-bold text-pink-500">156</p> | |
</div> | |
<div class="text-center"> | |
<p class="text-sm text-gray-500">Visits</p> | |
<p class="font-bold text-pink-500">342</p> | |
</div> | |
</div> | |
</div> | |
<div class="bg-white rounded-xl p-4 shadow-sm mb-4"> | |
<h3 class="font-bold mb-3">About Me</h3> | |
<p class="text-gray-600 text-sm mb-4"> | |
Software developer by day, amateur chef by night. Love hiking, photography, and indie music. Looking for someone to share adventures with and explore new places. | |
</p> | |
<div class="grid grid-cols-2 gap-2 mb-4"> | |
<span class="bg-gray-100 text-gray-600 px-3 py-1 rounded-full text-xs text-center">5'11"</span> | |
<span class="bg-gray-100 text-gray-600 px-3 py-1 rounded-full text-xs text-center">INTJ</span> | |
<span class="bg-gray-100 text-gray-600 px-3 py-1 rounded-full text-xs text-center">Single</span> | |
<span class="bg-gray-100 text-gray-600 px-3 py-1 rounded-full text-xs text-center">No Kids</span> | |
</div> | |
<div class="space-y-2"> | |
<div class="flex items-center"> | |
<i class="fas fa-briefcase text-gray-400 mr-2 text-sm"></i> | |
<span class="text-sm text-gray-600">Software Engineer at TechCo</span> | |
</div> | |
<div class="flex items-center"> | |
<i class="fas fa-graduation-cap text-gray-400 mr-2 text-sm"></i> | |
<span class="text-sm text-gray-600">Stanford University</span> | |
</div> | |
<div class="flex items-center"> | |
<i class="fas fa-heart text-gray-400 mr-2 text-sm"></i> | |
<span class="text-sm text-gray-600">Looking for a relationship</span> | |
</div> | |
</div> | |
</div> | |
<div class="bg-white rounded-xl p-4 shadow-sm"> | |
<div class="flex justify-between items-center mb-3"> | |
<h3 class="font-bold">My Prompts</h3> | |
<button class="text-pink-500 text-sm font-medium">Edit</button> | |
</div> | |
<div class="space-y-3"> | |
<div class="border border-gray-100 rounded-lg p-3"> | |
<p class="text-sm text-gray-500 mb-1">I geek out on</p> | |
<p class="font-medium">Indie films and obscure music genres</p> | |
</div> | |
<div class="border border-gray-100 rounded-lg p-3"> | |
<p class="text-sm text-gray-500 mb-1">I won't shut up about</p> | |
<p class="font-medium">My dog and the latest tech gadgets</p> | |
</div> | |
<div class="border border-gray-100 rounded-lg p-3"> | |
<p class="text-sm text-gray-500 mb-1">A life goal of mine</p> | |
<p class="font-medium">To visit every national park in the US</p> | |
</div> | |
</div> | |
<button class="mt-4 w-full border border-gray-200 py-2 rounded-lg text-sm font-medium hover:bg-gray-50 transition-colors flex items-center justify-center"> | |
<i class="fas fa-plus mr-2"></i> | |
Add New Prompt | |
</button> | |
</div> | |
<!-- Settings --> | |
<div class="bg-white rounded-xl p-4 shadow-sm mt-4"> | |
<h3 class="font-bold mb-3">Settings</h3> | |
<div class="space-y-3"> | |
<button class="w-full flex justify-between items-center py-2"> | |
<span class="text-gray-700">Account Settings</span> | |
<i class="fas fa-chevron-right text-gray-400"></i> | |
</button> | |
<button class="w-full flex justify-between items-center py-2"> | |
<span class="text-gray-700">Privacy</span> | |
<i class="fas fa-chevron-right text-gray-400"></i> | |
</button> | |
<button class="w-full flex justify-between items-center py-2"> | |
<span class="text-gray-700">Notifications</span> | |
<i class="fas fa-chevron-right text-gray-400"></i> | |
</button> | |
<button class="w-full flex justify-between items-center py-2"> | |
<span class="text-gray-700">Subscription</span> | |
<i class="fas fa-chevron-right text-gray-400"></i> | |
</button> | |
<button class="w-full flex justify-between items-center py-2 text-rose-500 font-medium"> | |
<span>Log Out</span> | |
<i class="fas fa-sign-out-alt"></i> | |
</button> | |
</div> | |
</div> | |
</section> | |
</main> | |
<!-- Bottom Navigation --> | |
<nav class="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-100 flex justify-around py-3 z-10"> | |
<button class="tab-button flex flex-col items-center text-gray-400 tab-active" data-tab="discovery"> | |
<i class="fas fa-home text-xl"></i> | |
<span class="text-xs mt-1">Discover</span> | |
</button> | |
<button class="tab-button flex flex-col items-center text-gray-400" data-tab="matches"> | |
<i class="fas fa-comments text-xl relative"> | |
<span class="absolute -top-1 -right-1 w-2 h-2 bg-pink-500 rounded-full"></span> | |
</i> | |
<span class="text-xs mt-1">Matches</span> | |
</button> | |
<button class="tab-button flex flex-col items-center text-gray-400" data-tab="profile"> | |
<i class="fas fa-user text-xl"></i> | |
<span class="text-xs mt-1">Profile</span> | |
</button> | |
</nav> | |
<!-- Comment Modal (Hidden by default) --> | |
<div id="comment-modal" class="fixed inset-0 bg-black bg-opacity-50 z-20 hidden flex items-center justify-center p-4"> | |
<div class="bg-white rounded-xl w-full max-w-md p-4 animate-fade-in"> | |
<div class="flex justify-between items-center mb-4"> | |
<h3 class="font-bold">Add a comment</h3> | |
<button id="close-comment-modal" class="text-gray-500 hover:text-gray-700"> | |
<i class="fas fa-times"></i> | |
</button> | |
</div> | |
<div class="flex items-start space-x-3 mb-4"> | |
<img src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=774&q=80" | |
alt="Profile" | |
class="w-10 h-10 rounded-full object-cover"> | |
<div class="flex-1"> | |
<p class="font-medium">Sarah's prompt</p> | |
<p class="text-sm text-gray-600">Together, we could explore local art galleries and try every ice cream shop in town</p> | |
</div> | |
</div> | |
<textarea class="w-full border border-gray-200 rounded-lg p-3 mb-3 focus:ring-2 focus:ring-pink-500 focus:border-transparent" | |
placeholder="Add a comment to your like..." | |
rows="3"></textarea> | |
<button class="w-full bg-rose-400 text-white py-2 rounded-lg font-medium hover:bg-rose-500 transition-colors"> | |
Send Like | |
</button> | |
</div> | |
</div> | |
<script> | |
document.addEventListener('DOMContentLoaded', function() { | |
// Tab Navigation | |
const tabButtons = document.querySelectorAll('.tab-button'); | |
const sections = { | |
discovery: document.getElementById('discovery'), | |
matches: document.getElementById('matches'), | |
profile: document.getElementById('profile') | |
}; | |
// Set initial active tab | |
document.querySelector('.tab-active').classList.add('text-pink-500'); | |
tabButtons.forEach(button => { | |
button.addEventListener('click', function() { | |
const tabId = this.getAttribute('data-tab'); | |
// Update active tab | |
tabButtons.forEach(btn => { | |
btn.classList.remove('tab-active', 'text-pink-500'); | |
}); | |
this.classList.add('tab-active', 'text-pink-500'); | |
// Show corresponding section | |
Object.values(sections).forEach(section => section.classList.add('hidden')); | |
sections[tabId].classList.remove('hidden'); | |
}); | |
}); | |
// Swipe Actions | |
const profileCard = document.querySelector('.profile-card'); | |
const dislikeButton = document.querySelector('.dislike-button'); | |
const likeButton = document.querySelector('.like-button'); | |
const commentButton = document.querySelector('.comment-button'); | |
const commentModal = document.getElementById('comment-modal'); | |
const closeCommentModal = document.getElementById('close-comment-modal'); | |
const sparkAnimation = document.querySelector('.spark-animation'); | |
dislikeButton.addEventListener('click', function() { | |
profileCard.classList.add('swipe-left'); | |
setTimeout(() => { | |
// In a real app, you would fetch a new profile here | |
profileCard.classList.remove('swipe-left'); | |
// For demo purposes, we'll just reload the same card | |
setTimeout(() => { | |
profileCard.style.opacity = '1'; | |
}, 100); | |
}, 500); | |
}); | |
likeButton.addEventListener('click', function() { | |
// Show spark animation | |
sparkAnimation.style.opacity = '1'; | |
setTimeout(() => { | |
sparkAnimation.style.opacity = '0'; | |
}, 800); | |
// Swipe animation | |
profileCard.classList.add('swipe-right'); | |
setTimeout(() => { | |
// In a real app, you would fetch a new profile here | |
profileCard.classList.remove('swipe-right'); | |
// For demo purposes, we'll just reload the same card | |
setTimeout(() => { | |
profileCard.style.opacity = '1'; | |
}, 100); | |
}, 500); | |
}); | |
commentButton.addEventListener('click', function() { | |
commentModal.classList.remove('hidden'); | |
}); | |
closeCommentModal.addEventListener('click', function() { | |
commentModal.classList.add('hidden'); | |
}); | |
// Close modal when clicking outside | |
commentModal.addEventListener('click', function(e) { | |
if (e.target === commentModal) { | |
commentModal.classList.add('hidden'); | |
} | |
}); | |
// Simple drag functionality for the profile card | |
let isDragging = false; | |
let startPos = 0; | |
let currentTranslate = 0; | |
profileCard.addEventListener('mousedown', startDrag); | |
profileCard.addEventListener('touchstart', startDrag); | |
profileCard.addEventListener('mousemove', drag); | |
profileCard.addEventListener('touchmove', drag); | |
profileCard.addEventListener('mouseup', endDrag); | |
profileCard.addEventListener('mouseleave', endDrag); | |
profileCard.addEventListener('touchend', endDrag); | |
function startDrag(e) { | |
isDragging = true; | |
startPos = e.type.includes('mouse') ? e.clientX : e.touches[0].clientX; | |
profileCard.style.transition = 'none'; | |
} | |
function drag(e) { | |
if (!isDragging) return; | |
const currentPosition = e.type.includes('mouse') ? e.clientX : e.touches[0].clientX; | |
currentTranslate = currentPosition - startPos; | |
profileCard.style.transform = `translateX(${currentTranslate}px) rotate(${currentTranslate / 20}deg)`; | |
// Change button colors based on swipe direction | |
if (currentTranslate > 50) { | |
likeButton.classList.add('bg-rose-500'); | |
dislikeButton.classList.remove('bg-gray-200'); | |
} else if (currentTranslate < -50) { | |
dislikeButton.classList.add('bg-gray-200'); | |
likeButton.classList.remove('bg-rose-500'); | |
} else { | |
dislikeButton.classList.remove('bg-gray-200'); | |
likeButton.classList.remove('bg-rose-500'); | |
} | |
} | |
function endDrag() { | |
if (!isDragging) return; | |
isDragging = false; | |
profileCard.style.transition = 'transform 0.5s ease'; | |
// Reset button colors | |
dislikeButton.classList.remove('bg-gray-200'); | |
likeButton.classList.remove('bg-rose-500'); | |
if (Math.abs(currentTranslate) > 100) { | |
if (currentTranslate > 0) { | |
// Show spark animation for like | |
sparkAnimation.style.opacity = '1'; | |
setTimeout(() => { | |
sparkAnimation.style.opacity = '0'; | |
}, 800); | |
profileCard.classList.add('swipe-right'); | |
} else { | |
profileCard.classList.add('swipe-left'); | |
} | |
setTimeout(() => { | |
profileCard.classList.remove('swipe-right', 'swipe-left'); | |
profileCard.style.transform = 'none'; | |
// In a real app, fetch new profile here | |
}, 500); | |
} else { | |
profileCard.style.transform = 'none'; | |
} | |
} | |
}); | |
</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=smullertv/testing-only-ok" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
</html> |