-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcatalog.php
More file actions
232 lines (211 loc) · 10.7 KB
/
catalog.php
File metadata and controls
232 lines (211 loc) · 10.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<?php
// catalog.php - Public Diamond Catalog
require_once 'config.php';
// Fetch all available diamonds
$diamonds_query = "SELECT id, stock_no, shape, size, color, clarity, cut, polish, symmetry, status
FROM diamonds
WHERE status = 'Available'
ORDER BY id DESC";
$diamonds_result = $conn->query($diamonds_query);
$diamonds = [];
if ($diamonds_result && $diamonds_result->num_rows > 0) {
while ($row = $diamonds_result->fetch_assoc()) {
$diamonds[] = $row;
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Diamond Catalog - DS Diamonds</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=Cormorant+Garamond:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" />
<script src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js" defer></script>
<style>
:root {
--primary: #7b2ff7;
--secondary: #f83077;
}
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.heading-font {
font-family: 'Cormorant Garamond', Georgia, serif;
letter-spacing: -0.02em;
font-weight: 600;
}
.brand-font {
font-family: 'Sora', sans-serif;
letter-spacing: -0.02em;
}
.gradient-text {
background: linear-gradient(135deg, #b185ff 0%, #7b2ff7 50%, #f83077 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
font-weight: 700;
}
.btn-gradient {
background: linear-gradient(135deg, #7b2ff7 0%, #b643f5 50%, #f83077 100%);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 4px 15px rgba(123, 47, 247, 0.2);
font-family: 'Sora', sans-serif;
font-weight: 600;
}
.btn-gradient:hover {
transform: translateY(-2px);
box-shadow: 0 12px 30px rgba(123, 47, 247, 0.4);
}
.stat-number {
font-family: 'Sora', sans-serif;
font-weight: 800;
}
</style>
</head>
<body class="bg-gray-50">
<!-- Navigation -->
<nav class="fixed w-full top-0 z-50 bg-white/90 backdrop-blur-md border-b border-gray-200">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between items-center h-16">
<!-- Logo -->
<a href="landing.php" class="flex items-center">
<i class="far fa-gem text-3xl gradient-text mr-3"></i>
<span class="text-2xl font-bold brand-font tracking-tight">DS<span
class="gradient-text">Diamonds</span></span>
</a>
<!-- Desktop Navigation -->
<div class="hidden md:flex items-center space-x-8">
<a href="landing.php" class="text-gray-700 hover:text-purple-600 font-medium transition">Home</a>
<a href="catalog.php" class="text-purple-600 font-semibold">Catalog</a>
<a href="landing.php#contact"
class="text-gray-700 hover:text-purple-600 font-medium transition">Contact</a>
<a href="index.php" class="btn-gradient text-white px-6 py-2 rounded-full font-semibold">
Client Sign In
</a>
</div>
</div>
</div>
</nav>
<!-- Header -->
<section class="pt-24 pb-12 bg-gradient-to-br from-purple-900 via-purple-800 to-pink-800 text-white">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center">
<h1 class="heading-font text-5xl md:text-6xl mb-4">Our Diamond Collection</h1>
<p class="text-xl text-purple-100 max-w-2xl mx-auto">
Browse our complete catalog of certified diamonds. <?php echo count($diamonds); ?> premium diamonds
available.
</p>
</div>
</section>
<!-- Catalog -->
<section class="py-12">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<?php if (count($diamonds) > 0): ?>
<!-- Diamonds Grid -->
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
<?php foreach ($diamonds as $diamond):
$image_num = (($diamond['id'] - 1) % 5) + 1;
$diamond_image = "assets/images/diamonds/diamond-{$image_num}.jpg";
?>
<div
class="bg-white rounded-xl shadow-md overflow-hidden hover:shadow-2xl transition-all duration-300 hover:-translate-y-1">
<!-- Diamond Image -->
<div class="h-56 overflow-hidden bg-gradient-to-br from-purple-100 to-pink-100">
<img src="<?php echo $diamond_image; ?>"
alt="Diamond <?php echo htmlspecialchars($diamond['stock_no']); ?>"
class="w-full h-full object-cover">
</div>
<!-- Diamond Info -->
<div class="p-5">
<div class="flex items-center justify-between mb-3">
<div class="text-xs text-gray-500 uppercase tracking-wider font-medium">
<?php echo htmlspecialchars($diamond['shape']); ?>
</div>
<span class="bg-green-100 text-green-700 text-xs px-2 py-1 rounded-full font-semibold">
Available
</span>
</div>
<div class="text-3xl font-bold stat-number mb-3">
<?php echo htmlspecialchars($diamond['size']); ?> <span class="text-lg">ct</span>
</div>
<div class="space-y-2 mb-4">
<div class="flex justify-between text-sm">
<span class="text-gray-500">Color:</span>
<span
class="font-semibold text-gray-800"><?php echo htmlspecialchars($diamond['color']); ?></span>
</div>
<div class="flex justify-between text-sm">
<span class="text-gray-500">Clarity:</span>
<span
class="font-semibold text-gray-800"><?php echo htmlspecialchars($diamond['clarity']); ?></span>
</div>
<div class="flex justify-between text-sm">
<span class="text-gray-500">Cut:</span>
<span
class="font-semibold text-gray-800"><?php echo htmlspecialchars($diamond['cut']); ?></span>
</div>
</div>
<div class="pt-3 border-t border-gray-100">
<div class="text-xs text-gray-500 mb-1">Stock Number</div>
<div class="font-mono text-sm font-semibold text-purple-600">
<?php echo htmlspecialchars($diamond['stock_no']); ?>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
<?php else: ?>
<!-- Empty State -->
<div class="bg-white rounded-xl shadow-md p-12 text-center">
<i class="far fa-gem text-6xl text-gray-300 mb-4"></i>
<h2 class="text-2xl font-bold text-gray-800 mb-2">No Diamonds Available</h2>
<p class="text-gray-600">Check back soon for new additions to our collection.</p>
</div>
<?php endif; ?>
</div>
</section>
<!-- CTA Section -->
<section class="py-16 bg-gradient-to-r from-purple-600 to-pink-600 text-white">
<div class="max-w-4xl mx-auto px-4 text-center">
<h2 class="heading-font text-4xl mb-4">Interested in These Diamonds?</h2>
<p class="text-xl mb-8 text-purple-100">
Sign in to your client portal to create custom invite links for your customers, or contact us to become
a reseller.
</p>
<div class="flex justify-center gap-4">
<a href="index.php"
class="bg-white text-purple-600 px-8 py-4 rounded-full font-bold hover:shadow-2xl transition">
<i class="fas fa-sign-in-alt mr-2"></i>Client Portal
</a>
<a href="landing.php#contact"
class="bg-white/10 backdrop-blur text-white border-2 border-white px-8 py-4 rounded-full font-bold hover:bg-white/20 transition">
<i class="fas fa-envelope mr-2"></i>Contact Us
</a>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-gray-900 text-gray-300 py-12">
<div class="max-w-7xl mx-auto px-4 text-center">
<div class="flex items-center justify-center mb-4">
<i class="far fa-gem text-2xl gradient-text mr-2"></i>
<span class="text-xl font-bold brand-font">DS<span class="gradient-text">Diamonds</span></span>
</div>
<p class="text-sm mb-4">© 2025 DS Diamonds. All rights reserved.</p>
<p class="text-xs text-gray-500">
<i class="fas fa-info-circle mr-1"></i>
All transactions conducted in person. No online payments.
</p>
</div>
</footer>
</body>
</html>