60 lines
2.1 KiB
PHP
60 lines
2.1 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
@date_default_timezone_set('UTC');
|
|
|
|
require_once __DIR__ . '/../includes/data.php';
|
|
|
|
$lang = 'zh';
|
|
$site = site_config($lang);
|
|
$pageTitle = $site['brand'] . ' | 产品中心';
|
|
$pageDescription = '查看工业照明产品系列与应用场景。';
|
|
$assetVersion = (string) time();
|
|
$navItems = $site['nav'];
|
|
$langSwitchUrl = '/products.php';
|
|
|
|
$products = get_products($lang);
|
|
?>
|
|
<?php require __DIR__ . '/../includes/header.php'; ?>
|
|
|
|
<main>
|
|
<section class="page-hero">
|
|
<div class="container">
|
|
<div class="hero-panel">
|
|
<div class="row align-items-center g-4">
|
|
<div class="col-lg-7">
|
|
<h1 class="display-6 fw-semibold">工业照明产品矩阵</h1>
|
|
<p class="text-muted">按行业场景配置高棚灯、投光灯、三防灯与道路照明解决方案。</p>
|
|
</div>
|
|
<div class="col-lg-5 text-lg-end">
|
|
<span class="badge badge-soft"><?= count($products) ?> 个分类</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="section-block pt-0">
|
|
<div class="container">
|
|
<div class="row g-4">
|
|
<?php foreach ($products as $product): ?>
|
|
<div class="col-md-6 col-lg-4">
|
|
<article class="card h-100 product-card">
|
|
<div class="card-body">
|
|
<img class="product-icon" src="<?= htmlspecialchars($product['image']) ?>" alt="<?= htmlspecialchars($product['name']) ?>" width="64" height="64" />
|
|
<h2 class="h5"><?= htmlspecialchars($product['name']) ?></h2>
|
|
<p class="text-muted small"><?= htmlspecialchars($product['summary']) ?></p>
|
|
<div class="d-flex gap-2 mt-3">
|
|
<a class="btn btn-sm btn-primary" href="/zh/product.php?id=<?= urlencode((string) $product['id']) ?>">查看详情</a>
|
|
<a class="btn btn-sm btn-outline-secondary" href="/zh/contact.php">索取报价</a>
|
|
</div>
|
|
</div>
|
|
</article>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
|
|
<?php require __DIR__ . '/../includes/footer.php'; ?>
|