View All kısmını geliştir
Browse files- README.md +8 -5
- components/navbar.js +40 -0
- index.html +217 -19
- script.js +48 -0
- style.css +53 -18
README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title: Cata Commerce Explorer
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Cata Commerce Explorer 🛍️✨
|
| 3 |
+
colorFrom: red
|
| 4 |
+
colorTo: pink
|
| 5 |
+
emoji: 🐳
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite-v3
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Welcome to your new DeepSite project!
|
| 13 |
+
This project was created with [DeepSite](https://huggingface.co/deepsite).
|
components/navbar.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomNavbar extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
.navbar-link:hover {
|
| 7 |
+
color: #2563eb;
|
| 8 |
+
}
|
| 9 |
+
.navbar-link::after {
|
| 10 |
+
content: '';
|
| 11 |
+
display: block;
|
| 12 |
+
width: 0;
|
| 13 |
+
height: 2px;
|
| 14 |
+
background: #2563eb;
|
| 15 |
+
transition: width 0.3s;
|
| 16 |
+
}
|
| 17 |
+
.navbar-link:hover::after {
|
| 18 |
+
width: 100%;
|
| 19 |
+
}
|
| 20 |
+
</style>
|
| 21 |
+
<nav class="bg-white shadow-sm">
|
| 22 |
+
<div class="container mx-auto px-4">
|
| 23 |
+
<div class="flex justify-between items-center py-4">
|
| 24 |
+
<a href="/" class="flex items-center">
|
| 25 |
+
<span class="text-xl font-bold text-gray-800">Cata</span>
|
| 26 |
+
</a>
|
| 27 |
+
|
| 28 |
+
<div class="hidden md:flex space-x-8">
|
| 29 |
+
<a href="/" class="navbar-link text-gray-600 hover:text-blue-600 font-medium">Home</a>
|
| 30 |
+
<a href="#products" class="navbar-link text-gray-600 hover:text-blue-600 font-medium">Products</a>
|
| 31 |
+
<a href="#" class="navbar-link text-gray-600 hover:text-blue-600 font-medium">Categories</a>
|
| 32 |
+
<a href="#" class="navbar-link text-gray-600 hover:text-blue-600 font-medium">About</a>
|
| 33 |
+
<a href="#" class="navbar-link text-gray-600 hover:text-blue-600 font-medium">Contact</a>
|
| 34 |
+
</div>
|
| 35 |
+
|
| 36 |
+
<div class="flex items-center space-x-4">
|
| 37 |
+
<button class="p-2 text-gray-600 hover:text-blue-600">
|
| 38 |
+
<i data-feather="search" class="w-5 h-5"></i>
|
| 39 |
+
</button>
|
| 40 |
+
<button class="p
|
index.html
CHANGED
|
@@ -1,19 +1,217 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Cata Commerce Explorer</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 10 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 11 |
+
<script src="components/navbar.js"></script>
|
| 12 |
+
<script src="components/footer.js"></script>
|
| 13 |
+
</head>
|
| 14 |
+
<body class="bg-gray-50">
|
| 15 |
+
<custom-navbar></custom-navbar>
|
| 16 |
+
|
| 17 |
+
<main class="container mx-auto px-4 py-8">
|
| 18 |
+
<!-- Hero Section -->
|
| 19 |
+
<section class="bg-white rounded-xl shadow-md overflow-hidden mb-12">
|
| 20 |
+
<div class="md:flex">
|
| 21 |
+
<div class="md:flex-1 p-8 md:p-12">
|
| 22 |
+
<h1 class="text-4xl font-bold text-gray-800 mb-4">Explore Cata's Premium Products</h1>
|
| 23 |
+
<p class="text-lg text-gray-600 mb-6">Discover high-quality items for your home, office, and lifestyle needs.</p>
|
| 24 |
+
<a href="#products" class="bg-blue-600 hover:bg-blue-700 text-white font-medium py-3 px-6 rounded-lg transition duration-300 inline-flex items-center">
|
| 25 |
+
Shop Now <i data-feather="arrow-right" class="ml-2"></i>
|
| 26 |
+
</a>
|
| 27 |
+
</div>
|
| 28 |
+
<div class="md:flex-1">
|
| 29 |
+
<img src="http://static.photos/retail/1200x630/42" alt="Cata Products" class="w-full h-full object-cover">
|
| 30 |
+
</div>
|
| 31 |
+
</div>
|
| 32 |
+
</section>
|
| 33 |
+
|
| 34 |
+
<!-- Featured Categories -->
|
| 35 |
+
<section class="mb-12">
|
| 36 |
+
<h2 class="text-2xl font-semibold text-gray-800 mb-6">Shop by Category</h2>
|
| 37 |
+
<div class="grid grid-cols-2 md:grid-cols-4 gap-4">
|
| 38 |
+
<a href="#" class="bg-white rounded-lg shadow-sm p-6 text-center hover:shadow-md transition duration-300">
|
| 39 |
+
<div class="bg-gray-100 rounded-full p-4 mb-3 inline-block">
|
| 40 |
+
<i data-feather="home" class="text-blue-600 w-8 h-8"></i>
|
| 41 |
+
</div>
|
| 42 |
+
<h3 class="font-medium text-gray-800">Home & Living</h3>
|
| 43 |
+
</a>
|
| 44 |
+
<a href="#" class="bg-white rounded-lg shadow-sm p-6 text-center hover:shadow-md transition duration-300">
|
| 45 |
+
<div class="bg-gray-100 rounded-full p-4 mb-3 inline-block">
|
| 46 |
+
<i data-feather="briefcase" class="text-blue-600 w-8 h-8"></i>
|
| 47 |
+
</div>
|
| 48 |
+
<h3 class="font-medium text-gray-800">Office Supplies</h3>
|
| 49 |
+
</a>
|
| 50 |
+
<a href="#" class="bg-white rounded-lg shadow-sm p-6 text-center hover:shadow-md transition duration-300">
|
| 51 |
+
<div class="bg-gray-100 rounded-full p-4 mb-3 inline-block">
|
| 52 |
+
<i data-feather="cpu" class="text-blue-600 w-8 h-8"></i>
|
| 53 |
+
</div>
|
| 54 |
+
<h3 class="font-medium text-gray-800">Electronics</h3>
|
| 55 |
+
</a>
|
| 56 |
+
<a href="#" class="bg-white rounded-lg shadow-sm p-6 text-center hover:shadow-md transition duration-300">
|
| 57 |
+
<div class="bg-gray-100 rounded-full p-4 mb-3 inline-block">
|
| 58 |
+
<i data-feather="gift" class="text-blue-600 w-8 h-8"></i>
|
| 59 |
+
</div>
|
| 60 |
+
<h3 class="font-medium text-gray-800">Gifts</h3>
|
| 61 |
+
</a>
|
| 62 |
+
</div>
|
| 63 |
+
</section>
|
| 64 |
+
|
| 65 |
+
<!-- Products Section -->
|
| 66 |
+
<section id="products" class="mb-12">
|
| 67 |
+
<div class="flex justify-between items-center mb-6">
|
| 68 |
+
<h2 class="text-2xl font-semibold text-gray-800">Featured Products</h2>
|
| 69 |
+
<div class="relative group">
|
| 70 |
+
<a href="#" class="text-blue-600 hover:text-blue-800 font-medium flex items-center">
|
| 71 |
+
View All Products
|
| 72 |
+
<i data-feather="chevron-right" class="ml-1 transition-transform duration-300 group-hover:translate-x-1"></i>
|
| 73 |
+
</a>
|
| 74 |
+
<div class="absolute bottom-0 left-0 w-full h-0.5 bg-blue-600 scale-x-0 group-hover:scale-x-100 transition-transform duration-300 origin-left"></div>
|
| 75 |
+
</div>
|
| 76 |
+
</div>
|
| 77 |
+
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
|
| 78 |
+
<!-- Product Card 1 -->
|
| 79 |
+
<div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-lg transition duration-300">
|
| 80 |
+
<div class="relative pb-3/4">
|
| 81 |
+
<img src="http://static.photos/office/640x360/1" alt="Product" class="w-full h-48 object-cover">
|
| 82 |
+
<div class="absolute top-2 right-2 bg-white rounded-full p-2 shadow-sm">
|
| 83 |
+
<i data-feather="heart" class="text-gray-400 hover:text-red-500 cursor-pointer"></i>
|
| 84 |
+
</div>
|
| 85 |
+
</div>
|
| 86 |
+
<div class="p-4">
|
| 87 |
+
<h3 class="font-medium text-gray-800 mb-1">Premium Office Chair</h3>
|
| 88 |
+
<div class="flex items-center mb-2">
|
| 89 |
+
<div class="flex text-yellow-400">
|
| 90 |
+
<i data-feather="star" class="w-4 h-4 fill-current"></i>
|
| 91 |
+
<i data-feather="star" class="w-4 h-4 fill-current"></i>
|
| 92 |
+
<i data-feather="star" class="w-4 h-4 fill-current"></i>
|
| 93 |
+
<i data-feather="star" class="w-4 h-4 fill-current"></i>
|
| 94 |
+
<i data-feather="star" class="w-4 h-4 fill-current text-gray-300"></i>
|
| 95 |
+
</div>
|
| 96 |
+
<span class="text-gray-500 text-sm ml-1">(24)</span>
|
| 97 |
+
</div>
|
| 98 |
+
<div class="flex justify-between items-center">
|
| 99 |
+
<span class="font-bold text-gray-800">$249.99</span>
|
| 100 |
+
<button class="bg-blue-600 hover:bg-blue-700 text-white rounded-full p-2">
|
| 101 |
+
<i data-feather="shopping-cart" class="w-4 h-4"></i>
|
| 102 |
+
</button>
|
| 103 |
+
</div>
|
| 104 |
+
</div>
|
| 105 |
+
</div>
|
| 106 |
+
|
| 107 |
+
<!-- Product Card 2 -->
|
| 108 |
+
<div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-lg transition duration-300">
|
| 109 |
+
<div class="relative pb-3/4">
|
| 110 |
+
<img src="http://static.photos/technology/640x360/2" alt="Product" class="w-full h-48 object-cover">
|
| 111 |
+
<div class="absolute top-2 right-2 bg-white rounded-full p-2 shadow-sm">
|
| 112 |
+
<i data-feather="heart" class="text-gray-400 hover:text-red-500 cursor-pointer"></i>
|
| 113 |
+
</div>
|
| 114 |
+
</div>
|
| 115 |
+
<div class="p-4">
|
| 116 |
+
<h3 class="font-medium text-gray-800 mb-1">Wireless Headphones</h3>
|
| 117 |
+
<div class="flex items-center mb-2">
|
| 118 |
+
<div class="flex text-yellow-400">
|
| 119 |
+
<i data-feather="star" class="w-4 h-4 fill-current"></i>
|
| 120 |
+
<i data-feather="star" class="w-4 h-4 fill-current"></i>
|
| 121 |
+
<i data-feather="star" class="w-4 h-4 fill-current"></i>
|
| 122 |
+
<i data-feather="star" class="w-4 h-4 fill-current"></i>
|
| 123 |
+
<i data-feather="star" class="w-4 h-4 fill-current"></i>
|
| 124 |
+
</div>
|
| 125 |
+
<span class="text-gray-500 text-sm ml-1">(56)</span>
|
| 126 |
+
</div>
|
| 127 |
+
<div class="flex justify-between items-center">
|
| 128 |
+
<span class="font-bold text-gray-800">$179.99</span>
|
| 129 |
+
<button class="bg-blue-600 hover:bg-blue-700 text-white rounded-full p-2">
|
| 130 |
+
<i data-feather="shopping-cart" class="w-4 h-4"></i>
|
| 131 |
+
</button>
|
| 132 |
+
</div>
|
| 133 |
+
</div>
|
| 134 |
+
</div>
|
| 135 |
+
|
| 136 |
+
<!-- Product Card 3 -->
|
| 137 |
+
<div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-lg transition duration-300">
|
| 138 |
+
<div class="relative pb-3/4">
|
| 139 |
+
<img src="http://static.photos/home/640x360/3" alt="Product" class="w-full h-48 object-cover">
|
| 140 |
+
<div class="absolute top-2 right-2 bg-white rounded-full p-2 shadow-sm">
|
| 141 |
+
<i data-feather="heart" class="text-gray-400 hover:text-red-500 cursor-pointer"></i>
|
| 142 |
+
</div>
|
| 143 |
+
</div>
|
| 144 |
+
<div class="p-4">
|
| 145 |
+
<h3 class="font-medium text-gray-800 mb-1">Modern Desk Lamp</h3>
|
| 146 |
+
<div class="flex items-center mb-2">
|
| 147 |
+
<div class="flex text-yellow-400">
|
| 148 |
+
<i data-feather="star" class="w-4 h-4 fill-current"></i>
|
| 149 |
+
<i data-feather="star" class="w-4 h-4 fill-current"></i>
|
| 150 |
+
<i data-feather="star" class="w-4 h-4 fill-current"></i>
|
| 151 |
+
<i data-feather="star" class="w-4 h-4 fill-current"></i>
|
| 152 |
+
<i data-feather="star" class="w-4 h-4 fill-current text-gray-300"></i>
|
| 153 |
+
</div>
|
| 154 |
+
<span class="text-gray-500 text-sm ml-1">(18)</span>
|
| 155 |
+
</div>
|
| 156 |
+
<div class="flex justify-between items-center">
|
| 157 |
+
<span class="font-bold text-gray-800">$89.99</span>
|
| 158 |
+
<button class="bg-blue-600 hover:bg-blue-700 text-white rounded-full p-2">
|
| 159 |
+
<i data-feather="shopping-cart" class="w-4 h-4"></i>
|
| 160 |
+
</button>
|
| 161 |
+
</div>
|
| 162 |
+
</div>
|
| 163 |
+
</div>
|
| 164 |
+
|
| 165 |
+
<!-- Product Card 4 -->
|
| 166 |
+
<div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-lg transition duration-300">
|
| 167 |
+
<div class="relative pb-3/4">
|
| 168 |
+
<img src="http://static.photos/workspace/640x360/4" alt="Product" class="w-full h-48 object-cover">
|
| 169 |
+
<div class="absolute top-2 right-2 bg-white rounded-full p-2 shadow-sm">
|
| 170 |
+
<i data-feather="heart" class="text-gray-400 hover:text-red-500 cursor-pointer"></i>
|
| 171 |
+
</div>
|
| 172 |
+
</div>
|
| 173 |
+
<div class="p-4">
|
| 174 |
+
<h3 class="font-medium text-gray-800 mb-1">Ergonomic Keyboard</h3>
|
| 175 |
+
<div class="flex items-center mb-2">
|
| 176 |
+
<div class="flex text-yellow-400">
|
| 177 |
+
<i data-feather="star" class="w-4 h-4 fill-current"></i>
|
| 178 |
+
<i data-feather="star" class="w-4 h-4 fill-current"></i>
|
| 179 |
+
<i data-feather="star" class="w-4 h-4 fill-current"></i>
|
| 180 |
+
<i data-feather="star" class="w-4 h-4 fill-current"></i>
|
| 181 |
+
<i data-feather="star" class="w-4 h-4 fill-current text-gray-300"></i>
|
| 182 |
+
</div>
|
| 183 |
+
<span class="text-gray-500 text-sm ml-1">(32)</span>
|
| 184 |
+
</div>
|
| 185 |
+
<div class="flex justify-between items-center">
|
| 186 |
+
<span class="font-bold text-gray-800">$129.99</span>
|
| 187 |
+
<button class="bg-blue-600 hover:bg-blue-700 text-white rounded-full p-2">
|
| 188 |
+
<i data-feather="shopping-cart" class="w-4 h-4"></i>
|
| 189 |
+
</button>
|
| 190 |
+
</div>
|
| 191 |
+
</div>
|
| 192 |
+
</div>
|
| 193 |
+
</div>
|
| 194 |
+
</section>
|
| 195 |
+
|
| 196 |
+
<!-- CTA Section -->
|
| 197 |
+
<section class="bg-blue-600 rounded-xl text-white p-8 md:p-12 mb-12">
|
| 198 |
+
<div class="max-w-3xl mx-auto text-center">
|
| 199 |
+
<h2 class="text-3xl font-bold mb-4">Get 15% Off Your First Order</h2>
|
| 200 |
+
<p class="text-lg mb-6">Sign up for our newsletter and receive an exclusive discount code right away.</p>
|
| 201 |
+
<form class="flex flex-col sm:flex-row gap-2 max-w-md mx-auto">
|
| 202 |
+
<input type="email" placeholder="Enter your email" class="flex-1 px-4 py-3 rounded-lg text-gray-800 focus:outline-none">
|
| 203 |
+
<button type="submit" class="bg-white text-blue-600 font-medium px-6 py-3 rounded-lg hover:bg-gray-100 transition duration-300">Subscribe</button>
|
| 204 |
+
</form>
|
| 205 |
+
</div>
|
| 206 |
+
</section>
|
| 207 |
+
</main>
|
| 208 |
+
|
| 209 |
+
<custom-footer></custom-footer>
|
| 210 |
+
|
| 211 |
+
<script>
|
| 212 |
+
feather.replace();
|
| 213 |
+
</script>
|
| 214 |
+
<script src="script.js"></script>
|
| 215 |
+
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 216 |
+
</body>
|
| 217 |
+
</html>
|
script.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Main JavaScript file for Cata Commerce Explorer
|
| 2 |
+
|
| 3 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 4 |
+
// Initialize any global functionality here
|
| 5 |
+
|
| 6 |
+
// Example: Add to cart functionality
|
| 7 |
+
const addToCartButtons = document.querySelectorAll('[data-add-to-cart]');
|
| 8 |
+
|
| 9 |
+
addToCartButtons.forEach(button => {
|
| 10 |
+
button.addEventListener('click', function() {
|
| 11 |
+
const productId = this.getAttribute('data-product-id');
|
| 12 |
+
// In a real app, you would add the product to cart here
|
| 13 |
+
console.log(`Added product ${productId} to cart`);
|
| 14 |
+
|
| 15 |
+
// Show a temporary notification
|
| 16 |
+
showToast('Product added to cart!');
|
| 17 |
+
});
|
| 18 |
+
});
|
| 19 |
+
|
| 20 |
+
// Newsletter form submission
|
| 21 |
+
const newsletterForm = document.querySelector('#newsletter-form');
|
| 22 |
+
if (newsletterForm) {
|
| 23 |
+
newsletterForm.addEventListener('submit', function(e) {
|
| 24 |
+
e.preventDefault();
|
| 25 |
+
const email = this.querySelector('input[type="email"]').value;
|
| 26 |
+
// In a real app, you would send this to your backend
|
| 27 |
+
console.log(`Subscribed email: ${email}`);
|
| 28 |
+
|
| 29 |
+
// Show a temporary notification
|
| 30 |
+
showToast('Thanks for subscribing! Check your email for the discount code.');
|
| 31 |
+
this.reset();
|
| 32 |
+
});
|
| 33 |
+
}
|
| 34 |
+
});
|
| 35 |
+
|
| 36 |
+
// Helper function to show toast notifications
|
| 37 |
+
function showToast(message) {
|
| 38 |
+
const toast = document.createElement('div');
|
| 39 |
+
toast.className = 'fixed bottom-4 right-4 bg-gray-800 text-white px-4 py-2 rounded-lg shadow-lg animate-fade-in';
|
| 40 |
+
toast.textContent = message;
|
| 41 |
+
document.body.appendChild(toast);
|
| 42 |
+
|
| 43 |
+
// Remove toast after 3 seconds
|
| 44 |
+
setTimeout(() => {
|
| 45 |
+
toast.classList.add('opacity-0', 'transition-opacity', 'duration-300');
|
| 46 |
+
setTimeout(() => toast.remove(), 300);
|
| 47 |
+
}, 3000);
|
| 48 |
+
}
|
style.css
CHANGED
|
@@ -1,28 +1,63 @@
|
|
|
|
|
| 1 |
body {
|
| 2 |
-
|
| 3 |
-
font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
|
| 4 |
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
margin-top: 5px;
|
| 16 |
}
|
| 17 |
|
| 18 |
-
.
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
}
|
| 25 |
|
| 26 |
-
.
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Custom styles that extend Tailwind */
|
| 2 |
body {
|
| 3 |
+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
|
|
|
| 4 |
}
|
| 5 |
|
| 6 |
+
/* Smooth scrolling */
|
| 7 |
+
html {
|
| 8 |
+
scroll-behavior: smooth;
|
| 9 |
}
|
| 10 |
|
| 11 |
+
/* Custom animations */
|
| 12 |
+
@keyframes fadeIn {
|
| 13 |
+
from { opacity: 0; }
|
| 14 |
+
to { opacity: 1; }
|
|
|
|
| 15 |
}
|
| 16 |
|
| 17 |
+
.animate-fade-in {
|
| 18 |
+
animation: fadeIn 0.5s ease-out;
|
| 19 |
+
}
|
| 20 |
+
/* Product card hover effect */
|
| 21 |
+
.product-card:hover {
|
| 22 |
+
transform: translateY(-5px);
|
| 23 |
+
transition: transform 0.3s ease;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
/* View All link animation */
|
| 27 |
+
.view-all-link {
|
| 28 |
+
position: relative;
|
| 29 |
+
display: inline-block;
|
| 30 |
}
|
| 31 |
|
| 32 |
+
.view-all-link::after {
|
| 33 |
+
content: '';
|
| 34 |
+
position: absolute;
|
| 35 |
+
bottom: -2px;
|
| 36 |
+
left: 0;
|
| 37 |
+
width: 0;
|
| 38 |
+
height: 2px;
|
| 39 |
+
background-color: #3b82f6;
|
| 40 |
+
transition: width 0.3s ease;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
.view-all-link:hover::after {
|
| 44 |
+
width: 100%;
|
| 45 |
+
}
|
| 46 |
+
/* Custom scrollbar */
|
| 47 |
+
::-webkit-scrollbar {
|
| 48 |
+
width: 8px;
|
| 49 |
+
height: 8px;
|
| 50 |
}
|
| 51 |
+
|
| 52 |
+
::-webkit-scrollbar-track {
|
| 53 |
+
background: #f1f1f1;
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
::-webkit-scrollbar-thumb {
|
| 57 |
+
background: #888;
|
| 58 |
+
border-radius: 4px;
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
::-webkit-scrollbar-thumb:hover {
|
| 62 |
+
background: #555;
|
| 63 |
+
}
|