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

Сюда тоже добавь функционал - Follow Up Deployment

Browse files
Files changed (1) hide show
  1. index.html +22 -1
index.html CHANGED
@@ -23,7 +23,19 @@
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
  <div class="relative">
28
  <button id="profileBtn" class="hover:text-blue-600 focus:outline-none">
29
  <i class="fas fa-user"></i>
@@ -657,6 +669,15 @@
657
  console.log('Added to cart!');
658
  });
659
 
 
 
 
 
 
 
 
 
 
660
  // Profile dropdown toggle
661
  const profileBtn = document.getElementById('profileBtn');
662
  const profileDropdown = document.getElementById('profileDropdown');
 
23
  <a href="#" class="text-2xl font-bold text-blue-600">Логотип</a>
24
 
25
  <div class="flex items-center space-x-4">
26
+ <div class="relative">
27
+ <button id="searchBtn" class="hover:text-blue-600 focus:outline-none">
28
+ <i class="fas fa-search"></i>
29
+ </button>
30
+ <div id="searchDropdown" class="hidden absolute right-0 mt-2 w-64 bg-white rounded-md shadow-lg py-1 z-10">
31
+ <form class="p-2">
32
+ <input type="text" placeholder="Поиск товаров..." class="w-full px-3 py-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
33
+ <button type="submit" class="mt-2 w-full bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded-md">
34
+ Найти
35
+ </button>
36
+ </form>
37
+ </div>
38
+ </div>
39
  <div class="relative">
40
  <button id="profileBtn" class="hover:text-blue-600 focus:outline-none">
41
  <i class="fas fa-user"></i>
 
669
  console.log('Added to cart!');
670
  });
671
 
672
+ // Search dropdown toggle
673
+ const searchBtn = document.getElementById('searchBtn');
674
+ const searchDropdown = document.getElementById('searchDropdown');
675
+
676
+ searchBtn.addEventListener('click', function(e) {
677
+ e.stopPropagation();
678
+ searchDropdown.classList.toggle('hidden');
679
+ });
680
+
681
  // Profile dropdown toggle
682
  const profileBtn = document.getElementById('profileBtn');
683
  const profileDropdown = document.getElementById('profileDropdown');