Dmitriy commited on
Commit
25ff384
·
verified ·
1 Parent(s): a0f1ac2

Добавь функционал кнопке перехода как я понял в профиль - Follow Up Deployment

Browse files
Files changed (1) hide show
  1. index.html +31 -6
index.html CHANGED
@@ -24,7 +24,18 @@
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>
@@ -49,15 +60,15 @@
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
 
@@ -646,6 +657,20 @@
646
  console.log('Added to cart!');
647
  });
648
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
649
  // Tab switching
650
  document.querySelectorAll('.tab-btn').forEach((btn, index) => {
651
  btn.addEventListener('click', function() {
 
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
+ <div class="relative">
28
+ <button id="profileBtn" class="hover:text-blue-600 focus:outline-none">
29
+ <i class="fas fa-user"></i>
30
+ </button>
31
+ <div id="profileDropdown" class="hidden absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg py-1 z-10">
32
+ <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Мой профиль</a>
33
+ <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Заказы</a>
34
+ <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Избранное</a>
35
+ <div class="border-t border-gray-200"></div>
36
+ <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Выйти</a>
37
+ </div>
38
+ </div>
39
  <a href="#" class="hover:text-blue-600 relative">
40
  <i class="fas fa-shopping-cart"></i>
41
  <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>
 
60
  <div>
61
  <!-- Main Image -->
62
  <div class="bg-white rounded-lg shadow overflow-hidden mb-4">
63
+ <img id="mainImage" src="https://rostov.pult.ru/upload/iblock/985/985808c94450be5e15554ea5d83e5fb7.jpg" alt="Product Main" class="w-full object-cover aspect-square">
64
  </div>
65
 
66
  <!-- Thumbnails -->
67
  <div class="flex space-x-2 overflow-x-auto pb-2">
68
+ <img src="https://avatars.mds.yandex.net/i?id=60e0e04af9216957fbbceef212c72de0_l-7762005-images-thumbs&n=13" alt="Thumbnail 1" class="thumbnail w-20 h-20 object-cover rounded cursor-pointer border border-gray-200 image-active" onclick="changeMainImage(this)">
69
+ <img src="https://www.bigtv.ru/storage/goodsImages/103/103776/clear_103776_1.jpg" alt="Thumbnail 2" class="thumbnail w-20 h-20 object-cover rounded cursor-pointer border border-gray-200" onclick="changeMainImage(this)">
70
+ <img src="https://www.muztorg.ru/files/1g1/pvx/178/89w/4cc/w40/wkk/o4w/k/1g1pvx17889w4ccw40wkko4wk.jpg" alt="Thumbnail 3" class="thumbnail w-20 h-20 object-cover rounded cursor-pointer border border-gray-200" onclick="changeMainImage(this)">
71
+ <img src="https://unishop.s3-minsk-dc2.cloud.mts.by/categories/naushniki.webp" alt="Thumbnail 4" class="thumbnail w-20 h-20 object-cover rounded cursor-pointer border border-gray-200" onclick="changeMainImage(this)">
72
  </div>
73
  </div>
74
 
 
657
  console.log('Added to cart!');
658
  });
659
 
660
+ // Profile dropdown toggle
661
+ const profileBtn = document.getElementById('profileBtn');
662
+ const profileDropdown = document.getElementById('profileDropdown');
663
+
664
+ profileBtn.addEventListener('click', function(e) {
665
+ e.stopPropagation();
666
+ profileDropdown.classList.toggle('hidden');
667
+ });
668
+
669
+ // Close dropdown when clicking outside
670
+ document.addEventListener('click', function() {
671
+ profileDropdown.classList.add('hidden');
672
+ });
673
+
674
  // Tab switching
675
  document.querySelectorAll('.tab-btn').forEach((btn, index) => {
676
  btn.addEventListener('click', function() {