model-1 / index.html
Sidali13's picture
Add 2 files
5b378f2 verified
Raw History Blame Contribute Delete
57.5 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tamimun - Connect with Friends</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>
/* Custom CSS for animations and additional styling */
.fade-in {
animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.gradient-bg {
background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
.chat-bubble {
border-radius: 20px;
position: relative;
max-width: 70%;
}
.chat-bubble:after {
content: '';
position: absolute;
bottom: 0;
width: 0;
height: 0;
border: 10px solid transparent;
}
.chat-bubble.sent {
background-color: #f59e0b;
color: white;
margin-left: auto;
}
.chat-bubble.sent:after {
border-left-color: #f59e0b;
border-right: 0;
right: -10px;
}
.chat-bubble.received {
background-color: #e5e7eb;
color: #1f2937;
margin-right: auto;
}
.chat-bubble.received:after {
border-right-color: #e5e7eb;
border-left: 0;
left: -10px;
}
.profile-pic {
transition: transform 0.3s ease;
}
.profile-pic:hover {
transform: scale(1.05);
}
.floating-btn {
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
transition: all 0.3s ease;
}
.floating-btn:hover {
transform: translateY(-3px);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.logo-container {
display: flex;
align-items: center;
}
.logo-icon {
font-size: 1.5rem;
margin-right: 0.5rem;
color: #d97706;
}
.logo-text {
font-weight: 700;
font-size: 1.25rem;
background: linear-gradient(to right, #d97706, #f59e0b);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
</style>
</head>
<body class="bg-gray-100 font-sans">
<!-- App Container -->
<div id="app" class="min-h-screen flex flex-col">
<!-- Navigation Bar -->
<nav class="bg-white shadow-lg">
<div class="max-w-6xl mx-auto px-4">
<div class="flex justify-between items-center py-3">
<!-- Logo/Brand -->
<div class="flex items-center space-x-4">
<div class="logo-container">
<i class="fas fa-location-arrow logo-icon"></i>
<span class="logo-text">Tamimun</span>
</div>
</div>
<!-- Primary Nav -->
<div class="hidden md:flex items-center space-x-8">
<a href="#" class="py-2 px-3 text-orange-500 border-b-2 border-orange-500 font-medium" onclick="showSection('home')">Home</a>
<a href="#" class="py-2 px-3 text-gray-500 hover:text-orange-500 font-medium" onclick="showSection('profile')">Profile</a>
<a href="#" class="py-2 px-3 text-gray-500 hover:text-orange-500 font-medium" onclick="showSection('chat')">Chat</a>
<a href="#" class="py-2 px-3 text-gray-500 hover:text-orange-500 font-medium" onclick="showSection('friends')">Friends</a>
</div>
<!-- Secondary Nav -->
<div class="flex items-center space-x-4">
<button id="logoutBtn" class="hidden bg-red-500 hover:bg-red-600 text-white px-4 py-2 rounded-lg font-medium transition duration-300" onclick="logout()">
Logout
</button>
<button id="loginBtn" class="bg-orange-500 hover:bg-orange-600 text-white px-4 py-2 rounded-lg font-medium transition duration-300" onclick="showSection('login')">
Login
</button>
</div>
<!-- Mobile button -->
<div class="md:hidden flex items-center">
<button id="mobileMenuBtn" class="outline-none mobile-menu-button">
<svg class="w-6 h-6 text-gray-500" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" stroke="currentColor">
<path d="M4 6h16M4 12h16M4 18h16"></path>
</svg>
</button>
</div>
</div>
</div>
<!-- Mobile Menu -->
<div class="hidden mobile-menu">
<ul class="bg-white shadow-lg">
<li><a href="#" class="block px-4 py-2 hover:bg-orange-500 hover:text-white" onclick="showSection('home')">Home</a></li>
<li><a href="#" class="block px-4 py-2 hover:bg-orange-500 hover:text-white" onclick="showSection('profile')">Profile</a></li>
<li><a href="#" class="block px-4 py-2 hover:bg-orange-500 hover:text-white" onclick="showSection('chat')">Chat</a></li>
<li><a href="#" class="block px-4 py-2 hover:bg-orange-500 hover:text-white" onclick="showSection('friends')">Friends</a></li>
<li><a href="#" class="block px-4 py-2 hover:bg-orange-500 hover:text-white" onclick="showSection('login')">Login</a></li>
</ul>
</div>
</nav>
<!-- Main Content -->
<main class="flex-grow container mx-auto px-4 py-6">
<!-- Home Section (Default) -->
<section id="home" class="fade-in">
<div class="max-w-4xl mx-auto">
<div class="bg-white rounded-lg shadow-md overflow-hidden mb-6">
<div class="p-6">
<h2 class="text-2xl font-bold text-gray-800 mb-4">Welcome to Tamimun</h2>
<p class="text-gray-600 mb-4">Connect with friends and the world around you on Tamimun.</p>
<div class="flex flex-wrap gap-4">
<div class="w-full md:w-1/2 lg:w-1/3">
<div class="bg-orange-50 p-4 rounded-lg h-full">
<i class="fas fa-user-friends text-orange-500 text-2xl mb-2"></i>
<h3 class="font-semibold text-lg mb-2">See Photos</h3>
<p class="text-gray-600">See photos and updates from friends in News Feed.</p>
</div>
</div>
<div class="w-full md:w-1/2 lg:w-1/3">
<div class="bg-amber-50 p-4 rounded-lg h-full">
<i class="fas fa-share-alt text-amber-500 text-2xl mb-2"></i>
<h3 class="font-semibold text-lg mb-2">Share</h3>
<p class="text-gray-600">Share what's new in your life on your Timeline.</p>
</div>
</div>
<div class="w-full md:w-1/2 lg:w-1/3">
<div class="bg-yellow-50 p-4 rounded-lg h-full">
<i class="fas fa-comments text-yellow-500 text-2xl mb-2"></i>
<h3 class="font-semibold text-lg mb-2">Message</h3>
<p class="text-gray-600">Send private messages to your friends.</p>
</div>
</div>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow-md overflow-hidden">
<div class="p-6">
<h2 class="text-xl font-bold text-gray-800 mb-4">Recent Activity</h2>
<div class="space-y-4">
<div class="flex items-start">
<img src="https://randomuser.me/api/portraits/women/44.jpg" alt="User" class="w-10 h-10 rounded-full mr-3">
<div>
<p class="font-medium">Sarah Johnson</p>
<p class="text-gray-600 text-sm">Posted a new photo</p>
<p class="text-gray-500 text-xs">2 hours ago</p>
</div>
</div>
<div class="flex items-start">
<img src="https://randomuser.me/api/portraits/men/32.jpg" alt="User" class="w-10 h-10 rounded-full mr-3">
<div>
<p class="font-medium">Michael Brown</p>
<p class="text-gray-600 text-sm">Commented on your post</p>
<p class="text-gray-500 text-xs">5 hours ago</p>
</div>
</div>
<div class="flex items-start">
<img src="https://randomuser.me/api/portraits/women/68.jpg" alt="User" class="w-10 h-10 rounded-full mr-3">
<div>
<p class="font-medium">Emily Davis</p>
<p class="text-gray-600 text-sm">Liked your photo</p>
<p class="text-gray-500 text-xs">Yesterday</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Login Section -->
<section id="login" class="hidden fade-in">
<div class="max-w-md mx-auto bg-white rounded-lg shadow-md overflow-hidden">
<div class="gradient-bg py-6 px-8 text-white">
<h2 class="text-2xl font-bold">Welcome Back</h2>
<p class="opacity-90">Login to your account</p>
</div>
<div class="p-8">
<form id="loginForm">
<div class="mb-4">
<label for="loginEmail" class="block text-gray-700 text-sm font-bold mb-2">Email</label>
<input type="email" id="loginEmail" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500" placeholder="your@email.com" required>
</div>
<div class="mb-6">
<label for="loginPassword" class="block text-gray-700 text-sm font-bold mb-2">Password</label>
<input type="password" id="loginPassword" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500" placeholder="••••••••" required>
<div class="flex justify-end mt-1">
<a href="#" class="text-sm text-orange-500 hover:underline" onclick="showSection('forgot-password')">Forgot password?</a>
</div>
</div>
<div class="mb-4">
<button type="submit" class="w-full bg-orange-500 hover:bg-orange-600 text-white font-bold py-2 px-4 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500 focus:ring-opacity-50 transition duration-300">
Login
</button>
</div>
<div class="text-center">
<p class="text-gray-600">Don't have an account? <a href="#" class="text-orange-500 hover:underline" onclick="showSection('register')">Register</a></p>
</div>
</form>
<div class="mt-6">
<div class="relative">
<div class="absolute inset-0 flex items-center">
<div class="w-full border-t border-gray-300"></div>
</div>
<div class="relative flex justify-center text-sm">
<span class="px-2 bg-white text-gray-500">Or continue with</span>
</div>
</div>
<div class="mt-6 grid grid-cols-2 gap-3">
<button class="w-full inline-flex justify-center py-2 px-4 border border-gray-300 rounded-md shadow-sm bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-orange-500">
<i class="fab fa-google text-red-500 mr-2"></i> Google
</button>
<button class="w-full inline-flex justify-center py-2 px-4 border border-gray-300 rounded-md shadow-sm bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-orange-500">
<i class="fab fa-facebook text-blue-600 mr-2"></i> Facebook
</button>
</div>
</div>
</div>
</div>
</section>
<!-- Registration Section -->
<section id="register" class="hidden fade-in">
<div class="max-w-md mx-auto bg-white rounded-lg shadow-md overflow-hidden">
<div class="gradient-bg py-6 px-8 text-white">
<h2 class="text-2xl font-bold">Create Account</h2>
<p class="opacity-90">Join our community</p>
</div>
<div class="p-8">
<form id="registerForm">
<div class="mb-4">
<label for="registerName" class="block text-gray-700 text-sm font-bold mb-2">Full Name</label>
<input type="text" id="registerName" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500" placeholder="John Doe" required>
</div>
<div class="mb-4">
<label for="registerEmail" class="block text-gray-700 text-sm font-bold mb-2">Email</label>
<input type="email" id="registerEmail" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500" placeholder="your@email.com" required>
</div>
<div class="mb-4">
<label for="registerUsername" class="block text-gray-700 text-sm font-bold mb-2">Username</label>
<input type="text" id="registerUsername" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500" placeholder="johndoe" required>
</div>
<div class="mb-4">
<label for="registerPassword" class="block text-gray-700 text-sm font-bold mb-2">Password</label>
<input type="password" id="registerPassword" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500" placeholder="••••••••" required>
<div class="mt-1">
<div class="flex items-center">
<div id="passwordStrength" class="h-1 w-full bg-gray-200 rounded-full">
<div class="h-1 rounded-full w-0"></div>
</div>
<span id="strengthText" class="text-xs ml-2 text-gray-500">Weak</span>
</div>
</div>
</div>
<div class="mb-6">
<label for="registerConfirmPassword" class="block text-gray-700 text-sm font-bold mb-2">Confirm Password</label>
<input type="password" id="registerConfirmPassword" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500" placeholder="••••••••" required>
</div>
<div class="mb-4">
<div class="flex items-center">
<input type="checkbox" id="termsCheckbox" class="h-4 w-4 text-orange-500 focus:ring-orange-500 border-gray-300 rounded" required>
<label for="termsCheckbox" class="ml-2 block text-sm text-gray-700">
I agree to the <a href="#" class="text-orange-500 hover:underline">Terms of Service</a> and <a href="#" class="text-orange-500 hover:underline">Privacy Policy</a>
</label>
</div>
</div>
<div class="mb-4">
<button type="submit" class="w-full bg-orange-500 hover:bg-orange-600 text-white font-bold py-2 px-4 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500 focus:ring-opacity-50 transition duration-300">
Register
</button>
</div>
<div class="text-center">
<p class="text-gray-600">Already have an account? <a href="#" class="text-orange-500 hover:underline" onclick="showSection('login')">Login</a></p>
</div>
</form>
</div>
</div>
</section>
<!-- Forgot Password Section -->
<section id="forgot-password" class="hidden fade-in">
<div class="max-w-md mx-auto bg-white rounded-lg shadow-md overflow-hidden">
<div class="gradient-bg py-6 px-8 text-white">
<h2 class="text-2xl font-bold">Reset Password</h2>
<p class="opacity-90">Enter your email to reset your password</p>
</div>
<div class="p-8">
<form id="forgotPasswordForm">
<div class="mb-6">
<label for="forgotEmail" class="block text-gray-700 text-sm font-bold mb-2">Email</label>
<input type="email" id="forgotEmail" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500" placeholder="your@email.com" required>
</div>
<div class="mb-4">
<button type="submit" class="w-full bg-orange-500 hover:bg-orange-600 text-white font-bold py-2 px-4 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500 focus:ring-opacity-50 transition duration-300">
Send Reset Link
</button>
</div>
<div class="text-center">
<a href="#" class="text-orange-500 hover:underline text-sm" onclick="showSection('login')">Back to login</a>
</div>
</form>
</div>
</div>
</section>
<!-- Profile Section -->
<section id="profile" class="hidden fade-in">
<div class="max-w-4xl mx-auto">
<div class="bg-white rounded-lg shadow-md overflow-hidden mb-6">
<div class="relative">
<div class="h-48 bg-gradient-to-r from-orange-400 to-amber-500"></div>
<div class="absolute -bottom-16 left-6">
<div class="profile-pic relative">
<img src="https://randomuser.me/api/portraits/men/1.jpg" alt="Profile" class="w-32 h-32 rounded-full border-4 border-white shadow-lg">
<button class="absolute bottom-0 right-0 bg-orange-500 text-white rounded-full p-2 hover:bg-orange-600">
<i class="fas fa-camera"></i>
</button>
</div>
</div>
<div class="absolute bottom-4 right-6">
<button id="editProfileBtn" class="bg-white text-gray-700 px-4 py-2 rounded-md border border-gray-300 hover:bg-gray-100 font-medium">
<i class="fas fa-edit mr-2"></i>Edit Profile
</button>
</div>
</div>
<div class="pt-20 px-6 pb-6">
<div class="flex justify-between items-start mb-4">
<div>
<h2 class="text-2xl font-bold text-gray-800">John Doe</h2>
<p class="text-gray-600">@johndoe</p>
</div>
<div class="flex space-x-2">
<button class="bg-orange-500 hover:bg-orange-600 text-white px-4 py-2 rounded-md font-medium">
<i class="fas fa-user-plus mr-2"></i>Follow
</button>
<button class="bg-gray-200 hover:bg-gray-300 text-gray-800 px-4 py-2 rounded-md font-medium">
<i class="fas fa-envelope mr-2"></i>Message
</button>
</div>
</div>
<div class="flex space-x-6 mb-4">
<div>
<span class="font-bold">1,234</span>
<span class="text-gray-600">Posts</span>
</div>
<div>
<span class="font-bold">5,678</span>
<span class="text-gray-600">Followers</span>
</div>
<div>
<span class="font-bold">901</span>
<span class="text-gray-600">Following</span>
</div>
</div>
<div class="mb-4">
<p class="text-gray-700">Digital creator | Photography enthusiast | Travel lover</p>
<p class="text-gray-500 text-sm mt-1">
<i class="fas fa-map-marker-alt mr-1"></i> San Francisco, CA
</p>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow-md overflow-hidden">
<div class="border-b border-gray-200">
<nav class="flex -mb-px">
<button class="profile-tab active py-4 px-6 text-center border-b-2 font-medium text-sm border-orange-500 text-orange-500">
<i class="fas fa-th-large mr-2"></i>Posts
</button>
<button class="profile-tab py-4 px-6 text-center border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300">
<i class="fas fa-images mr-2"></i>Photos
</button>
<button class="profile-tab py-4 px-6 text-center border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300">
<i class="fas fa-video mr-2"></i>Videos
</button>
<button class="profile-tab py-4 px-6 text-center border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300">
<i class="fas fa-bookmark mr-2"></i>Saved
</button>
</nav>
</div>
<div class="p-6">
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
<div class="relative group">
<img src="https://source.unsplash.com/random/300x300/?desert" alt="Post" class="w-full h-64 object-cover rounded-lg">
<div class="absolute inset-0 bg-black bg-opacity-0 group-hover:bg-opacity-50 rounded-lg flex items-center justify-center opacity-0 group-hover:opacity-100 transition duration-300">
<div class="flex space-x-4">
<button class="text-white hover:text-orange-300">
<i class="fas fa-heart"></i> 245
</button>
<button class="text-white hover:text-orange-300">
<i class="fas fa-comment"></i> 32
</button>
</div>
</div>
</div>
<div class="relative group">
<img src="https://source.unsplash.com/random/300x300/?oasis" alt="Post" class="w-full h-64 object-cover rounded-lg">
<div class="absolute inset-0 bg-black bg-opacity-0 group-hover:bg-opacity-50 rounded-lg flex items-center justify-center opacity-0 group-hover:opacity-100 transition duration-300">
<div class="flex space-x-4">
<button class="text-white hover:text-orange-300">
<i class="fas fa-heart"></i> 189
</button>
<button class="text-white hover:text-orange-300">
<i class="fas fa-comment"></i> 24
</button>
</div>
</div>
</div>
<div class="relative group">
<img src="https://source.unsplash.com/random/300x300/?camel" alt="Post" class="w-full h-64 object-cover rounded-lg">
<div class="absolute inset-0 bg-black bg-opacity-0 group-hover:bg-opacity-50 rounded-lg flex items-center justify-center opacity-0 group-hover:opacity-100 transition duration-300">
<div class="flex space-x-4">
<button class="text-white hover:text-orange-300">
<i class="fas fa-heart"></i> 312
</button>
<button class="text-white hover:text-orange-300">
<i class="fas fa-comment"></i> 45
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Chat Section -->
<section id="chat" class="hidden fade-in">
<div class="max-w-6xl mx-auto bg-white rounded-lg shadow-md overflow-hidden">
<div class="flex h-[600px]">
<!-- Sidebar -->
<div class="w-1/3 border-r border-gray-200 flex flex-col">
<!-- Search -->
<div class="p-4 border-b border-gray-200">
<div class="relative">
<input type="text" placeholder="Search messages..." class="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500">
<i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
</div>
</div>
<!-- Chat List -->
<div class="flex-grow overflow-y-auto">
<div class="space-y-1">
<div class="chat-item p-4 border-b border-gray-100 hover:bg-gray-50 cursor-pointer flex items-center" onclick="openChat('1')">
<img src="https://randomuser.me/api/portraits/women/44.jpg" alt="User" class="w-10 h-10 rounded-full mr-3">
<div class="flex-1">
<div class="flex justify-between items-center">
<h3 class="font-medium">Sarah Johnson</h3>
<span class="text-xs text-gray-500">2:30 PM</span>
</div>
<p class="text-sm text-gray-500 truncate">Hey, how are you doing?</p>
</div>
</div>
<div class="chat-item p-4 border-b border-gray-100 hover:bg-gray-50 cursor-pointer flex items-center" onclick="openChat('2')">
<img src="https://randomuser.me/api/portraits/men/32.jpg" alt="User" class="w-10 h-10 rounded-full mr-3">
<div class="flex-1">
<div class="flex justify-between items-center">
<h3 class="font-medium">Michael Brown</h3>
<span class="text-xs text-gray-500">Yesterday</span>
</div>
<p class="text-sm text-gray-500 truncate">Let's meet tomorrow for coffee</p>
</div>
</div>
<div class="chat-item p-4 border-b border-gray-100 hover:bg-gray-50 cursor-pointer flex items-center" onclick="openChat('3')">
<img src="https://randomuser.me/api/portraits/women/68.jpg" alt="User" class="w-10 h-10 rounded-full mr-3">
<div class="flex-1">
<div class="flex justify-between items-center">
<h3 class="font-medium">Emily Davis</h3>
<span class="text-xs text-gray-500">Monday</span>
</div>
<p class="text-sm text-gray-500 truncate">Thanks for your help!</p>
</div>
</div>
</div>
</div>
</div>
<!-- Chat Area -->
<div class="w-2/3 flex flex-col">
<!-- Chat Header -->
<div class="p-4 border-b border-gray-200 flex items-center">
<img src="https://randomuser.me/api/portraits/women/44.jpg" alt="User" class="w-10 h-10 rounded-full mr-3">
<div>
<h3 class="font-medium">Sarah Johnson</h3>
<p class="text-xs text-gray-500">Online</p>
</div>
<div class="ml-auto flex space-x-2">
<button class="p-2 rounded-full hover:bg-gray-100">
<i class="fas fa-phone text-gray-600"></i>
</button>
<button class="p-2 rounded-full hover:bg-gray-100">
<i class="fas fa-video text-gray-600"></i>
</button>
<button class="p-2 rounded-full hover:bg-gray-100">
<i class="fas fa-ellipsis-h text-gray-600"></i>
</button>
</div>
</div>
<!-- Messages -->
<div id="chatMessages" class="flex-grow p-4 overflow-y-auto bg-gray-50">
<div class="space-y-4">
<div class="flex items-start">
<img src="https://randomuser.me/api/portraits/women/44.jpg" alt="User" class="w-8 h-8 rounded-full mr-3">
<div class="chat-bubble received p-3">
Hey there! How are you doing?
</div>
</div>
<div class="flex items-start justify-end">
<div class="chat-bubble sent p-3">
I'm good, thanks! Just working on some projects. How about you?
</div>
</div>
<div class="flex items-start">
<img src="https://randomuser.me/api/portraits/women/44.jpg" alt="User" class="w-8 h-8 rounded-full mr-3">
<div class="chat-bubble received p-3">
Pretty good! Just got back from vacation. The beach was amazing!
</div>
</div>
<div class="flex items-start justify-end">
<div class="chat-bubble sent p-3">
That sounds wonderful! Any photos to share?
</div>
</div>
</div>
</div>
<!-- Message Input -->
<div class="p-4 border-t border-gray-200">
<div class="flex items-center">
<button class="p-2 rounded-full hover:bg-gray-100 mr-2">
<i class="fas fa-paperclip text-gray-600"></i>
</button>
<button class="p-2 rounded-full hover:bg-gray-100 mr-2">
<i class="fas fa-image text-gray-600"></i>
</button>
<input type="text" placeholder="Type a message..." class="flex-grow px-4 py-2 border border-gray-300 rounded-full focus:outline-none focus:ring-2 focus:ring-orange-500">
<button class="ml-2 p-2 rounded-full bg-orange-500 text-white hover:bg-orange-600">
<i class="fas fa-paper-plane"></i>
</button>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Friends Section -->
<section id="friends" class="hidden fade-in">
<div class="max-w-4xl mx-auto">
<div class="bg-white rounded-lg shadow-md overflow-hidden mb-6">
<div class="p-6">
<h2 class="text-xl font-bold text-gray-800 mb-4">Friends</h2>
<div class="relative mb-4">
<input type="text" placeholder="Search friends..." class="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500">
<i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
</div>
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4">
<div class="bg-gray-50 rounded-lg p-4 flex flex-col items-center">
<img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Friend" class="w-16 h-16 rounded-full mb-3">
<h3 class="font-medium">Sarah Johnson</h3>
<p class="text-sm text-gray-500 mb-2">12 mutual friends</p>
<button class="bg-orange-500 hover:bg-orange-600 text-white px-4 py-1 rounded-md text-sm">
<i class="fas fa-user-check mr-1"></i> Friends
</button>
</div>
<div class="bg-gray-50 rounded-lg p-4 flex flex-col items-center">
<img src="https://randomuser.me/api/portraits/men/32.jpg" alt="Friend" class="w-16 h-16 rounded-full mb-3">
<h3 class="font-medium">Michael Brown</h3>
<p class="text-sm text-gray-500 mb-2">8 mutual friends</p>
<button class="bg-orange-500 hover:bg-orange-600 text-white px-4 py-1 rounded-md text-sm">
<i class="fas fa-user-check mr-1"></i> Friends
</button>
</div>
<div class="bg-gray-50 rounded-lg p-4 flex flex-col items-center">
<img src="https://randomuser.me/api/portraits/women/68.jpg" alt="Friend" class="w-16 h-16 rounded-full mb-3">
<h3 class="font-medium">Emily Davis</h3>
<p class="text-sm text-gray-500 mb-2">15 mutual friends</p>
<button class="bg-orange-500 hover:bg-orange-600 text-white px-4 py-1 rounded-md text-sm">
<i class="fas fa-user-check mr-1"></i> Friends
</button>
</div>
<div class="bg-gray-50 rounded-lg p-4 flex flex-col items-center">
<img src="https://randomuser.me/api/portraits/men/75.jpg" alt="Friend" class="w-16 h-16 rounded-full mb-3">
<h3 class="font-medium">David Wilson</h3>
<p class="text-sm text-gray-500 mb-2">5 mutual friends</p>
<button class="bg-gray-200 hover:bg-gray-300 text-gray-800 px-4 py-1 rounded-md text-sm">
<i class="fas fa-user-plus mr-1"></i> Add Friend
</button>
</div>
<div class="bg-gray-50 rounded-lg p-4 flex flex-col items-center">
<img src="https://randomuser.me/api/portraits/women/33.jpg" alt="Friend" class="w-16 h-16 rounded-full mb-3">
<h3 class="font-medium">Jessica Lee</h3>
<p class="text-sm text-gray-500 mb-2">3 mutual friends</p>
<button class="bg-gray-200 hover:bg-gray-300 text-gray-800 px-4 py-1 rounded-md text-sm">
<i class="fas fa-user-plus mr-1"></i> Add Friend
</button>
</div>
<div class="bg-gray-50 rounded-lg p-4 flex flex-col items-center">
<img src="https://randomuser.me/api/portraits/men/55.jpg" alt="Friend" class="w-16 h-16 rounded-full mb-3">
<h3 class="font-medium">Robert Taylor</h3>
<p class="text-sm text-gray-500 mb-2">7 mutual friends</p>
<button class="bg-gray-200 hover:bg-gray-300 text-gray-800 px-4 py-1 rounded-md text-sm">
<i class="fas fa-user-plus mr-1"></i> Add Friend
</button>
</div>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow-md overflow-hidden">
<div class="p-6">
<h2 class="text-xl font-bold text-gray-800 mb-4">Friend Requests</h2>
<div class="space-y-4">
<div class="flex items-center justify-between p-3 hover:bg-gray-50 rounded-lg">
<div class="flex items-center">
<img src="https://randomuser.me/api/portraits/women/22.jpg" alt="User" class="w-10 h-10 rounded-full mr-3">
<div>
<p class="font-medium">Jennifer Adams</p>
<p class="text-gray-500 text-sm">3 mutual friends</p>
</div>
</div>
<div class="flex space-x-2">
<button class="bg-orange-500 hover:bg-orange-600 text-white px-4 py-1 rounded-md text-sm">
Confirm
</button>
<button class="bg-gray-200 hover:bg-gray-300 text-gray-800 px-4 py-1 rounded-md text-sm">
Delete
</button>
</div>
</div>
<div class="flex items-center justify-between p-3 hover:bg-gray-50 rounded-lg">
<div class="flex items-center">
<img src="https://randomuser.me/api/portraits/men/19.jpg" alt="User" class="w-10 h-10 rounded-full mr-3">
<div>
<p class="font-medium">Thomas Clark</p>
<p class="text-gray-500 text-sm">1 mutual friend</p>
</div>
</div>
<div class="flex space-x-2">
<button class="bg-orange-500 hover:bg-orange-600 text-white px-4 py-1 rounded-md text-sm">
Confirm
</button>
<button class="bg-gray-200 hover:bg-gray-300 text-gray-800 px-4 py-1 rounded-md text-sm">
Delete
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</main>
<!-- Floating Action Button -->
<button id="fab" class="hidden fixed bottom-6 right-6 bg-orange-500 text-white w-14 h-14 rounded-full flex items-center justify-center shadow-lg floating-btn">
<i class="fas fa-plus text-xl"></i>
</button>
<!-- Footer -->
<footer class="bg-white py-6 border-t border-gray-200">
<div class="max-w-6xl mx-auto px-4">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="mb-4 md:mb-0">
<div class="flex items-center space-x-2">
<i class="fas fa-location-arrow text-orange-500 text-xl"></i>
<span class="font-semibold text-gray-900">Tamimun</span>
</div>
<p class="text-gray-500 text-sm mt-1">Connect with friends and the world around you.</p>
</div>
<div class="flex space-x-6">
<a href="#" class="text-gray-500 hover:text-orange-500">About</a>
<a href="#" class="text-gray-500 hover:text-orange-500">Privacy</a>
<a href="#" class="text-gray-500 hover:text-orange-500">Terms</a>
<a href="#" class="text-gray-500 hover:text-orange-500">Help</a>
</div>
</div>
<div class="mt-6 text-center text-gray-500 text-sm">
&copy; 2023 Tamimun. All rights reserved.
</div>
</div>
</footer>
</div>
<script>
// DOM Elements
const app = document.getElementById('app');
const mobileMenuBtn = document.getElementById('mobileMenuBtn');
const mobileMenu = document.querySelector('.mobile-menu');
const loginBtn = document.getElementById('loginBtn');
const logoutBtn = document.getElementById('logoutBtn');
const fab = document.getElementById('fab');
const registerPassword = document.getElementById('registerPassword');
const passwordStrength = document.getElementById('passwordStrength').firstElementChild;
const strengthText = document.getElementById('strengthText');
// Check if user is logged in (simulated)
let isLoggedIn = false;
// Initialize the app
function init() {
// Show login section by default
showSection('home');
// Event listeners
mobileMenuBtn.addEventListener('click', toggleMobileMenu);
// Form submissions
document.getElementById('loginForm').addEventListener('submit', handleLogin);
document.getElementById('registerForm').addEventListener('submit', handleRegister);
document.getElementById('forgotPasswordForm').addEventListener('submit', handleForgotPassword);
// Password strength indicator
if (registerPassword) {
registerPassword.addEventListener('input', checkPasswordStrength);
}
// Simulate checking login status (e.g., from localStorage)
checkLoginStatus();
}
// Check login status
function checkLoginStatus() {
// In a real app, you would check localStorage or cookies
if (isLoggedIn) {
loginBtn.classList.add('hidden');
logoutBtn.classList.remove('hidden');
fab.classList.remove('hidden');
} else {
loginBtn.classList.remove('hidden');
logoutBtn.classList.add('hidden');
fab.classList.add('hidden');
}
}
// Toggle mobile menu
function toggleMobileMenu() {
mobileMenu.classList.toggle('hidden');
}
// Show a specific section
function showSection(sectionId) {
// Hide all sections
document.querySelectorAll('main > section').forEach(section => {
section.classList.add('hidden');
});
// Show the requested section
document.getElementById(sectionId).classList.remove('hidden');
// Update active tab in profile
if (sectionId === 'profile') {
document.querySelectorAll('.profile-tab').forEach(tab => {
tab.classList.remove('active', 'border-orange-500', 'text-orange-500');
tab.classList.add('border-transparent', 'text-gray-500');
});
document.querySelector('.profile-tab').classList.add('active', 'border-orange-500', 'text-orange-500');
document.querySelector('.profile-tab').classList.remove('border-transparent', 'text-gray-500');
}
// Scroll to top
window.scrollTo(0, 0);
}
// Open a chat
function openChat(chatId) {
// In a real app, you would load the chat messages for this chatId
showSection('chat');
}
// Handle login
function handleLogin(e) {
e.preventDefault();
const email = document.getElementById('loginEmail').value;
const password = document.getElementById('loginPassword').value;
// Simple validation
if (!email || !password) {
alert('Please enter both email and password');
return;
}
// Simulate successful login
isLoggedIn = true;
checkLoginStatus();
showSection('home');
// In a real app, you would make an API call here
console.log('Login attempt with:', email, password);
}
// Handle registration
function handleRegister(e) {
e.preventDefault();
const name = document.getElementById('registerName').value;
const email = document.getElementById('registerEmail').value;
const username = document.getElementById('registerUsername').value;
const password = document.getElementById('registerPassword').value;
const confirmPassword = document.getElementById('registerConfirmPassword').value;
const termsChecked = document.getElementById('termsCheckbox').checked;
// Validation
if (!name || !email || !username || !password || !confirmPassword) {
alert('Please fill in all fields');
return;
}
if (password !== confirmPassword) {
alert('Passwords do not match');
return;
}
if (!termsChecked) {
alert('You must agree to the terms and conditions');
return;
}
// Simulate successful registration
alert('Registration successful! Please login.');
showSection('login');
// In a real app, you would make an API call here
console.log('Registration with:', name, email, username, password);
}
// Handle forgot password
function handleForgotPassword(e) {
e.preventDefault();
const email = document.getElementById('forgotEmail').value;
if (!email) {
alert('Please enter your email');
return;
}
// Simulate sending reset link
alert(`Password reset link sent to ${email}`);
showSection('login');
}
// Logout
function logout() {
isLoggedIn = false;
checkLoginStatus();
showSection('login');
}
// Check password strength
function checkPasswordStrength() {
const password = registerPassword.value;
let strength = 0;
// Length
if (password.length >= 8) strength += 1;
if (password.length >= 12) strength += 1;
// Contains numbers
if (/\d/.test(password)) strength += 1;
// Contains special chars
if (/[!@#$%^&*(),.?":{}|<>]/.test(password)) strength += 1;
// Contains upper and lower case
if (/[a-z]/.test(password) && /[A-Z]/.test(password)) strength += 1;
// Update UI
let width = 0;
let color = 'bg-red-500';
let text = 'Weak';
if (strength >= 4) {
width = 100;
color = 'bg-green-500';
text = 'Strong';
} else if (strength >= 2) {
width = 66;
color = 'bg-yellow-500';
text = 'Medium';
} else if (password.length > 0) {
width = 33;
color = 'bg-red-500';
text = 'Weak';
}
passwordStrength.style.width = `${width}%`;
passwordStrength.className = `h-1 rounded-full ${color}`;
strengthText.textContent = text;
strengthText.className = `text-xs ml-2 ${password.length > 0 ? 'text-gray-700' : 'text-gray-500'}`;
}
// Initialize the app when DOM is loaded
document.addEventListener('DOMContentLoaded', init);
</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=Sidali13/model-1" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>