35966-vm/index.php
Flatlogic Bot 26e710471c version_1
2025-11-22 13:52:53 +00:00

150 lines
6.7 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Price Comparator</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
<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=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="assets/css/custom.css">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm">
<div class="container">
<a class="navbar-brand fw-bold" href="#">Price<span class="text-primary">Wise</span></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ms-auto">
<li class="nav-item">
<a class="nav-link" href="#">Login</a>
</li>
<li class="nav-item">
<a class="btn btn-primary" href="#">Sign Up</a>
</li>
</ul>
</div>
</div>
</nav>
<header class="hero-section text-center py-5">
<div class="container">
<h1 class="display-4 fw-bold">Find the Best Deals</h1>
<p class="lead text-muted mb-4">Search for any product and compare prices from top e-commerce sites.</p>
<div class="row justify-content-center">
<div class="col-md-8">
<form class="d-flex">
<input class="form-control form-control-lg me-2" type="search" placeholder="Search for a product..." aria-label="Search">
<button class="btn btn-primary btn-lg" type="submit">
<i class="bi bi-search"></i>
</button>
</form>
</div>
</div>
</div>
</header>
<main class="container py-5">
<h2 class="mb-4">Popular Products</h2>
<div class="row g-4">
<?php
$products = [
[
'name' => 'Wireless Noise-Cancelling Headphones',
'image' => 'https://picsum.photos/seed/h/500/500',
'price' => 249.99,
'rating' => 4.5,
'store' => 'Amazon',
'store_link' => '#',
'discount' => 15
],
[
'name' => '4K Smart TV 55-inch',
'image' => 'https://picsum.photos/seed/tv/500/500',
'price' => 499.00,
'rating' => 4.8,
'store' => 'Walmart',
'store_link' => '#',
'discount' => null
],
[
'name' => 'Espresso Coffee Machine',
'image' => 'https://picsum.photos/seed/coffee/500/500',
'price' => 199.50,
'rating' => 4.7,
'store' => 'eBay',
'store_link' => '#',
'discount' => 20
],
[
'name' => 'Robotic Vacuum Cleaner',
'image' => 'https://picsum.photos/seed/vacuum/500/500',
'price' => 299.99,
'rating' => 4.6,
'store' => 'AliExpress',
'store_link' => '#',
'discount' => 10
],
[
'name' => 'Air Fryer Oven, 7-in-1',
'image' => 'https://picsum.photos/seed/airfryer/500/500',
'price' => 89.95,
'rating' => 4.9,
'store' => 'Amazon',
'store_link' => '#',
'discount' => null
],
[
'name' => 'Gaming Laptop, 15.6"',
'image' => 'https://picsum.photos/seed/laptop/500/500',
'price' => 1250.00,
'rating' => 4.7,
'store' => 'Flipkart',
'store_link' => '#',
'discount' => 5
]
];
foreach ($products as $product) {
?>
<div class="col-md-4">
<div class="card product-card h-100">
<?php if ($product['discount']): ?>
<span class="badge bg-success discount-badge">-<?php echo $product['discount']; ?>%</span>
<?php endif; ?>
<img src="<?php echo $product['image']; ?>" class="card-img-top" alt="<?php echo htmlspecialchars($product['name']); ?>">
<div class="card-body d-flex flex-column">
<h5 class="card-title"><?php echo htmlspecialchars($product['name']); ?></h5>
<div class="d-flex justify-content-between align-items-center mb-2">
<p class="card-text fs-4 fw-bold text-primary mb-0">$<?php echo number_format($product['price'], 2); ?></p>
<div class="d-flex align-items-center">
<i class="bi bi-star-fill text-warning me-1"></i>
<span><?php echo $product['rating']; ?></span>
</div>
</div>
<p class="text-muted mb-3">Available at: <span class="fw-bold"><?php echo $product['store']; ?></span></p>
<a href="<?php echo $product['store_link']; ?>" class="btn btn-outline-primary mt-auto">Go to Store</a>
</div>
</div>
</div>
<?php
}
?>
</div>
</main>
<footer class="bg-light text-center py-4 mt-5">
<div class="container">
<p class="mb-0 text-muted">&copy; <?php echo date("Y"); ?> PriceWise. All rights reserved.</p>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/main.js"></script>
</body>
</html>