-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
391 lines (361 loc) · 16.1 KB
/
Copy pathindex.php
File metadata and controls
391 lines (361 loc) · 16.1 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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
<?php
session_start(); // MUST be the first line to access user session data
include 'DBConn.php';
// Fetch general product data for any other sections if needed
$sql_all = "SELECT * FROM products LIMIT 8";
$result_all = mysqli_query($conn, $sql_all);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pastimes® | Midrand - Oversized. Authentically SA.</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
<style>
:root {
--primary-blue: #0678eb;
--dark-bg: #030712;
}
body { font-family: 'Inter', sans-serif; overflow-x: hidden; background-color: #fff; }
/* --- NAVIGATION --- */
.navbar { background: #fff; border-bottom: 1px solid #eee; padding: 15px 0; }
.navbar-brand { font-weight: 800; font-size: 24px; color: #000 !important; letter-spacing: 1px; }
.nav-link { color: #111 !important; font-weight: 600; font-size: 14px; margin: 0 12px; text-transform: uppercase; }
.nav-link.active { color: var(--primary-blue) !important; }
.btn-signup {
background: #0678eb;
color: #fff !important;
padding: 8px 22px;
border-radius: 0px;
font-weight: 600;
text-transform: uppercase;
font-size: 12px;
border: 1px solid #0678eb;
transition: all 0.3s ease;
}
.btn-signup:hover {
background: #000 !important;
color: #fff !important;
border-color: #000;
}
/* Logout Link Style */
.logout-link {
font-size: 11px;
text-transform: uppercase;
font-weight: 700;
color: #ff4d4d !important;
text-decoration: none;
}
/* Seller Request Nav Link Style */
.seller-nav-link {
font-size: 11px;
text-transform: uppercase;
font-weight: 700;
color: var(--primary-blue) !important;
text-decoration: none;
border: 1px solid var(--primary-blue);
padding: 6px 12px;
transition: all 0.2s ease;
}
.seller-nav-link:hover {
background: var(--primary-blue);
color: #fff !important;
}
/* Hero and other styles */
.hero {
background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1552346154-21d32810aba3?q=80&w=2070');
height: 80vh; background-size: cover; background-position: center; display: flex; align-items: center; color: white; text-align: center;
}
.hero h1 { font-size: 3.5rem; font-weight: 900; text-transform: uppercase; letter-spacing: 2px; }
.hero p { font-size: 1.2rem; color: #ccc; max-width: 700px; margin: 20px auto; }
.btn-main { background-color: var(--primary-blue); color: white; padding: 12px 30px; font-weight: 700; text-decoration: none; text-transform: uppercase; font-size: 13px; display: inline-block; border: none; transition: 0.3s ease; }
.btn-outline-white { border: 1px solid white; color: white; padding: 12px 30px; font-weight: 700; text-decoration: none; text-transform: uppercase; font-size: 13px; }
.cat-card img { height: 300px; object-fit: cover; transition: 0.3s; }
.cat-card h5 { font-size: 14px; font-weight: 800; text-transform: uppercase; margin-top: 15px; letter-spacing: 1px; }
.product-card { transition: 0.3s; border: none !important; }
.product-card:hover { transform: translateY(-5px); }
.product-card img { height: 400px; object-fit: cover; }
/* --- EXTRA-MINIMALIST FOOTER STYLES --- */
footer {
background-color: #03060d;
padding: 70px 0 30px 0;
color: #fff;
font-family: 'Inter', sans-serif;
}
footer h4 {
font-size: 26px;
font-weight: 800;
letter-spacing: 1.5px;
color: #ffffff;
margin-bottom: 20px;
}
footer h6 {
font-size: 12px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 2px;
color: #2563eb;
margin-bottom: 25px;
}
.footer-brand-text {
font-size: 14px;
color: #9ca3af;
line-height: 1.7;
max-width: 380px;
}
.footer-links {
list-style: none;
padding: 0;
margin: 0;
}
.footer-links li {
margin-bottom: 14px;
}
.footer-links a {
color: #9ca3af;
text-decoration: none;
font-size: 14px;
font-weight: 500;
transition: color 0.2s ease;
}
.footer-links a:hover {
color: #ffffff;
}
.footer-contact-text {
font-size: 14px;
color: #9ca3af;
line-height: 1.6;
margin-bottom: 12px;
}
.footer-contact-text a {
color: #9ca3af;
text-decoration: none;
transition: color 0.2s ease;
}
.footer-contact-text a:hover {
color: #ffffff;
}
.footer-social-box {
display: inline-block;
width: 36px;
height: 36px;
line-height: 36px;
background-color: #111827;
color: #9ca3af;
text-align: center;
font-size: 13px;
font-weight: 600;
border-radius: 4px;
margin-right: 8px;
text-decoration: none;
transition: all 0.2s ease;
}
.footer-social-box:hover {
background-color: #2563eb;
color: #ffffff;
}
.footer-bottom-border {
border-top: 1px solid #1f2937;
margin-top: 60px;
padding-top: 25px;
}
.footer-bottom-text {
font-size: 13px;
color: #4b5563;
}
.footer-bottom-links a {
color: #9ca3af;
text-decoration: none;
font-size: 13px;
margin-left: 20px;
transition: color 0.2s ease;
}
.footer-bottom-links a:hover {
color: #ffffff;
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-lg sticky-top">
<div class="container">
<a class="navbar-brand" href="index.php">
Pastimes<i class="fa-solid fa-registered" style="font-size: 10px; vertical-align: top;"></i>
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav mx-auto">
<li class="nav-item"><a class="nav-link" href="index.php">Home</a></li>
<li class="nav-item"><a class="nav-link active" href="listings.php">Shop</a></li>
<li class="nav-item"><a class="nav-link" href="about.php">About</a></li>
<li class="nav-item"><a class="nav-link" href="catalogue.php">Gallery</a></li>
<li class="nav-item"><a class="nav-link" href="contact.php">Contact</a></li>
</ul>
<div class="d-flex align-items-center gap-3">
<a href="cart.php" class="text-dark position-relative me-2">
<i class="fa-solid fa-bag-shopping fs-5"></i>
<?php if(isset($_SESSION['cart']) && count($_SESSION['cart']) > 0): ?>
<span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger" style="font-size: 10px;">
<?php echo count($_SESSION['cart']); ?>
</span>
<?php endif; ?>
</a>
<?php if(isset($_SESSION['user_id'])): ?>
<span class="small fw-bold text-uppercase" style="font-size: 11px;">
Hi, <?php echo explode(' ', $_SESSION['full_name'])[0]; ?>
</span>
<a href="seller_dashboard.php" class="seller-nav-link"><i class="fa-solid fa-tags me-1"></i> Sell Clothes</a>
<a href="logout.php" class="logout-link">Logout</a>
<?php else: ?>
<a href="authenticate.php" class="text-dark text-decoration-none small fw-bold text-uppercase">Sign In</a>
<a href="sign-up.php" class="btn btn-signup">Sign Up</a>
<?php endif; ?>
</div>
</div>
</div>
</nav>
<section class="hero">
<div class="container">
<h1>Designed for Volume.</h1>
<p>Premium oversized essentials, ethically crafted in the heart of Midrand.</p>
<div class="d-flex gap-3 justify-content-center flex-wrap">
<a href="listings.php" class="btn-main">Shop Now</a>
<a href="catalogue.php" class="btn-outline-white">Lookbook</a>
</div>
</div>
</section>
<section class="container my-5 py-5">
<h3 class="text-center fw-bold mb-5" style="text-transform: uppercase; letter-spacing: 2px;">Shop by Category</h3>
<div class="row g-4 text-center">
<div class="col-6 col-md-3">
<a href="listings.php?cat=T-Shirts" class="text-decoration-none text-dark">
<div class="cat-card">
<img src="https://images.unsplash.com/photo-1521572163474-6864f9cf17ab?q=80&w=500" class="w-100" alt="Tees">
<h5>T-Shirts</h5>
</div>
</a>
</div>
<div class="col-6 col-md-3">
<a href="listings.php?cat=Hoodies" class="text-decoration-none text-dark">
<div class="cat-card">
<img src="https://images.unsplash.com/photo-1556821840-3a63f95609a7?q=80&w=500" class="w-100" alt="Hoodies">
<h5>Hoodies</h5>
</div>
</a>
</div>
<div class="col-6 col-md-3">
<a href="listings.php?cat=Bottoms" class="text-decoration-none text-dark">
<div class="cat-card">
<img src="https://images.unsplash.com/photo-1594633312681-425c7b97ccd1?q=80&w=500" class="w-100" alt="Bottoms">
<h5>Bottoms</h5>
</div>
</a>
</div>
<div class="col-6 col-md-3">
<a href="listings.php?cat=Outerwear" class="text-decoration-none text-dark">
<div class="cat-card">
<img src="https://images.unsplash.com/photo-1591047139829-d91aecb6caea?q=80&w=500" class="w-100" alt="Jackets">
<h5>Outerwear</h5>
</div>
</a>
</div>
</div>
</section>
<section class="container my-5">
<div class="d-flex justify-content-between align-items-center mb-4">
<h2 class="fw-bold" style="text-transform: uppercase; font-size: 1.5rem;">Bestsellers</h2>
<a href="listings.php" class="text-dark text-decoration-none small fw-bold">VIEW ALL →</a>
</div>
<div class="row g-4">
<?php
$sql_best = "SELECT * FROM products WHERE is_bestseller = 1 LIMIT 3";
$result_best = mysqli_query($conn, $sql_best);
if ($result_best && mysqli_num_rows($result_best) > 0):
while ($row = mysqli_fetch_assoc($result_best)): ?>
<div class="col-12 col-md-4">
<div class="card product-card h-100 shadow-sm">
<?php if (!empty($row['badge_text'])): ?>
<span class="badge bg-dark position-absolute m-3" style="border-radius:0; z-index: 1;">
<?php echo htmlspecialchars($row['badge_text']); ?>
</span>
<?php endif; ?>
<img src="<?php echo htmlspecialchars($row['image_path']); ?>"
class="card-img-top"
alt="Product"
onerror="this.src='https://via.placeholder.com/500x700?text=Pastimes+Studio'">
<div class="card-body">
<h5 class="card-title fw-bold" style="font-size: 1rem; text-transform: uppercase;">
<?php echo htmlspecialchars($row['product_name']); ?>
</h5>
<p class="text-primary fw-bold mb-3">R <?php echo number_format($row['price'], 2); ?></p>
<a href="product_details.php?id=<?php echo $row['id']; ?>" class="btn-main w-100 text-center">
View Piece
</a>
</div>
</div>
</div>
<?php endwhile;
else: ?>
<div class="col-12 text-center py-5">
<p class="text-muted">The bestsellers vault is currently empty. Check back soon!</p>
</div>
<?php endif; ?>
</div>
</section>
<footer>
<div class="container">
<div class="row g-4">
<div class="col-12 col-md-5">
<h4>PASTIMES</h4>
<p class="footer-brand-text mb-4">
Leading streetwear collective dedicated to building high-performance curated garments. We transform everyday oversized essentials into premium authentic statements.
</p>
<div class="mb-2">
<a href="#" class="footer-social-box">In</a>
<a href="#" class="footer-social-box">Gh</a>
<a href="#" class="footer-social-box">WA</a>
<a href="#" class="footer-social-box">IG</a>
</div>
</div>
<div class="col-6 col-md-3 offset-md-1">
<h6>Company</h6>
<ul class="footer-links">
<li><a href="index.php">Home</a></li>
<li><a href="listings.php">Gallery</a></li>
<li><a href="about.php">ABOUT</a></li>
<li><a href="contact.php">Get in Touch</a></li>
</ul>
</div>
<div class="col-6 col-md-3">
<h6>Contact</h6>
<p class="footer-contact-text">
Midrand, Gauteng<br>South Africa
</p>
<p class="footer-contact-text">
<a href="mailto:hello@pastimes.co.za">hello@pastimes.co.za</a>
</p>
<p class="footer-contact-text fw-bold text-white">
+27 79 409 0890
</p>
</div>
</div>
<div class="row footer-bottom-border align-items-center">
<div class="col-12 col-md-6 text-center text-md-start mb-3 mb-md-0">
<span class="footer-bottom-text">
© 2026 Pastimes Solutions. All rights reserved.
</span>
</div>
<div class="col-12 col-md-6 text-center text-md-end footer-bottom-links">
<a href="admin_login.php">Admin</a>
<a href="privacy.php">Privacy Policy</a>
<a href="terms.php">Terms of Service</a>
</div>
</div>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>