Dmitriy commited on
Напиши характеристики стандартные для наушников - Follow Up Deployment
Browse files- index.html +372 -368
index.html
CHANGED
|
@@ -1,405 +1,409 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
-
<html lang="
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>
|
| 7 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
<style>
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
}
|
| 14 |
-
.
|
| 15 |
-
|
| 16 |
-
}
|
| 17 |
-
.terminal-output {
|
| 18 |
-
height: calc(100% - 60px);
|
| 19 |
-
overflow-y: auto;
|
| 20 |
-
scrollbar-width: thin;
|
| 21 |
-
}
|
| 22 |
-
.terminal-output::-webkit-scrollbar {
|
| 23 |
-
width: 6px;
|
| 24 |
-
}
|
| 25 |
-
.terminal-output::-webkit-scrollbar-thumb {
|
| 26 |
-
background-color: rgba(255,255,255,0.2);
|
| 27 |
-
border-radius: 3px;
|
| 28 |
-
}
|
| 29 |
-
.command-history {
|
| 30 |
-
max-height: 200px;
|
| 31 |
-
overflow-y: auto;
|
| 32 |
}
|
| 33 |
</style>
|
| 34 |
</head>
|
| 35 |
-
<body class="bg-gray-
|
| 36 |
-
<!--
|
| 37 |
-
<
|
| 38 |
-
<
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
<
|
| 43 |
-
<
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
<div class="flex items-center">
|
| 49 |
-
<select id="language-select" class="bg-gray-600 text-white text-xs rounded px-2 py-1">
|
| 50 |
-
<option value="en">English</option>
|
| 51 |
-
<option value="ru">Русский</option>
|
| 52 |
-
<option value="de">Deutsch</option>
|
| 53 |
-
<option value="fr">Français</option>
|
| 54 |
-
<option value="uk">Українська</option>
|
| 55 |
-
<option value="be">Беларуская</option>
|
| 56 |
-
</select>
|
| 57 |
</div>
|
| 58 |
</div>
|
|
|
|
| 59 |
|
| 60 |
-
|
| 61 |
-
<
|
| 62 |
-
|
| 63 |
-
<
|
| 64 |
-
<
|
| 65 |
-
<
|
| 66 |
-
<
|
| 67 |
-
</
|
|
|
|
| 68 |
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
</div>
|
| 80 |
</div>
|
| 81 |
-
<div id="command-history" class="command-history hidden mt-2 bg-gray-800 rounded p-2 font-mono text-sm"></div>
|
| 82 |
</div>
|
| 83 |
</div>
|
| 84 |
-
|
| 85 |
-
<!--
|
| 86 |
-
<div class="
|
| 87 |
-
<div>
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
const translations = {
|
| 96 |
-
en: {
|
| 97 |
-
welcomeTitle: "Linux Terminal Emulator v1.0",
|
| 98 |
-
helpPrompt: "Type 'help' to see available commands",
|
| 99 |
-
welcomeMessage: "Welcome to the Linux terminal emulator!",
|
| 100 |
-
helpText: `Available commands:
|
| 101 |
-
help - Show this help message
|
| 102 |
-
clear - Clear the terminal
|
| 103 |
-
ls - List directory contents
|
| 104 |
-
pwd - Print working directory
|
| 105 |
-
whoami - Show current user
|
| 106 |
-
date - Show current date and time
|
| 107 |
-
echo [text] - Display text
|
| 108 |
-
neofetch - Display system information
|
| 109 |
-
history - Show command history`,
|
| 110 |
-
lsOutput: "Desktop Documents Downloads Music Pictures Videos",
|
| 111 |
-
pwdOutput: "/home/user",
|
| 112 |
-
whoamiOutput: "user",
|
| 113 |
-
notFound: "Command not found: {cmd}. Type 'help' for available commands.",
|
| 114 |
-
noHistory: "No commands in history"
|
| 115 |
-
},
|
| 116 |
-
ru: {
|
| 117 |
-
welcomeTitle: "Эмулятор терминала Linux v1.0",
|
| 118 |
-
helpPrompt: "Введите 'help' для списка команд",
|
| 119 |
-
welcomeMessage: "Добро пожаловать в эмулятор терминала Linux!",
|
| 120 |
-
helpText: `Доступные команды:
|
| 121 |
-
help - Показать это сообщение
|
| 122 |
-
clear - Очистить терминал
|
| 123 |
-
ls - Список содержимого каталога
|
| 124 |
-
pwd - Текущий рабочий каталог
|
| 125 |
-
whoami - Текущий пользователь
|
| 126 |
-
date - Текущая дата и время
|
| 127 |
-
echo [текст] - Вывести текст
|
| 128 |
-
neofetch - Информация о системе
|
| 129 |
-
history - История команд`,
|
| 130 |
-
lsOutput: "РабочийСтол Документы Загрузки Музыка Изображения Видео",
|
| 131 |
-
pwdOutput: "/home/user",
|
| 132 |
-
whoamiOutput: "user",
|
| 133 |
-
notFound: "Команда не найдена: {cmd}. Введите 'help' для списка команд.",
|
| 134 |
-
noHistory: "Нет истории команд"
|
| 135 |
-
},
|
| 136 |
-
de: {
|
| 137 |
-
welcomeTitle: "Linux Terminal Emulator v1.0",
|
| 138 |
-
helpPrompt: "Geben Sie 'help' ein, um verfügbare Befehle zu sehen",
|
| 139 |
-
welcomeMessage: "Willkommen beim Linux Terminal Emulator!",
|
| 140 |
-
helpText: `Verfügbare Befehle:
|
| 141 |
-
help - Diese Hilfe anzeigen
|
| 142 |
-
clear - Terminal leeren
|
| 143 |
-
ls - Verzeichnisinhalt auflisten
|
| 144 |
-
pwd - Aktuelles Arbeitsverzeichnis
|
| 145 |
-
whoami - Aktueller Benutzer
|
| 146 |
-
date - Aktuelles Datum und Uhrzeit
|
| 147 |
-
echo [text] - Text anzeigen
|
| 148 |
-
neofetch - Systeminformationen
|
| 149 |
-
history - Befehlsverlauf`,
|
| 150 |
-
lsOutput: "Desktop Dokumente Downloads Musik Bilder Videos",
|
| 151 |
-
pwdOutput: "/home/user",
|
| 152 |
-
whoamiOutput: "user",
|
| 153 |
-
notFound: "Befehl nicht gefunden: {cmd}. Geben Sie 'help' für verfügbare Befehle ein.",
|
| 154 |
-
noHistory: "Kein Befehlsverlauf"
|
| 155 |
-
},
|
| 156 |
-
fr: {
|
| 157 |
-
welcomeTitle: "Émulateur de terminal Linux v1.0",
|
| 158 |
-
helpPrompt: "Tapez 'help' pour voir les commandes disponibles",
|
| 159 |
-
welcomeMessage: "Bienvenue dans l'émulateur de terminal Linux!",
|
| 160 |
-
helpText: `Commandes disponibles:
|
| 161 |
-
help - Afficher ce message d'aide
|
| 162 |
-
clear - Effacer le terminal
|
| 163 |
-
ls - Lister le contenu du répertoire
|
| 164 |
-
pwd - Répertoire de travail actuel
|
| 165 |
-
whoami - Utilisateur actuel
|
| 166 |
-
date - Date et heure actuelles
|
| 167 |
-
echo [texte] - Afficher du texte
|
| 168 |
-
neofetch - Informations système
|
| 169 |
-
history - Historique des commandes`,
|
| 170 |
-
lsOutput: "Bureau Documents Téléchargements Musique Images Vidéos",
|
| 171 |
-
pwdOutput: "/home/user",
|
| 172 |
-
whoamiOutput: "user",
|
| 173 |
-
notFound: "Commande non trouvée: {cmd}. Tapez 'help' pour les commandes disponibles.",
|
| 174 |
-
noHistory: "Pas d'historique de commandes"
|
| 175 |
-
},
|
| 176 |
-
uk: {
|
| 177 |
-
welcomeTitle: "Емулятор терміналу Linux v1.0",
|
| 178 |
-
helpPrompt: "Введіть 'help' для списку команд",
|
| 179 |
-
welcomeMessage: "Ласкаво просимо до емулятора терміналу Linux!",
|
| 180 |
-
helpText: `Доступні команди:
|
| 181 |
-
help - Показати це повідомлення
|
| 182 |
-
clear - Очистити термінал
|
| 183 |
-
ls - Список вмісту каталогу
|
| 184 |
-
pwd - Поточний робочий каталог
|
| 185 |
-
whoami - Поточний користувач
|
| 186 |
-
date - Поточна дата та час
|
| 187 |
-
echo [текст] - Вивести текст
|
| 188 |
-
neofetch - Інформація про систему
|
| 189 |
-
history - Історія команд`,
|
| 190 |
-
lsOutput: "РобочийСтіл Документи Завантаження Музика Зображення Відео",
|
| 191 |
-
pwdOutput: "/home/user",
|
| 192 |
-
whoamiOutput: "user",
|
| 193 |
-
notFound: "Команда не знайдена: {cmd}. Введіть 'help' для списку команд.",
|
| 194 |
-
noHistory: "Немає історії команд"
|
| 195 |
-
},
|
| 196 |
-
be: {
|
| 197 |
-
welcomeTitle: "Эмулятар тэрмінала Linux v1.0",
|
| 198 |
-
helpPrompt: "Увядзіце 'help' для спісу каманд",
|
| 199 |
-
welcomeMessage: "Сардэчна запрашаем у эмулятар тэрмінала Linux!",
|
| 200 |
-
helpText: `Даступныя каманды:
|
| 201 |
-
help - Паказаць гэта паведамленне
|
| 202 |
-
clear - Ачысціць тэрмінал
|
| 203 |
-
ls - Спіс змесціва каталога
|
| 204 |
-
pwd - Бягучы працоўны каталог
|
| 205 |
-
whoami - Бягучы карыстальнік
|
| 206 |
-
date - Бягучая дата і час
|
| 207 |
-
echo [тэкст] - Вывесці тэкст
|
| 208 |
-
neofetch - Інфармацыя пра сістэму
|
| 209 |
-
history - Гісторыя каманд`,
|
| 210 |
-
lsOutput: "ПрацоўныСтол Дакументы Спампаваныя Музыка Выявы Відэа",
|
| 211 |
-
pwdOutput: "/home/user",
|
| 212 |
-
whoamiOutput: "user",
|
| 213 |
-
notFound: "Каманда не знойдзена: {cmd}. Увядзіце 'help' для спісу каманд.",
|
| 214 |
-
noHistory: "Няма гісторыі каманд"
|
| 215 |
-
}
|
| 216 |
-
};
|
| 217 |
-
|
| 218 |
-
let currentLanguage = 'en';
|
| 219 |
-
|
| 220 |
-
function updateUITexts() {
|
| 221 |
-
const lang = translations[currentLanguage];
|
| 222 |
-
document.getElementById('welcome-title').textContent = lang.welcomeTitle;
|
| 223 |
-
document.getElementById('help-prompt').textContent = lang.helpPrompt;
|
| 224 |
-
document.getElementById('welcome-message').textContent = lang.welcomeMessage;
|
| 225 |
-
}
|
| 226 |
-
|
| 227 |
-
document.addEventListener('DOMContentLoaded', function() {
|
| 228 |
-
const terminalOutput = document.getElementById('terminal-output');
|
| 229 |
-
const commandInput = document.getElementById('command-input');
|
| 230 |
-
const cursor = document.getElementById('cursor');
|
| 231 |
-
const commandHistory = document.getElementById('command-history');
|
| 232 |
-
const timeDisplay = document.getElementById('time-display');
|
| 233 |
-
|
| 234 |
-
let commandHistoryList = [];
|
| 235 |
-
let historyIndex = -1;
|
| 236 |
-
|
| 237 |
-
// Update time
|
| 238 |
-
function updateTime() {
|
| 239 |
-
const now = new Date();
|
| 240 |
-
const timeString = now.toLocaleTimeString();
|
| 241 |
-
timeDisplay.textContent = timeString;
|
| 242 |
-
}
|
| 243 |
-
setInterval(updateTime, 1000);
|
| 244 |
-
updateTime();
|
| 245 |
-
|
| 246 |
-
// Command processing
|
| 247 |
-
const commands = {
|
| 248 |
-
help: () => {
|
| 249 |
-
return translations[currentLanguage].helpText;
|
| 250 |
-
},
|
| 251 |
-
clear: () => {
|
| 252 |
-
terminalOutput.innerHTML = '';
|
| 253 |
-
return '';
|
| 254 |
-
},
|
| 255 |
-
ls: () => {
|
| 256 |
-
return translations[currentLanguage].lsOutput;
|
| 257 |
-
},
|
| 258 |
-
pwd: () => {
|
| 259 |
-
return translations[currentLanguage].pwdOutput;
|
| 260 |
-
},
|
| 261 |
-
whoami: () => {
|
| 262 |
-
return translations[currentLanguage].whoamiOutput;
|
| 263 |
-
},
|
| 264 |
-
date: () => {
|
| 265 |
-
return new Date().toString();
|
| 266 |
-
},
|
| 267 |
-
echo: (args) => {
|
| 268 |
-
return args.join(' ');
|
| 269 |
-
},
|
| 270 |
-
neofetch: () => {
|
| 271 |
-
return `
|
| 272 |
-
OS: Linux Terminal Emulator
|
| 273 |
-
Host: Web Browser
|
| 274 |
-
Kernel: 5.15.0-76-generic
|
| 275 |
-
Uptime: 2 hours, 15 mins
|
| 276 |
-
Shell: bash 5.0.17
|
| 277 |
-
Terminal: xterm-256color
|
| 278 |
-
CPU: Virtual CPU @ 2.5GHz
|
| 279 |
-
Memory: 1024MB / 2048MB
|
| 280 |
-
`.trim();
|
| 281 |
-
},
|
| 282 |
-
history: () => {
|
| 283 |
-
if (commandHistoryList.length === 0) return translations[currentLanguage].noHistory;
|
| 284 |
-
return commandHistoryList.map((cmd, i) => `${i + 1} ${cmd}`).join('\n');
|
| 285 |
-
}
|
| 286 |
-
};
|
| 287 |
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 291 |
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
promptLine.textContent = `user@linux-terminal:~$ ${command}`;
|
| 300 |
-
terminalOutput.appendChild(promptLine);
|
| 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 |
-
e.preventDefault();
|
| 335 |
-
if (historyIndex > 0) historyIndex--;
|
| 336 |
-
if (historyIndex >= 0) {
|
| 337 |
-
commandInput.value = commandHistoryList[historyIndex];
|
| 338 |
-
moveCursorToEnd();
|
| 339 |
-
}
|
| 340 |
-
}
|
| 341 |
-
// Down arrow - next command
|
| 342 |
-
else if (e.key === 'ArrowDown' && commandHistoryList.length > 0) {
|
| 343 |
-
e.preventDefault();
|
| 344 |
-
if (historyIndex < commandHistoryList.length - 1) {
|
| 345 |
-
historyIndex++;
|
| 346 |
-
commandInput.value = commandHistoryList[historyIndex];
|
| 347 |
-
} else {
|
| 348 |
-
historyIndex = commandHistoryList.length;
|
| 349 |
-
commandInput.value = '';
|
| 350 |
-
}
|
| 351 |
-
moveCursorToEnd();
|
| 352 |
-
}
|
| 353 |
-
// Tab - show history
|
| 354 |
-
else if (e.key === 'Tab') {
|
| 355 |
-
e.preventDefault();
|
| 356 |
-
if (commandHistoryList.length > 0) {
|
| 357 |
-
commandHistory.innerHTML = commandHistoryList.map(cmd =>
|
| 358 |
-
`<div class="py-1 px-2 hover:bg-gray-700 cursor-pointer">${cmd}</div>`
|
| 359 |
-
).join('');
|
| 360 |
-
commandHistory.classList.remove('hidden');
|
| 361 |
-
}
|
| 362 |
-
}
|
| 363 |
-
// Enter - execute command
|
| 364 |
-
else if (e.key === 'Enter') {
|
| 365 |
-
e.preventDefault();
|
| 366 |
-
const command = commandInput.value;
|
| 367 |
-
commandInput.value = '';
|
| 368 |
-
processCommand(command);
|
| 369 |
-
}
|
| 370 |
});
|
| 371 |
-
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
|
| 375 |
-
|
| 376 |
-
|
| 377 |
-
|
| 378 |
-
|
| 379 |
-
|
|
|
|
|
|
|
| 380 |
});
|
| 381 |
-
|
| 382 |
-
|
| 383 |
-
|
| 384 |
-
|
| 385 |
-
|
| 386 |
-
|
|
|
|
| 387 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 388 |
|
| 389 |
-
//
|
| 390 |
-
document.
|
| 391 |
-
|
| 392 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 393 |
|
| 394 |
-
|
| 395 |
-
|
| 396 |
-
|
| 397 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 398 |
});
|
| 399 |
-
|
| 400 |
-
// Initial focus
|
| 401 |
-
commandInput.focus();
|
| 402 |
-
updateUITexts();
|
| 403 |
});
|
| 404 |
</script>
|
| 405 |
<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=pcudima/test" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
+
<html lang="ru">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Название товара | Интернет-магазин</title>
|
| 7 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
<style>
|
| 10 |
+
.swiper-button-disabled {
|
| 11 |
+
opacity: 0.5;
|
| 12 |
+
cursor: not-allowed;
|
| 13 |
}
|
| 14 |
+
.image-active {
|
| 15 |
+
border: 2px solid #3b82f6;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
}
|
| 17 |
</style>
|
| 18 |
</head>
|
| 19 |
+
<body class="bg-gray-50">
|
| 20 |
+
<!-- Header -->
|
| 21 |
+
<header class="bg-white shadow-sm py-4">
|
| 22 |
+
<div class="container mx-auto px-4 flex justify-between items-center">
|
| 23 |
+
<a href="#" class="text-2xl font-bold text-blue-600">Логотип</a>
|
| 24 |
+
|
| 25 |
+
<div class="flex items-center space-x-4">
|
| 26 |
+
<a href="#" class="hover:text-blue-600"><i class="fas fa-search"></i></a>
|
| 27 |
+
<a href="#" class="hover:text-blue-600"><i class="fas fa-user"></i></a>
|
| 28 |
+
<a href="#" class="hover:text-blue-600 relative">
|
| 29 |
+
<i class="fas fa-shopping-cart"></i>
|
| 30 |
+
<span id="cartCount" class="absolute -top-2 -right-2 bg-blue-600 text-white text-xs rounded-full h-5 w-5 flex items-center justify-center">0</span>
|
| 31 |
+
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
</div>
|
| 33 |
</div>
|
| 34 |
+
</header>
|
| 35 |
|
| 36 |
+
<main class="container mx-auto px-4 py-8">
|
| 37 |
+
<!-- Breadcrumbs -->
|
| 38 |
+
<div class="text-sm breadcrumbs mb-6">
|
| 39 |
+
<ul>
|
| 40 |
+
<li><a href="#" class="text-blue-600 hover:underline">Главная</a></li>
|
| 41 |
+
<li><a href="#" class="text-blue-600 hover:underline">Категория</a></li>
|
| 42 |
+
<li>Название товара</li>
|
| 43 |
+
</ul>
|
| 44 |
+
</div>
|
| 45 |
|
| 46 |
+
<!-- Product Grid -->
|
| 47 |
+
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
|
| 48 |
+
<!-- Product Images -->
|
| 49 |
+
<div>
|
| 50 |
+
<!-- Main Image -->
|
| 51 |
+
<div class="bg-white rounded-lg shadow overflow-hidden mb-4">
|
| 52 |
+
<img id="mainImage" src="https://via.placeholder.com/800x600/d1d5db/808080?text=Main+Product" alt="Product Main" class="w-full object-cover aspect-square">
|
| 53 |
+
</div>
|
| 54 |
+
|
| 55 |
+
<!-- Thumbnails -->
|
| 56 |
+
<div class="flex space-x-2 overflow-x-auto pb-2">
|
| 57 |
+
<img src="https://via.placeholder.com/100x100/d1d5db/808080?text=1" alt="Thumbnail 1" class="thumbnail w-20 h-20 object-cover rounded cursor-pointer border border-gray-200 image-active" onclick="changeMainImage(this)">
|
| 58 |
+
<img src="https://via.placeholder.com/100x100/d1d5db/808080?text=2" alt="Thumbnail 2" class="thumbnail w-20 h-20 object-cover rounded cursor-pointer border border-gray-200" onclick="changeMainImage(this)">
|
| 59 |
+
<img src="https://via.placeholder.com/100x100/d1d5db/808080?text=3" alt="Thumbnail 3" class="thumbnail w-20 h-20 object-cover rounded cursor-pointer border border-gray-200" onclick="changeMainImage(this)">
|
| 60 |
+
<img src="https://via.placeholder.com/100x100/d1d5db/808080?text=4" alt="Thumbnail 4" class="thumbnail w-20 h-20 object-cover rounded cursor-pointer border border-gray-200" onclick="changeMainImage(this)">
|
| 61 |
+
</div>
|
| 62 |
+
</div>
|
| 63 |
+
|
| 64 |
+
<!-- Product Info -->
|
| 65 |
+
<div>
|
| 66 |
+
<h1 class="text-3xl font-bold mb-2">Наушники Premium Pro X500</h1>
|
| 67 |
+
|
| 68 |
+
<!-- Rating -->
|
| 69 |
+
<div class="flex items-center mb-4">
|
| 70 |
+
<div class="flex text-yellow-400">
|
| 71 |
+
<i class="fas fa-star"></i>
|
| 72 |
+
<i class="fas fa-star"></i>
|
| 73 |
+
<i class="fas fa-star"></i>
|
| 74 |
+
<i class="fas fa-star"></i>
|
| 75 |
+
<i class="fas fa-star-half-alt"></i>
|
| 76 |
+
</div>
|
| 77 |
+
<span class="text-sm text-gray-500 ml-2">4.5 (256 отзывов)</span>
|
| 78 |
+
<span class="text-sm text-green-600 ml-3">✓ В наличии</span>
|
| 79 |
+
</div>
|
| 80 |
+
|
| 81 |
+
<!-- Price -->
|
| 82 |
+
<div class="mb-6">
|
| 83 |
+
<div class="text-3xl font-bold text-blue-600 mb-1">12 990 ₽</div>
|
| 84 |
+
<div class="text-sm text-gray-500">Бесплатная доставка • Гарантия 2 года</div>
|
| 85 |
+
</div>
|
| 86 |
+
|
| 87 |
+
<hr class="my-4">
|
| 88 |
+
|
| 89 |
+
<!-- Colors -->
|
| 90 |
+
<div class="mb-6">
|
| 91 |
+
<h3 class="font-medium mb-2">Цвет:</h3>
|
| 92 |
+
<div class="flex space-x-2">
|
| 93 |
+
<button class="color-btn h-8 w-8 rounded-full bg-black border-2 border-black" data-color="black"></button>
|
| 94 |
+
<button class="color-btn h-8 w-8 rounded-full bg-gray-300 border-2 border-gray-200" data-color="gray"></button>
|
| 95 |
+
<button class="color-btn h-8 w-8 rounded-full bg-blue-700 border-2 border-gray-200" data-color="blue"></button>
|
| 96 |
+
<button class="color-btn h-8 w-8 rounded-full bg-white border-2 border-gray-300" data-color="white"></button>
|
| 97 |
+
</div>
|
| 98 |
+
</div>
|
| 99 |
+
|
| 100 |
+
<!-- Size -->
|
| 101 |
+
<div class="mb-6">
|
| 102 |
+
<h3 class="font-medium mb-2">Вариант:</h3>
|
| 103 |
+
<div class="flex flex-wrap gap-2">
|
| 104 |
+
<button class="variant-btn px-4 py-2 border rounded hover:bg-gray-100" data-variant="standart">Стандарт</button>
|
| 105 |
+
<button class="variant-btn px-4 py-2 border rounded hover:bg-gray-100" data-variant="pro">Pro (1 990 ₽)</button>
|
| 106 |
+
<button class="variant-btn px-4 py-2 border rounded hover:bg-gray-100" data-variant="wireless">Беспроводные (3 500 ₽)</button>
|
| 107 |
+
</div>
|
| 108 |
+
</div>
|
| 109 |
+
|
| 110 |
+
<!-- Quantity -->
|
| 111 |
+
<div class="mb-8">
|
| 112 |
+
<h3 class="font-medium mb-2">Количество:</h3>
|
| 113 |
+
<div class="flex items-center">
|
| 114 |
+
<button id="decrement" class="px-4 py-2 bg-gray-100 rounded-l hover:bg-gray-200"><i class="fas fa-minus"></i></button>
|
| 115 |
+
<input type="number" id="quantity" value="1" min="1" max="10" class="w-16 py-2 text-center border-t border-b outline-none">
|
| 116 |
+
<button id="increment" class="px-4 py-2 bg-gray-100 rounded-r hover:bg-gray-200"><i class="fas fa-plus"></i></button>
|
| 117 |
+
</div>
|
| 118 |
+
</div>
|
| 119 |
+
|
| 120 |
+
<!-- Buttons -->
|
| 121 |
+
<div class="flex flex-col md:flex-row space-y-2 md:space-y-0 md:space-x-2 mb-8">
|
| 122 |
+
<button id="addToCart" class="bg-blue-600 hover:bg-blue-700 text-white py-3 px-6 rounded-lg flex-grow">
|
| 123 |
+
<i class="fas fa-shopping-cart mr-2"></i> Добавить в корзину
|
| 124 |
+
</button>
|
| 125 |
+
<button class="bg-gray-200 hover:bg-gray-300 text-gray-800 py-3 px-6 rounded-lg">
|
| 126 |
+
<i class="far fa-heart mr-2"></i> В избранное
|
| 127 |
+
</button>
|
| 128 |
+
</div>
|
| 129 |
+
|
| 130 |
+
<!-- Delivery info -->
|
| 131 |
+
<div class="bg-gray-50 p-4 rounded-lg">
|
| 132 |
+
<div class="flex items-start mb-2">
|
| 133 |
+
<i class="fas fa-truck text-blue-600 mt-1 mr-3"></i>
|
| 134 |
+
<div>
|
| 135 |
+
<div class="font-medium">Доставка по всему миру</div>
|
| 136 |
+
<div class="text-sm text-gray-600">Доставим за 3-5 дней или бесплатно при заказе от 5 000 ₽</div>
|
| 137 |
+
</div>
|
| 138 |
+
</div>
|
| 139 |
+
<div class="flex items-start">
|
| 140 |
+
<i class="fas fa-shield-alt text-blue-600 mt-1 mr-3"></i>
|
| 141 |
+
<div>
|
| 142 |
+
<div class="font-medium">Гарантия возврата</div>
|
| 143 |
+
<div class="text-sm text-gray-600">30 дней на возврат. Подробные условия</div>
|
| 144 |
+
</div>
|
| 145 |
</div>
|
| 146 |
</div>
|
|
|
|
| 147 |
</div>
|
| 148 |
</div>
|
| 149 |
+
|
| 150 |
+
<!-- Tabs -->
|
| 151 |
+
<div class="mt-12">
|
| 152 |
+
<div class="border-b border-gray-200">
|
| 153 |
+
<div class="flex space-x-8">
|
| 154 |
+
<button class="tab-btn py-2 px-1 font-medium text-blue-600 border-b-2 border-blue-600">Описание</button>
|
| 155 |
+
<button class="tab-btn py-2 px-1 font-medium text-gray-500 hover:text-gray-700">Характеристики</button>
|
| 156 |
+
<button class="tab-btn py-2 px-1 font-medium text-gray-500 hover:text-gray-700">Отзывы (256)</button>
|
| 157 |
+
<button class="tab-btn py-2 px-1 font-medium text-gray-500 hover:text-gray-700">Доставка и оплата</button>
|
| 158 |
+
</div>
|
| 159 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 160 |
|
| 161 |
+
<div class="py-6">
|
| 162 |
+
<div id="description-tab" class="tab-content">
|
| 163 |
+
<h2 class="text-xl font-bold mb-4">Описание Premium Pro X500</h2>
|
| 164 |
+
<p class="mb-4">
|
| 165 |
+
Наушники Premium Pro X500 — это новый стандарт звука в своём классе. Инновационные динамические излучатели
|
| 166 |
+
обеспечивают кристально чистый звук с мощными басами и чёткими высокими частотами.
|
| 167 |
+
</p>
|
| 168 |
+
<p class="mb-4">
|
| 169 |
+
Эргономичная конструкция обеспечивает комфорт даже при длительном использовании, а технология активного
|
| 170 |
+
шумоподавления позволяет полностью погрузиться в музыку.
|
| 171 |
+
</p>
|
| 172 |
+
<ul class="list-disc pl-5 mb-4 space-y-2">
|
| 173 |
+
<li>40-мм динамические излучатели с неодимовыми магнитами</li>
|
| 174 |
+
<li>Частотный диапазон: 20 - 20 000 Гц</li>
|
| 175 |
+
<li>Активное шумоподавление с 4 микрофонами</li>
|
| 176 |
+
<li>Время работы: до 30 часов (Bluetooth)</li>
|
| 177 |
+
<li>Проводное и беспроводное подключение</li>
|
| 178 |
+
</ul>
|
| 179 |
+
</div>
|
| 180 |
|
| 181 |
+
<div id="specs-tab" class="tab-content hidden">
|
| 182 |
+
<!-- Характеристики будут здесь -->
|
| 183 |
+
</div>
|
| 184 |
|
| 185 |
+
<div id="reviews-tab" class="tab-content hidden">
|
| 186 |
+
<!-- Отзывы будут здесь -->
|
| 187 |
+
</div>
|
|
|
|
|
|
|
| 188 |
|
| 189 |
+
<div id="delivery-tab" class="tab-content hidden">
|
| 190 |
+
<!-- Доставка будет здесь -->
|
| 191 |
+
</div>
|
| 192 |
+
</div>
|
| 193 |
+
</div>
|
| 194 |
+
|
| 195 |
+
<!-- Related Products -->
|
| 196 |
+
<div class="mt-12">
|
| 197 |
+
<h2 class="text-2xl font-bold mb-6">С этим товаром покупают</h2>
|
| 198 |
+
|
| 199 |
+
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6">
|
| 200 |
+
<!-- Product 1 -->
|
| 201 |
+
<div class="bg-white rounded-lg shadow overflow-hidden hover:shadow-lg transition-shadow">
|
| 202 |
+
<div class="relative h-48 bg-gray-100">
|
| 203 |
+
<img src="https://via.placeholder.com/300x300/d1d5db/808080?text=Related" alt="Related Product" class="w-full h-full object-cover">
|
| 204 |
+
<button class="absolute top-2 right-2 bg-white rounded-full p-2 shadow hover:bg-gray-100">
|
| 205 |
+
<i class="far fa-heart text-gray-600"></i>
|
| 206 |
+
</button>
|
| 207 |
+
</div>
|
| 208 |
+
<div class="p-4">
|
| 209 |
+
<h3 class="font-medium mb-1">Кейс для наушников</h3>
|
| 210 |
+
<div class="text-blue-600 font-bold mb-2">1 290 ₽</div>
|
| 211 |
+
<button class="w-full py-2 bg-blue-600 hover:bg-blue-700 text-white rounded">Добавить</button>
|
| 212 |
+
</div>
|
| 213 |
+
</div>
|
| 214 |
|
| 215 |
+
<!-- Product 2 -->
|
| 216 |
+
<div class="bg-white rounded-lg shadow overflow-hidden hover:shadow-lg transition-shadow">
|
| 217 |
+
<div class="relative h-48 bg-gray-100">
|
| 218 |
+
<img src="https://via.placeholder.com/300x300/d1d5db/808080?text=Related" alt="Related Product" class="w-full h-full object-cover">
|
| 219 |
+
<button class="absolute top-2 right-2 bg-white rounded-full p-2 shadow hover:bg-gray-100">
|
| 220 |
+
<i class="far fa-heart text-gray-600"></i>
|
| 221 |
+
</button>
|
| 222 |
+
</div>
|
| 223 |
+
<div class="p-4">
|
| 224 |
+
<h3 class="font-medium mb-1">Кабель аудио 3.5mm</h3>
|
| 225 |
+
<div class="text-blue-600 font-bold mb-2">490 ₽</div>
|
| 226 |
+
<button class="w-full py-2 bg-blue-600 hover:bg-blue-700 text-white rounded">Добавить</button>
|
| 227 |
+
</div>
|
| 228 |
+
</div>
|
| 229 |
|
| 230 |
+
<!-- Product 3 -->
|
| 231 |
+
<div class="bg-white rounded-lg shadow overflow-hidden hover:shadow-lg transition-shadow">
|
| 232 |
+
<div class="relative h-48 bg-gray-100">
|
| 233 |
+
<img src="https://via.placeholder.com/300x300/d1d5db/808080?text=Related" alt="Related Product" class="w-full h-full object-cover">
|
| 234 |
+
<button class="absolute top-2 right-2 bg-white rounded-full p-2 shadow hover:bg-gray-100">
|
| 235 |
+
<i class="far fa-heart text-gray-600"></i>
|
| 236 |
+
</button>
|
| 237 |
+
</div>
|
| 238 |
+
<div class="p-4">
|
| 239 |
+
<h3 class="font-medium mb-1">Адаптер Bluetooth</h3>
|
| 240 |
+
<div class="text-blue-600 font-bold mb-2">1 890 ₽</div>
|
| 241 |
+
<button class="w-full py-2 bg-blue-600 hover:bg-blue-700 text-white rounded">Добавить</button>
|
| 242 |
+
</div>
|
| 243 |
+
</div>
|
| 244 |
|
| 245 |
+
<!-- Product 4 -->
|
| 246 |
+
<div class="bg-white rounded-lg shadow overflow-hidden hover:shadow-lg transition-shadow">
|
| 247 |
+
<div class="relative h-48 bg-gray-100">
|
| 248 |
+
<img src="https://via.placeholder.com/300x300/d1d5db/808080?text=Related" alt="Related Product" class="w-full h-full object-cover">
|
| 249 |
+
<button class="absolute top-2 right-2 bg-white rounded-full p-2 shadow hover:bg-gray-100">
|
| 250 |
+
<i class="far fa-heart text-gray-600"></i>
|
| 251 |
+
</button>
|
| 252 |
+
</div>
|
| 253 |
+
<div class="p-4">
|
| 254 |
+
<h3 class="font-medium mb-1">Подставка для наушников</h3>
|
| 255 |
+
<div class="text-blue-600 font-bold mb-2">2 990 ₽</div>
|
| 256 |
+
<button class="w-full py-2 bg-blue-600 hover:bg-blue-700 text-white rounded">Добавить</button>
|
| 257 |
+
</div>
|
| 258 |
+
</div>
|
| 259 |
+
</div>
|
| 260 |
+
</div>
|
| 261 |
+
</main>
|
| 262 |
+
|
| 263 |
+
<footer class="bg-gray-100 mt-12 py-8">
|
| 264 |
+
<div class="container mx-auto px-4">
|
| 265 |
+
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
|
| 266 |
+
<div>
|
| 267 |
+
<h3 class="font-bold mb-4">Магазин</h3>
|
| 268 |
+
<ul class="space-y-2">
|
| 269 |
+
<li><a href="#" class="text-gray-600 hover:text-blue-600">О нас</a></li>
|
| 270 |
+
<li><a href="#" class="text-gray-600 hover:text-blue-600">Каталог</a></li>
|
| 271 |
+
<li><a href="#" class="text-gray-600 hover:text-blue-600">Акции</a></li>
|
| 272 |
+
<li><a href="#" class="text-gray-600 hover:text-blue-600">Бренды</a></li>
|
| 273 |
+
</ul>
|
| 274 |
+
</div>
|
| 275 |
+
<div>
|
| 276 |
+
<h3 class="font-bold mb-4">Помощь</h3>
|
| 277 |
+
<ul class="space-y-2">
|
| 278 |
+
<li><a href="#" class="text-gray-600 hover:text-blue-600">Доставка и оплата</a></li>
|
| 279 |
+
<li><a href="#" class="text-gray-600 hover:text-blue-600">Возврат</a></li>
|
| 280 |
+
<li><a href="#" class="text-gray-600 hover:text-blue-600">FAQ</a></li>
|
| 281 |
+
<li><a href="#" class="text-gray-600 hover:text-blue-600">Контакты</a></li>
|
| 282 |
+
</ul>
|
| 283 |
+
</div>
|
| 284 |
+
<div>
|
| 285 |
+
<h3 class="font-bold mb-4">Контакты</h3>
|
| 286 |
+
<ul class="space-y-2">
|
| 287 |
+
<li class="text-gray-600">8 (800) 555-35-35</li>
|
| 288 |
+
<li class="text-gray-600">info@shop.com</li>
|
| 289 |
+
<li class="text-gray-600">Москва, ул. Примерная, 123</li>
|
| 290 |
+
</ul>
|
| 291 |
+
</div>
|
| 292 |
+
<div>
|
| 293 |
+
<h3 class="font-bold mb-4">Соцсети</h3>
|
| 294 |
+
<div class="flex space-x-4">
|
| 295 |
+
<a href="#" class="text-blue-600 hover:text-blue-800 text-xl"><i class="fab fa-vk"></i></a>
|
| 296 |
+
<a href="#" class="text-blue-400 hover:text-blue-600 text-xl"><i class="fab fa-telegram"></i></a>
|
| 297 |
+
<a href="#" class="text-pink-500 hover:text-pink-700 text-xl"><i class="fab fa-instagram"></i></a>
|
| 298 |
+
<a href="#" class="text-blue-700 hover:text-blue-900 text-xl"><i class="fab fa-facebook"></i></a>
|
| 299 |
+
</div>
|
| 300 |
+
<p class="text-gray-600 mt-4 text-sm">Подпишитесь на наши новости и акции</p>
|
| 301 |
+
</div>
|
| 302 |
+
</div>
|
| 303 |
+
<div class="border-t border-gray-200 mt-8 pt-8 text-center text-gray-500 text-sm">
|
| 304 |
+
© 2023 Интернет-магазин. Все права защищены.
|
| 305 |
+
</div>
|
| 306 |
+
</div>
|
| 307 |
+
</footer>
|
| 308 |
+
|
| 309 |
+
<script>
|
| 310 |
+
// Changing main image when thumbnail clicked
|
| 311 |
+
function changeMainImage(element) {
|
| 312 |
+
const mainImage = document.getElementById('mainImage');
|
| 313 |
+
mainImage.src = element.src.replace('100x100', '800x600');
|
| 314 |
|
| 315 |
+
// Update active thumbnail
|
| 316 |
+
document.querySelectorAll('.thumbnail').forEach(img => {
|
| 317 |
+
img.classList.remove('image-active');
|
| 318 |
+
});
|
| 319 |
+
element.classList.add('image-active');
|
| 320 |
+
}
|
| 321 |
+
|
| 322 |
+
// Color selection
|
| 323 |
+
document.querySelectorAll('.color-btn').forEach(btn => {
|
| 324 |
+
btn.addEventListener('click', function() {
|
| 325 |
+
document.querySelectorAll('.color-btn').forEach(b => {
|
| 326 |
+
b.classList.remove('border-black');
|
| 327 |
+
b.classList.add('border-gray-200');
|
| 328 |
+
});
|
| 329 |
+
this.classList.remove('border-gray-200');
|
| 330 |
+
this.classList.add('border-black');
|
| 331 |
|
| 332 |
+
// In a real app, we might change the product images based on color
|
| 333 |
+
console.log('Selected color:', this.dataset.color);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 334 |
});
|
| 335 |
+
});
|
| 336 |
+
|
| 337 |
+
// Variant selection
|
| 338 |
+
document.querySelectorAll('.variant-btn').forEach(btn => {
|
| 339 |
+
btn.addEventListener('click', function() {
|
| 340 |
+
document.querySelectorAll('.variant-btn').forEach(b => {
|
| 341 |
+
b.classList.remove('bg-blue-100', 'border-blue-300');
|
| 342 |
+
});
|
| 343 |
+
this.classList.add('bg-blue-100', 'border-blue-300');
|
| 344 |
+
|
| 345 |
+
console.log('Selected variant:', this.dataset.variant);
|
| 346 |
});
|
| 347 |
+
});
|
| 348 |
+
|
| 349 |
+
// Quantity controls
|
| 350 |
+
document.getElementById('decrement').addEventListener('click', function() {
|
| 351 |
+
const quantity = document.getElementById('quantity');
|
| 352 |
+
if (quantity.value > 1) {
|
| 353 |
+
quantity.value--;
|
| 354 |
}
|
| 355 |
+
});
|
| 356 |
+
|
| 357 |
+
document.getElementById('increment').addEventListener('click', function() {
|
| 358 |
+
const quantity = document.getElementById('quantity');
|
| 359 |
+
if (quantity.value < 10) {
|
| 360 |
+
quantity.value++;
|
| 361 |
+
}
|
| 362 |
+
});
|
| 363 |
+
|
| 364 |
+
// Add to cart
|
| 365 |
+
document.getElementById('addToCart').addEventListener('click', function() {
|
| 366 |
+
const cartCount = document.getElementById('cartCount');
|
| 367 |
+
let count = parseInt(cartCount.textContent);
|
| 368 |
+
count++;
|
| 369 |
+
cartCount.textContent = count;
|
| 370 |
|
| 371 |
+
// Show notification
|
| 372 |
+
const notification = document.createElement('div');
|
| 373 |
+
notification.className = 'fixed bottom-4 right-4 bg-green-500 text-white px-4 py-2 rounded-lg shadow-lg flex items-center';
|
| 374 |
+
notification.innerHTML = `
|
| 375 |
+
<i class="fas fa-check-circle mr-2"></i>
|
| 376 |
+
Товар добавлен в корзину!
|
| 377 |
+
`;
|
| 378 |
+
document.body.appendChild(notification);
|
| 379 |
+
|
| 380 |
+
setTimeout(() => {
|
| 381 |
+
notification.classList.add('opacity-0', 'transition-opacity', 'duration-300');
|
| 382 |
+
setTimeout(() => notification.remove(), 300);
|
| 383 |
+
}, 2000);
|
| 384 |
|
| 385 |
+
console.log('Added to cart!');
|
| 386 |
+
});
|
| 387 |
+
|
| 388 |
+
// Tab switching
|
| 389 |
+
document.querySelectorAll('.tab-btn').forEach((btn, index) => {
|
| 390 |
+
btn.addEventListener('click', function() {
|
| 391 |
+
// Update active tab button
|
| 392 |
+
document.querySelectorAll('.tab-btn').forEach(b => {
|
| 393 |
+
b.classList.remove('text-blue-600', 'border-blue-600');
|
| 394 |
+
b.classList.add('text-gray-500', 'hover:text-gray-700');
|
| 395 |
+
});
|
| 396 |
+
this.classList.add('text-blue-600', 'border-blue-600');
|
| 397 |
+
this.classList.remove('text-gray-500', 'hover:text-gray-700');
|
| 398 |
+
|
| 399 |
+
// Show corresponding tab content
|
| 400 |
+
document.querySelectorAll('.tab-content').forEach(content => {
|
| 401 |
+
content.classList.add('hidden');
|
| 402 |
+
});
|
| 403 |
+
|
| 404 |
+
const tabContents = ['description-tab', 'specs-tab', 'reviews-tab', 'delivery-tab'];
|
| 405 |
+
document.getElementById(tabContents[index]).classList.remove('hidden');
|
| 406 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
| 407 |
});
|
| 408 |
</script>
|
| 409 |
<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=pcudima/test" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|