Update index.html
Browse files- index.html +35 -36
index.html
CHANGED
@@ -3,53 +3,52 @@
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
-
<title>Shop</title>
|
7 |
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
|
9 |
<style>
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
</style>
|
12 |
</head>
|
13 |
<body class="bg-black text-white">
|
14 |
-
<div class="h-screen flex flex-col items-center justify-center">
|
15 |
-
<div class="mb-4">
|
16 |
-
<i class="fas fa-chevron-left"></i>
|
17 |
-
<span class="text-gray-400">Shop</span>
|
18 |
-
<span class="float-right text-blue-400">144</span>
|
19 |
-
</div>
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
<
|
26 |
-
<div class="grid grid-cols-2 gap-4">
|
27 |
-
<!-- Placeholder images with detailed descriptions -->
|
28 |
-
<img src="https://placehold.co/100x100" alt="Placeholder image description">
|
29 |
-
<!-- Repeat for each image -->
|
30 |
-
</div>
|
31 |
-
<div class="text-yellow-500">KRW 4,400</div>
|
32 |
-
<button class="bg-purple-700 text-white px-4 py-2 rounded">Objekt 구매하기</button>
|
33 |
</div>
|
34 |
-
|
35 |
-
|
36 |
-
|
|
|
|
|
37 |
</div>
|
38 |
</div>
|
39 |
|
40 |
-
<
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
-
|
48 |
-
|
49 |
-
}
|
50 |
|
51 |
-
card.style.transform = `scale(${scale})`;
|
52 |
-
});
|
53 |
-
</script>
|
54 |
</body>
|
55 |
-
</html>
|
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Shop Carousel</title>
|
7 |
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
|
9 |
<style>
|
10 |
+
.carousel-card {
|
11 |
+
transition: transform 0.5s ease;
|
12 |
+
}
|
13 |
+
.carousel-card.active {
|
14 |
+
transform: scale(1);
|
15 |
+
}
|
16 |
+
.carousel-card.inactive {
|
17 |
+
transform: scale(0.75);
|
18 |
+
}
|
19 |
</style>
|
20 |
</head>
|
21 |
<body class="bg-black text-white">
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
+
<div class="flex flex-col items-center justify-center h-screen">
|
24 |
+
<div id="carousel" class="flex justify-center gap-4">
|
25 |
+
<!-- Placeholder for carousel cards -->
|
26 |
+
<div class="carousel-card inactive">
|
27 |
+
<img src="https://placehold.co/200x300" alt="Placeholder image representing a smaller inactive card in the carousel">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
</div>
|
29 |
+
<div class="carousel-card active">
|
30 |
+
<img src="https://placehold.co/200x300" alt="Placeholder image representing the active card in the carousel">
|
31 |
+
</div>
|
32 |
+
<div class="carousel-card inactive">
|
33 |
+
<img src="https://placehold.co/200x300" alt="Placeholder image representing a smaller inactive card in the carousel">
|
34 |
</div>
|
35 |
</div>
|
36 |
|
37 |
+
<button class="mt-8 py-2 px-4 bg-purple-600 rounded">Objekt 구매하기</button>
|
38 |
+
</div>
|
39 |
+
|
40 |
+
<script>
|
41 |
+
const cards = document.querySelectorAll('.carousel-card');
|
42 |
+
let currentIndex = 1; // Start from the second card (index 1)
|
43 |
+
|
44 |
+
function rotateCarousel() {
|
45 |
+
cards.forEach(card => card.classList.replace('active', 'inactive'));
|
46 |
+
cards[currentIndex].classList.replace('inactive', 'active');
|
47 |
+
currentIndex = (currentIndex + 1) % cards.length;
|
48 |
+
}
|
49 |
|
50 |
+
setInterval(rotateCarousel, 2000); // Rotate every 2 seconds
|
51 |
+
</script>
|
|
|
52 |
|
|
|
|
|
|
|
53 |
</body>
|
54 |
+
</html>
|