test / index.html
Argo925's picture
теперь сделай страницу в кнопе события чтобы туда можно было зайти - Initial Deployment
a64519b verified
Raw History Blame Contribute Delete
31.6 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>InterestRooms - Connect Through Shared Passions</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=Poppins:wght@300;400;500;600;700&display=swap');
body {
font-family: 'Poppins', sans-serif;
-webkit-tap-highlight-color: transparent;
}
.gradient-bg {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.room-card:hover {
transform: translateY(-5px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.chat-bubble-left {
border-radius: 1rem 1rem 1rem 0;
}
.chat-bubble-right {
border-radius: 1rem 1rem 0 1rem;
}
.tab-active {
position: relative;
}
.tab-active:after {
content: '';
position: absolute;
bottom: -8px;
left: 50%;
transform: translateX(-50%);
width: 60%;
height: 3px;
background-color: #667eea;
border-radius: 3px;
}
/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
background: #c1c1c1;
border-radius: 10px;
}
.dark .custom-scrollbar::-webkit-scrollbar-track {
background: #2d3748;
}
.dark .custom-scrollbar::-webkit-scrollbar-thumb {
background: #4a5568;
}
</style>
</head>
<body class="bg-gray-50 dark:bg-gray-900 transition-colors duration-200">
<!-- Theme Toggle -->
<div class="fixed top-4 right-4 z-50">
<button id="themeToggle" class="p-2 rounded-full bg-white dark:bg-gray-800 shadow-lg">
<i class="fas fa-moon text-gray-800 dark:text-yellow-300"></i>
</button>
</div>
<!-- Main App Container -->
<div class="max-w-md mx-auto bg-white dark:bg-gray-800 min-h-screen relative overflow-hidden">
<!-- Header -->
<header class="gradient-bg text-white p-4 shadow-md">
<div class="flex justify-between items-center">
<div class="flex items-center space-x-2">
<i class="fas fa-users text-2xl"></i>
<h1 class="text-xl font-bold">Комнаты по интересам</h1>
</div>
<div class="flex items-center space-x-3">
<button class="p-2 rounded-full bg-white bg-opacity-20">
<i class="fas fa-search"></i>
</button>
<button class="p-2 rounded-full bg-white bg-opacity-20">
<i class="fas fa-bell"></i>
<span class="absolute top-3 right-3 h-2 w-2 bg-red-500 rounded-full"></span>
</button>
</div>
</div>
</header>
<!-- Main Content -->
<main class="pb-20">
<!-- Tabs Navigation -->
<div class="flex justify-around border-b border-gray-200 dark:border-gray-700 px-4">
<button id="homeTab" class="tab-active py-4 font-medium text-indigo-600 dark:text-indigo-400">
<i class="fas fa-home mr-2"></i>Главная
</button>
<button id="eventsTab" class="py-4 font-medium text-gray-500 dark:text-gray-400">
<i class="fas fa-calendar mr-2"></i>События
</button>
<button id="friendsTab" class="py-4 font-medium text-gray-500 dark:text-gray-400">
<i class="fas fa-user-friends mr-2"></i>Друзья
</button>
<button id="profileTab" class="py-4 font-medium text-gray-500 dark:text-gray-400">
<i class="fas fa-user mr-2"></i>Профиль
</button>
</div>
<!-- Featured Rooms Section -->
<section class="p-4">
<div class="flex justify-between items-center mb-4">
<h2 class="text-lg font-semibold text-gray-800 dark:text-white">Рекомендуемые комнаты</h2>
<button class="text-sm text-indigo-600 dark:text-indigo-400">Все</button>
</div>
<div class="flex space-x-4 overflow-x-auto pb-4 custom-scrollbar">
<!-- Featured Room Card -->
<div class="flex-shrink-0 w-64 bg-gradient-to-r from-purple-500 to-pink-500 rounded-xl p-4 text-white shadow-lg">
<div class="flex justify-between items-start">
<div>
<h3 class="font-bold">Spanish Learners</h3>
<p class="text-sm opacity-80">Practice Spanish with native speakers</p>
</div>
<div class="flex items-center">
<i class="fas fa-users mr-1"></i>
<span class="text-sm">1.2k</span>
</div>
</div>
<div class="mt-4 flex space-x-2">
<span class="text-xs bg-white bg-opacity-20 px-2 py-1 rounded-full">Language</span>
<span class="text-xs bg-white bg-opacity-20 px-2 py-1 rounded-full">Beginner</span>
</div>
<button class="mt-4 w-full bg-white text-purple-600 py-2 rounded-lg font-medium text-sm">
Войти в комнату
</button>
</div>
<!-- Featured Room Card -->
<div class="flex-shrink-0 w-64 bg-gradient-to-r from-blue-500 to-teal-400 rounded-xl p-4 text-white shadow-lg">
<div class="flex justify-between items-start">
<div>
<h3 class="font-bold">React Developers</h3>
<p class="text-sm opacity-80">Discuss React.js and related tech</p>
</div>
<div class="flex items-center">
<i class="fas fa-users mr-1"></i>
<span class="text-sm">856</span>
</div>
</div>
<div class="mt-4 flex space-x-2">
<span class="text-xs bg-white bg-opacity-20 px-2 py-1 rounded-full">Programming</span>
<span class="text-xs bg-white bg-opacity-20 px-2 py-1 rounded-full">Intermediate</span>
</div>
<button class="mt-4 w-full bg-white text-blue-600 py-2 rounded-lg font-medium text-sm">
Войти в комнату
</button>
</div>
</div>
</section>
<!-- Recommended For You Section -->
<section class="p-4">
<div class="flex justify-between items-center mb-4">
<h2 class="text-lg font-semibold text-gray-800 dark:text-white">Рекомендуем вам</h2>
<button class="text-sm text-indigo-600 dark:text-indigo-400">Фильтр</button>
</div>
<div class="grid grid-cols-1 gap-4">
<!-- Room Card -->
<div class="room-card bg-white dark:bg-gray-700 rounded-xl p-4 shadow-md transition-transform duration-200">
<div class="flex justify-between">
<div>
<h3 class="font-bold text-gray-800 dark:text-white">JavaScript Beginners</h3>
<p class="text-sm text-gray-600 dark:text-gray-300">Learn JS fundamentals together</p>
</div>
<div class="flex items-center text-sm text-gray-500 dark:text-gray-400">
<i class="fas fa-users mr-1"></i>
<span>324</span>
</div>
</div>
<div class="mt-3 flex flex-wrap gap-2">
<span class="text-xs bg-indigo-100 dark:bg-indigo-900 text-indigo-800 dark:text-indigo-200 px-2 py-1 rounded-full">Programming</span>
<span class="text-xs bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200 px-2 py-1 rounded-full">Beginner</span>
<span class="text-xs bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200 px-2 py-1 rounded-full">Active</span>
</div>
<div class="mt-4 flex justify-between items-center">
<div class="flex -space-x-2">
<img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/women/44.jpg" alt="User">
<img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/men/32.jpg" alt="User">
<img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/women/68.jpg" alt="User">
</div>
<button class="bg-indigo-600 hover:bg-indigo-700 text-white px-4 py-2 rounded-lg text-sm font-medium">
Войти
</button>
</div>
</div>
<!-- Room Card -->
<div class="room-card bg-white dark:bg-gray-700 rounded-xl p-4 shadow-md transition-transform duration-200">
<div class="flex justify-between">
<div>
<h3 class="font-bold text-gray-800 dark:text-white">Football Fans</h3>
<p class="text-sm text-gray-600 dark:text-gray-300">Discuss matches and tournaments</p>
</div>
<div class="flex items-center text-sm text-gray-500 dark:text-gray-400">
<i class="fas fa-users mr-1"></i>
<span>782</span>
</div>
</div>
<div class="mt-3 flex flex-wrap gap-2">
<span class="text-xs bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-1 rounded-full">Sports</span>
<span class="text-xs bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200 px-2 py-1 rounded-full">Global</span>
</div>
<div class="mt-4 flex justify-between items-center">
<div class="flex -space-x-2">
<img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/men/75.jpg" alt="User">
<img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/men/22.jpg" alt="User">
<img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/women/33.jpg" alt="User">
</div>
<button class="bg-indigo-600 hover:bg-indigo-700 text-white px-4 py-2 rounded-lg text-sm font-medium">
Join
</button>
</div>
</div>
<!-- Room Card -->
<div class="room-card bg-white dark:bg-gray-700 rounded-xl p-4 shadow-md transition-transform duration-200">
<div class="flex justify-between">
<div>
<h3 class="font-bold text-gray-800 dark:text-white">Photography Enthusiasts</h3>
<p class="text-sm text-gray-600 dark:text-gray-300">Share tips and photo critiques</p>
</div>
<div class="flex items-center text-sm text-gray-500 dark:text-gray-400">
<i class="fas fa-users mr-1"></i>
<span>456</span>
</div>
</div>
<div class="mt-3 flex flex-wrap gap-2">
<span class="text-xs bg-pink-100 dark:bg-pink-900 text-pink-800 dark:text-pink-200 px-2 py-1 rounded-full">Art</span>
<span class="text-xs bg-teal-100 dark:bg-teal-900 text-teal-800 dark:text-teal-200 px-2 py-1 rounded-full">Creative</span>
</div>
<div class="mt-4 flex justify-between items-center">
<div class="flex -space-x-2">
<img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/women/65.jpg" alt="User">
<img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/men/41.jpg" alt="User">
<img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/women/12.jpg" alt="User">
</div>
<button class="bg-indigo-600 hover:bg-indigo-700 text-white px-4 py-2 rounded-lg text-sm font-medium">
Join
</button>
</div>
</div>
</div>
</section>
<!-- Events Section (Hidden by default) -->
<section id="eventsSection" class="hidden p-4">
<div class="flex justify-between items-center mb-4">
<h2 class="text-lg font-semibold text-gray-800 dark:text-white">Предстоящие события</h2>
<button class="text-sm text-indigo-600 dark:text-indigo-400">Все события</button>
</div>
<div class="space-y-4">
<!-- Event Card -->
<div class="bg-white dark:bg-gray-700 rounded-xl p-4 shadow-md">
<div class="flex justify-between items-start mb-2">
<div>
<h3 class="font-bold text-gray-800 dark:text-white">Встреча испаноговорящих</h3>
<p class="text-sm text-gray-600 dark:text-gray-300">Spanish Learners Room</p>
</div>
<span class="text-xs bg-indigo-100 dark:bg-indigo-900 text-indigo-800 dark:text-indigo-200 px-2 py-1 rounded-full">Языки</span>
</div>
<div class="flex items-center space-x-2 text-sm text-gray-600 dark:text-gray-300 mb-3">
<i class="fas fa-calendar-day"></i>
<span>Сегодня, 19:00</span>
</div>
<div class="flex justify-between items-center">
<div class="flex -space-x-2">
<img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/women/44.jpg" alt="User">
<img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/men/32.jpg" alt="User">
<img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/women/68.jpg" alt="User">
<div class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700 bg-gray-100 dark:bg-gray-600 flex items-center justify-center text-xs">+5</div>
</div>
<button class="bg-indigo-600 hover:bg-indigo-700 text-white px-4 py-2 rounded-lg text-sm font-medium">
Присоединиться
</button>
</div>
</div>
<!-- Event Card -->
<div class="bg-white dark:bg-gray-700 rounded-xl p-4 shadow-md">
<div class="flex justify-between items-start mb-2">
<div>
<h3 class="font-bold text-gray-800 dark:text-white">Футбольный матч обсуждение</h3>
<p class="text-sm text-gray-600 dark:text-gray-300">Football Fans Room</p>
</div>
<span class="text-xs bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-1 rounded-full">Спорт</span>
</div>
<div class="flex items-center space-x-2 text-sm text-gray-600 dark:text-gray-300 mb-3">
<i class="fas fa-calendar-day"></i>
<span>Завтра, 20:30</span>
</div>
<div class="flex justify-between items-center">
<div class="flex -space-x-2">
<img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/men/75.jpg" alt="User">
<img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/men/22.jpg" alt="User">
<img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/women/33.jpg" alt="User">
</div>
<button class="bg-indigo-600 hover:bg-indigo-700 text-white px-4 py-2 rounded-lg text-sm font-medium">
Присоединиться
</button>
</div>
</div>
</div>
</section>
<!-- Your Active Rooms Section -->
<section class="p-4">
<div class="flex justify-between items-center mb-4">
<h2 class="text-lg font-semibold text-gray-800 dark:text-white">Ваши активные комнаты</h2>
<button class="text-sm text-indigo-600 dark:text-indigo-400">Создать комнату</button>
</div>
<div class="bg-indigo-50 dark:bg-gray-700 rounded-xl p-4">
<div class="flex items-center space-x-3 mb-4">
<div class="bg-indigo-100 dark:bg-indigo-900 p-3 rounded-xl">
<i class="fas fa-code text-indigo-600 dark:text-indigo-400"></i>
</div>
<div>
<h3 class="font-medium text-gray-800 dark:text-white">Flutter Developers</h3>
<p class="text-sm text-gray-600 dark:text-gray-300">12 new messages</p>
</div>
</div>
<div class="flex items-center space-x-3">
<div class="bg-green-100 dark:bg-green-900 p-3 rounded-xl">
<i class="fas fa-language text-green-600 dark:text-green-400"></i>
</div>
<div>
<h3 class="font-medium text-gray-800 dark:text-white">French Conversation</h3>
<p class="text-sm text-gray-600 dark:text-gray-300">Event starting soon</p>
</div>
</div>
</div>
</section>
</main>
<!-- Bottom Navigation -->
<nav class="fixed bottom-0 left-0 right-0 bg-white dark:bg-gray-800 shadow-lg border-t border-gray-200 dark:border-gray-700">
<div class="flex justify-around items-center p-3 max-w-md mx-auto">
<button class="p-3 text-indigo-600 dark:text-indigo-400">
<i class="fas fa-home text-xl"></i>
</button>
<button class="p-3 text-gray-500 dark:text-gray-400">
<i class="fas fa-search text-xl"></i>
</button>
<button class="gradient-bg text-white p-4 rounded-full shadow-lg -mt-6">
<i class="fas fa-plus text-xl"></i>
</button>
<button class="p-3 text-gray-500 dark:text-gray-400">
<i class="fas fa-calendar text-xl"></i>
</button>
<button class="p-3 text-gray-500 dark:text-gray-400">
<i class="fas fa-user text-xl"></i>
</button>
</div>
</nav>
<!-- Room Chat Modal (Hidden by default) -->
<div id="chatModal" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden flex items-center justify-center p-4">
<div class="bg-white dark:bg-gray-800 rounded-xl w-full max-w-md max-h-[80vh] flex flex-col">
<!-- Chat Header -->
<div class="gradient-bg text-white p-4 rounded-t-xl flex justify-between items-center">
<div class="flex items-center space-x-3">
<button id="closeChat" class="p-1">
<i class="fas fa-arrow-left"></i>
</button>
<div>
<h3 class="font-bold">Spanish Learners</h3>
<p class="text-xs opacity-80">12 active members</p>
</div>
</div>
<button class="p-2 rounded-full bg-white bg-opacity-20">
<i class="fas fa-ellipsis-v"></i>
</button>
</div>
<!-- Chat Messages -->
<div class="flex-1 overflow-y-auto p-4 custom-scrollbar">
<div class="space-y-3">
<!-- Message from others -->
<div class="flex space-x-2">
<img class="w-8 h-8 rounded-full" src="https://randomuser.me/api/portraits/women/44.jpg" alt="User">
<div>
<div class="bg-gray-100 dark:bg-gray-700 p-3 chat-bubble-left max-w-xs">
<p class="text-sm text-gray-800 dark:text-gray-200">Hola! ¿Cómo estás?</p>
</div>
<p class="text-xs text-gray-500 dark:text-gray-400 mt-1">Maria, 2:30 PM</p>
</div>
</div>
<!-- Your message -->
<div class="flex justify-end">
<div class="max-w-xs">
<div class="bg-indigo-500 text-white p-3 chat-bubble-right">
<p class="text-sm">Estoy bien, gracias! ¿Y tú?</p>
</div>
<p class="text-xs text-gray-500 dark:text-gray-400 mt-1 text-right">You, 2:32 PM</p>
</div>
</div>
<!-- System message -->
<div class="text-center">
<p class="text-xs text-gray-500 dark:text-gray-400 bg-gray-100 dark:bg-gray-700 inline-block px-2 py-1 rounded-full">Juan вошел в комнату</p>
</div>
</div>
</div>
<!-- Message Input -->
<div class="p-3 border-t border-gray-200 dark:border-gray-700">
<div class="flex items-center space-x-2">
<button class="p-2 text-gray-500 dark:text-gray-400">
<i class="fas fa-plus"></i>
</button>
<input type="text" placeholder="Type your message..." class="flex-1 bg-gray-100 dark:bg-gray-700 rounded-full px-4 py-2 text-sm focus:outline-none">
<button class="p-2 text-indigo-600 dark:text-indigo-400">
<i class="fas fa-microphone"></i>
</button>
<button class="p-2 bg-indigo-600 text-white rounded-full">
<i class="fas fa-paper-plane"></i>
</button>
</div>
</div>
</div>
</div>
</div>
<script>
// Theme toggle functionality
const themeToggle = document.getElementById('themeToggle');
const html = document.documentElement;
// Check for saved theme preference or use preferred color scheme
if (localStorage.getItem('theme') === 'dark' ||
(!localStorage.getItem('theme') && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
html.classList.add('dark');
themeToggle.innerHTML = '<i class="fas fa-sun text-yellow-300"></i>';
} else {
html.classList.remove('dark');
themeToggle.innerHTML = '<i class="fas fa-moon text-gray-800"></i>';
}
// Toggle theme on button click
themeToggle.addEventListener('click', () => {
html.classList.toggle('dark');
if (html.classList.contains('dark')) {
localStorage.setItem('theme', 'dark');
themeToggle.innerHTML = '<i class="fas fa-sun text-yellow-300"></i>';
} else {
localStorage.setItem('theme', 'light');
themeToggle.innerHTML = '<i class="fas fa-moon text-gray-800"></i>';
}
});
// Tab switching functionality
const tabs = {
home: document.getElementById('homeTab'),
events: document.getElementById('eventsTab'),
friends: document.getElementById('friendsTab'),
profile: document.getElementById('profileTab')
};
// Content sections
const sections = {
home: document.querySelector('main > section:not(#eventsSection)'),
events: document.getElementById('eventsSection'),
friends: null, // You can add these later
profile: null // You can add these later
};
function switchTab(activeTab) {
// Update tab styles
Object.values(tabs).forEach(tab => {
if (tab) {
tab.classList.remove('tab-active', 'text-indigo-600', 'dark:text-indigo-400');
tab.classList.add('text-gray-500', 'dark:text-gray-400');
}
});
activeTab.classList.add('tab-active', 'text-indigo-600', 'dark:text-indigo-400');
activeTab.classList.remove('text-gray-500', 'dark:text-gray-400');
// Hide all sections first
document.querySelectorAll('main > section').forEach(section => {
section.classList.add('hidden');
});
// Show the active section
const sectionId = activeTab.id.replace('Tab', '') + 'Section';
const activeSection = document.getElementById(sectionId);
if (activeSection) {
activeSection.classList.remove('hidden');
} else {
// Default to showing the first section if no matching section found
sections.home.classList.remove('hidden');
}
}
// Add event listeners
tabs.home.addEventListener('click', () => switchTab(tabs.home));
tabs.events.addEventListener('click', () => switchTab(tabs.events));
if (tabs.friends) tabs.friends.addEventListener('click', () => switchTab(tabs.friends));
if (tabs.profile) tabs.profile.addEventListener('click', () => switchTab(tabs.profile));
// Initialize - show home section by default
switchTab(tabs.home);
// Room card click to open chat
const roomCards = document.querySelectorAll('.room-card');
const chatModal = document.getElementById('chatModal');
const closeChat = document.getElementById('closeChat');
roomCards.forEach(card => {
card.addEventListener('click', () => {
chatModal.classList.remove('hidden');
});
});
closeChat.addEventListener('click', () => {
chatModal.classList.add('hidden');
});
// Simulate joining a room
const joinButtons = document.querySelectorAll('button:contains("Join")');
joinButtons.forEach(button => {
button.addEventListener('click', (e) => {
e.stopPropagation();
button.textContent = 'Вы вошли';
button.classList.remove('bg-indigo-600', 'hover:bg-indigo-700');
button.classList.add('bg-green-500', 'hover:bg-green-600');
});
});
</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=Argo925/test" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>