zeeleo007 commited on
Commit
07cd639
·
verified ·
1 Parent(s): d8b1d97

add compare and my bag bottom in website, book and product and make the same layout of these three add noen flip hover effects on cards

Browse files
Files changed (2) hide show
  1. books.html +3 -3
  2. products.html +4 -4
books.html CHANGED
@@ -52,7 +52,7 @@
52
  const [compare, setCompare] = useState(false);
53
 
54
  return (
55
- <div className="bg-white rounded-xl p-6 shadow-md border border-gray-100 relative">
56
  {book.discount > 0 && (
57
  <span className="absolute top-4 right-4 bg-red-500 text-white text-xs px-2 py-1 rounded-full">
58
  {book.discount}% OFF
@@ -90,7 +90,7 @@
90
  className={`flex items-center text-sm ${compare ? 'text-purple-600' : 'text-gray-500 hover:text-purple-500'}`}
91
  >
92
  <i className={`fas fa-exchange-alt mr-1 ${compare ? 'text-purple-600' : 'text-gray-500'}`}></i>
93
- {compare ? 'Added' : 'Compare'}
94
  </button>
95
  <button
96
  onClick={() => setInBag(!inBag)}
@@ -109,7 +109,7 @@
109
  </div>
110
  );
111
  }
112
- function BooksPage() {
113
  const [books, setBooks] = useState([
114
  {
115
  id: 1,
 
52
  const [compare, setCompare] = useState(false);
53
 
54
  return (
55
+ <div className="bg-white rounded-xl p-6 shadow-md border border-gray-100 relative hover:shadow-lg hover:-translate-y-1 transition-all duration-300">
56
  {book.discount > 0 && (
57
  <span className="absolute top-4 right-4 bg-red-500 text-white text-xs px-2 py-1 rounded-full">
58
  {book.discount}% OFF
 
90
  className={`flex items-center text-sm ${compare ? 'text-purple-600' : 'text-gray-500 hover:text-purple-500'}`}
91
  >
92
  <i className={`fas fa-exchange-alt mr-1 ${compare ? 'text-purple-600' : 'text-gray-500'}`}></i>
93
+ {compare ? 'Comparing' : 'Compare'}
94
  </button>
95
  <button
96
  onClick={() => setInBag(!inBag)}
 
109
  </div>
110
  );
111
  }
112
+ function BooksPage() {
113
  const [books, setBooks] = useState([
114
  {
115
  id: 1,
products.html CHANGED
@@ -52,8 +52,8 @@
52
  const [compare, setCompare] = useState(false);
53
 
54
  return (
55
- <div className="bg-white rounded-xl p-6 shadow-md border border-gray-100 relative">
56
- {product.discount > 0 && (
57
  <span className="absolute top-4 right-4 bg-red-500 text-white text-xs px-2 py-1 rounded-full">
58
  {product.discount}% OFF
59
  </span>
@@ -89,9 +89,9 @@
89
  className={`flex items-center text-sm ${compare ? 'text-purple-600' : 'text-gray-500 hover:text-purple-500'}`}
90
  >
91
  <i className={`fas fa-exchange-alt mr-1 ${compare ? 'text-purple-600' : 'text-gray-500'}`}></i>
92
- {compare ? 'Added' : 'Compare'}
93
  </button>
94
- <button
95
  onClick={() => setInBag(!inBag)}
96
  className={`flex items-center text-sm ${inBag ? 'text-blue-600' : 'text-gray-500 hover:text-blue-500'}`}
97
  >
 
52
  const [compare, setCompare] = useState(false);
53
 
54
  return (
55
+ <div className="bg-white rounded-xl p-6 shadow-md border border-gray-100 relative hover:shadow-lg hover:-translate-y-1 transition-all duration-300">
56
+ {product.discount > 0 && (
57
  <span className="absolute top-4 right-4 bg-red-500 text-white text-xs px-2 py-1 rounded-full">
58
  {product.discount}% OFF
59
  </span>
 
89
  className={`flex items-center text-sm ${compare ? 'text-purple-600' : 'text-gray-500 hover:text-purple-500'}`}
90
  >
91
  <i className={`fas fa-exchange-alt mr-1 ${compare ? 'text-purple-600' : 'text-gray-500'}`}></i>
92
+ {compare ? 'Comparing' : 'Compare'}
93
  </button>
94
+ <button
95
  onClick={() => setInBag(!inBag)}
96
  className={`flex items-center text-sm ${inBag ? 'text-blue-600' : 'text-gray-500 hover:text-blue-500'}`}
97
  >