File size: 10,432 Bytes
0b25007 | 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 | <!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Анкеты - Поиск</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=Roboto:wght@300;400;500;700&display=swap');
body {
font-family: 'Roboto', sans-serif;
background-color: #f5f5f5;
}
.card-shadow {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.search-container {
position: relative;
}
.search-container input {
padding-left: 40px;
}
.search-icon {
position: absolute;
left: 12px;
top: 50%;
transform: translateY(-50%);
color: #9ca3af;
}
.profile-image {
width: 60px;
height: 60px;
object-fit: cover;
border-radius: 50%;
}
.status-online {
width: 12px;
height: 12px;
background-color: #10b981;
border-radius: 50%;
position: absolute;
bottom: 0;
right: 0;
border: 2px solid white;
}
.tab-active {
color: #3b82f6;
border-bottom: 2px solid #3b82f6;
}
.transition-all {
transition: all 0.3s ease;
}
</style>
</head>
<body class="bg-gray-100">
<!-- Header -->
<header class="bg-white shadow-sm py-4 px-4 sticky top-0 z-10">
<div class="flex justify-between items-center">
<h1 class="text-xl font-bold text-gray-800">Анкеты</h1>
<div class="flex space-x-4">
<button class="text-gray-600">
<i class="fas fa-filter"></i>
</button>
<button class="text-gray-600">
<i class="fas fa-ellipsis-vertical"></i>
</button>
</div>
</div>
</header>
<!-- Search Bar -->
<div class="px-4 py-3 bg-white">
<div class="search-container relative">
<i class="search-icon fas fa-search"></i>
<input type="text" placeholder="Поиск анкет..."
class="w-full py-2 pl-10 pr-4 bg-gray-100 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
</div>
<!-- Tabs -->
<div class="flex border-b bg-white px-4">
<button class="tab-active py-3 px-4 font-medium text-sm">Все</button>
<button class="py-3 px-4 font-medium text-sm text-gray-500">Популярные</button>
<button class="py-3 px-4 font-medium text-sm text-gray-500">Новые</button>
<button class="py-3 px-4 font-medium text-sm text-gray-500">Проверенные</button>
</div>
<!-- Questionnaire List -->
<div class="px-4 py-3" id="questionnaire-list">
<!-- Sample questionnaires will be loaded here -->
</div>
<!-- Bottom Navigation -->
<nav class="fixed bottom-0 w-full bg-white shadow-lg flex justify-around py-3">
<a href="#" class="text-blue-500 flex flex-col items-center">
<i class="fas fa-home text-xl"></i>
<span class="text-xs mt-1">Главная</span>
</a>
<a href="#" class="text-gray-500 flex flex-col items-center">
<i class="fas fa-search text-xl"></i>
<span class="text-xs mt-1">Поиск</span>
</a>
<a href="#" class="text-gray-500 flex flex-col items-center">
<i class="fas fa-plus-circle text-xl"></i>
<span class="text-xs mt-1">Создать</span>
</a>
<a href="#" class="text-gray-500 flex flex-col items-center">
<i class="fas fa-heart text-xl"></i>
<span class="text-xs mt-1">Избранное</span>
</a>
<a href="#" class="text-gray-500 flex flex-col items-center">
<i class="fas fa-user text-xl"></i>
<span class="text-xs mt-1">Профиль</span>
</a>
</nav>
<script>
// Sample questionnaire data
const questionnaires = [
{
id: 1,
name: "Анна Петрова",
age: 25,
city: "Москва",
interests: ["Путешествия", "Фотография", "Кино"],
image: "https://randomuser.me/api/portraits/women/44.jpg",
verified: true,
online: true
},
{
id: 2,
name: "Иван Смирнов",
age: 30,
city: "Санкт-Петербург",
interests: ["Спорт", "Музыка", "Книги"],
image: "https://randomuser.me/api/portraits/men/32.jpg",
verified: false,
online: false
},
{
id: 3,
name: "Елена Козлова",
age: 28,
city: "Казань",
interests: ["Искусство", "Театр", "Кулинария"],
image: "https://randomuser.me/api/portraits/women/63.jpg",
verified: true,
online: true
},
{
id: 4,
name: "Дмитрий Иванов",
age: 35,
city: "Новосибирск",
interests: ["Технологии", "Бизнес", "Автомобили"],
image: "https://randomuser.me/api/portraits/men/75.jpg",
verified: false,
online: false
},
{
id: 5,
name: "Ольга Соколова",
age: 22,
city: "Екатеринбург",
interests: ["Мода", "Танцы", "Фитнес"],
image: "https://randomuser.me/api/portraits/women/85.jpg",
verified: true,
online: true
}
];
// Function to render questionnaires
function renderQuestionnaires(data) {
const container = document.getElementById('questionnaire-list');
container.innerHTML = '';
data.forEach(person => {
const card = document.createElement('div');
card.className = 'bg-white rounded-lg card-shadow mb-3 p-4 transition-all hover:shadow-md';
card.innerHTML = `
<div class="flex items-start">
<div class="relative mr-3">
<img src="${person.image}" alt="${person.name}" class="profile-image">
${person.online ? '<div class="status-online"></div>' : ''}
</div>
<div class="flex-1">
<div class="flex justify-between items-start">
<h3 class="font-medium text-gray-800">${person.name}, ${person.age}</h3>
${person.verified ? '<span class="text-blue-500 text-sm"><i class="fas fa-check-circle"></i> Проверено</span>' : ''}
</div>
<p class="text-gray-600 text-sm mt-1">${person.city}</p>
<div class="mt-2">
${person.interests.map(interest =>
`<span class="inline-block bg-gray-100 text-gray-700 text-xs px-2 py-1 rounded-full mr-1 mb-1">${interest}</span>`
).join('')}
</div>
</div>
</div>
`;
container.appendChild(card);
});
}
// Initial render
renderQuestionnaires(questionnaires);
// Search functionality
const searchInput = document.querySelector('input[type="text"]');
searchInput.addEventListener('input', (e) => {
const searchTerm = e.target.value.toLowerCase();
if (searchTerm === '') {
renderQuestionnaires(questionnaires);
return;
}
const filtered = questionnaires.filter(person =>
person.name.toLowerCase().includes(searchTerm) ||
person.city.toLowerCase().includes(searchTerm) ||
person.interests.some(interest => interest.toLowerCase().includes(searchTerm))
);
renderQuestionnaires(filtered);
});
// Tab switching
const tabs = document.querySelectorAll('.flex.border-b button');
tabs.forEach(tab => {
tab.addEventListener('click', () => {
tabs.forEach(t => t.classList.remove('tab-active', 'text-blue-500'));
tabs.forEach(t => t.classList.add('text-gray-500'));
tab.classList.add('tab-active', 'text-blue-500');
tab.classList.remove('text-gray-500');
// In a real app, we would filter by tab here
renderQuestionnaires(questionnaires);
});
});
</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=IVESTNiKI/questionnaire-database" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |