增加产品模块
This commit is contained in:
@@ -1925,6 +1925,7 @@ section,
|
||||
font-weight: 700;
|
||||
padding: 0;
|
||||
margin: 0 0 20px 0;
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
.blog-posts .title a {
|
||||
|
||||
@@ -37,9 +37,9 @@ require_once __DIR__ . '/header.php';
|
||||
|
||||
<div class="meta-top">
|
||||
<ul>
|
||||
<li class="d-flex align-items-center"><i class="bi bi-person"></i> <a href="<?php echo $baseUrl; ?>/blog-details.php">John Doe</a></li>
|
||||
<li class="d-flex align-items-center"><i class="bi bi-clock"></i> <a href="<?php echo $baseUrl; ?>/blog-details.php"><time datetime="2020-01-01">Jan 1, 2022</time></a></li>
|
||||
<li class="d-flex align-items-center"><i class="bi bi-chat-dots"></i> <a href="<?php echo $baseUrl; ?>/blog-details.php">12 Comments</a></li>
|
||||
<li class="d-flex align-items-center"><i class="bi bi-person"></i> <a href="<?php echo $baseUrl; ?>/blog-details">John Doe</a></li>
|
||||
<li class="d-flex align-items-center"><i class="bi bi-clock"></i> <a href="<?php echo $baseUrl; ?>/blog-details"><time datetime="2020-01-01">Jan 1, 2022</time></a></li>
|
||||
<li class="d-flex align-items-center"><i class="bi bi-chat-dots"></i> <a href="<?php echo $baseUrl; ?>/blog-details">12 Comments</a></li>
|
||||
</ul>
|
||||
</div><!-- End meta top -->
|
||||
|
||||
@@ -301,7 +301,7 @@ require_once __DIR__ . '/header.php';
|
||||
<div class="post-item">
|
||||
<img src="<?php echo $baseUrl; ?>/themes/template3/assets/img/blog/blog-recent-1.jpg" alt="" class="flex-shrink-0">
|
||||
<div>
|
||||
<h4><a href="<?php echo $baseUrl; ?>/blog-details.php">Nihil blanditiis at in nihil autem</a></h4>
|
||||
<h4><a href="<?php echo $baseUrl; ?>/blog-details">Nihil blanditiis at in nihil autem</a></h4>
|
||||
<time datetime="2020-01-01">Jan 1, 2020</time>
|
||||
</div>
|
||||
</div><!-- End recent post item-->
|
||||
@@ -309,7 +309,7 @@ require_once __DIR__ . '/header.php';
|
||||
<div class="post-item">
|
||||
<img src="<?php echo $baseUrl; ?>/themes/template3/assets/img/blog/blog-recent-2.jpg" alt="" class="flex-shrink-0">
|
||||
<div>
|
||||
<h4><a href="<?php echo $baseUrl; ?>/blog-details.php">Quidem autem et impedit</a></h4>
|
||||
<h4><a href="<?php echo $baseUrl; ?>/blog-details">Quidem autem et impedit</a></h4>
|
||||
<time datetime="2020-01-01">Jan 1, 2020</time>
|
||||
</div>
|
||||
</div><!-- End recent post item-->
|
||||
@@ -317,7 +317,7 @@ require_once __DIR__ . '/header.php';
|
||||
<div class="post-item">
|
||||
<img src="<?php echo $baseUrl; ?>/themes/template3/assets/img/blog/blog-recent-3.jpg" alt="" class="flex-shrink-0">
|
||||
<div>
|
||||
<h4><a href="<?php echo $baseUrl; ?>/blog-details.php">Id quia et et ut maxime similique occaecati ut</a></h4>
|
||||
<h4><a href="<?php echo $baseUrl; ?>/blog-details">Id quia et et ut maxime similique occaecati ut</a></h4>
|
||||
<time datetime="2020-01-01">Jan 1, 2020</time>
|
||||
</div>
|
||||
</div><!-- End recent post item-->
|
||||
@@ -325,7 +325,7 @@ require_once __DIR__ . '/header.php';
|
||||
<div class="post-item">
|
||||
<img src="<?php echo $baseUrl; ?>/themes/template3/assets/img/blog/blog-recent-4.jpg" alt="" class="flex-shrink-0">
|
||||
<div>
|
||||
<h4><a href="<?php echo $baseUrl; ?>/blog-details.php">Laborum corporis quo dara net para</a></h4>
|
||||
<h4><a href="<?php echo $baseUrl; ?>/blog-details">Laborum corporis quo dara net para</a></h4>
|
||||
<time datetime="2020-01-01">Jan 1, 2020</time>
|
||||
</div>
|
||||
</div><!-- End recent post item-->
|
||||
@@ -333,7 +333,7 @@ require_once __DIR__ . '/header.php';
|
||||
<div class="post-item">
|
||||
<img src="<?php echo $baseUrl; ?>/themes/template3/assets/img/blog/blog-recent-5.jpg" alt="" class="flex-shrink-0">
|
||||
<div>
|
||||
<h4><a href="<?php echo $baseUrl; ?>/blog-details.php">Et dolores corrupti quae illo quod dolor</a></h4>
|
||||
<h4><a href="<?php echo $baseUrl; ?>/blog-details">Et dolores corrupti quae illo quod dolor</a></h4>
|
||||
<time datetime="2020-01-01">Jan 1, 2020</time>
|
||||
</div>
|
||||
</div><!-- End recent post item-->
|
||||
|
||||
@@ -3,6 +3,28 @@ $pageTitle = '新闻中心 - Nova';
|
||||
$pageDescription = 'Nova Bootstrap Template 的新闻中心页面';
|
||||
$pageKeywords = 'blog, news, nova';
|
||||
require_once __DIR__ . '/header.php';
|
||||
?>
|
||||
<?php
|
||||
// 本页使用本地分页:根据 query 参数 ?page=n 只展示 newsList 的切片
|
||||
$allNewsList = is_array($newsList ?? null) ? $newsList : [];
|
||||
|
||||
$currentPage = (int)($_GET['page'] ?? 1);
|
||||
if ($currentPage < 1) {
|
||||
$currentPage = 1;
|
||||
}
|
||||
|
||||
$pageSize = 4; // 每页展示 4 条(grid 中每条占 col-lg-6,所以刚好两行)
|
||||
$totalCount = count($allNewsList);
|
||||
$totalPages = (int)ceil($totalCount / $pageSize);
|
||||
if ($totalPages < 1) {
|
||||
$totalPages = 1;
|
||||
}
|
||||
|
||||
if ($currentPage > $totalPages) {
|
||||
$currentPage = $totalPages;
|
||||
}
|
||||
|
||||
$newsListForPage = array_slice($allNewsList, ($currentPage - 1) * $pageSize, $pageSize);
|
||||
?>
|
||||
|
||||
<!-- Page Title -->
|
||||
@@ -28,162 +50,68 @@ require_once __DIR__ . '/header.php';
|
||||
|
||||
<div class="container">
|
||||
<div class="row gy-4">
|
||||
<?php if (!empty($newsList)): ?>
|
||||
<?php foreach ($newsListForPage as $i => $item): ?>
|
||||
<?php
|
||||
$title = $item['title'] ?? '无标题';
|
||||
$author = $item['author'] ?? '';
|
||||
$category = $item['category'] ?? ($item['category_name'] ?? '');
|
||||
|
||||
<div class="col-lg-6">
|
||||
<article>
|
||||
$publishDateRaw = $item['publish_date'] ?? '';
|
||||
$postDate = !empty($publishDateRaw) ? date('Y年m月d日', strtotime($publishDateRaw)) : '';
|
||||
|
||||
<div class="post-img">
|
||||
<img src="<?php echo $baseUrl; ?>/themes/template3/assets/img/blog/blog-1.jpg" alt="" class="img-fluid">
|
||||
</div>
|
||||
$thumbUrl = $item['thumb'] ?? ($item['image'] ?? '');
|
||||
if (!empty($thumbUrl)) {
|
||||
if (strpos($thumbUrl, 'http') === 0) {
|
||||
$imgSrc = $thumbUrl;
|
||||
} elseif (strpos($thumbUrl, '/') === 0) {
|
||||
$imgSrc = $apiUrl . $thumbUrl;
|
||||
} else {
|
||||
$imgSrc = $apiUrl . '/' . $thumbUrl;
|
||||
}
|
||||
} else {
|
||||
$imgIndex = ($i % 6) + 1; // blog-1.jpg ~ blog-6.jpg
|
||||
$imgSrc = $baseUrl . "/themes/template3/assets/img/blog/blog-{$imgIndex}.jpg";
|
||||
}
|
||||
|
||||
<p class="post-category">Politics</p>
|
||||
$articleUrl = $apiUrl . '/article_detail/' . ($item['id'] ?? 0);
|
||||
?>
|
||||
|
||||
<h2 class="title">
|
||||
<a href="blog-details.php">Dolorum optio tempore voluptas dignissimos</a>
|
||||
</h2>
|
||||
<div class="col-lg-6">
|
||||
<article>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
<img src="<?php echo $baseUrl; ?>/themes/template3/assets/img/blog/blog-author.jpg" alt="" class="img-fluid post-author-img flex-shrink-0">
|
||||
<div class="post-meta">
|
||||
<p class="post-author">Maria Doe</p>
|
||||
<p class="post-date">
|
||||
<time datetime="2022-01-01">Jan 1, 2022</time>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-img">
|
||||
<img src="<?php echo htmlspecialchars($imgSrc); ?>" alt="" class="img-fluid">
|
||||
</div>
|
||||
|
||||
</article>
|
||||
</div><!-- End post list item -->
|
||||
<p class="post-category"><?php echo htmlspecialchars($category); ?></p>
|
||||
|
||||
<div class="col-lg-6">
|
||||
<article>
|
||||
<h2 class="title">
|
||||
<a href="<?php echo htmlspecialchars($articleUrl); ?>">
|
||||
<?php echo htmlspecialchars($title); ?>
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<div class="post-img">
|
||||
<img src="<?php echo $baseUrl; ?>/themes/template3/assets/img/blog/blog-2.jpg" alt="" class="img-fluid">
|
||||
</div>
|
||||
<div class="d-flex align-items-center">
|
||||
<img src="<?php echo $baseUrl; ?>/themes/template3/assets/img/blog/blog-author.jpg" alt="" class="img-fluid post-author-img flex-shrink-0">
|
||||
<div class="post-meta">
|
||||
<p class="post-author"><?php echo htmlspecialchars($author); ?></p>
|
||||
<p class="post-date">
|
||||
<time datetime="<?php echo htmlspecialchars($publishDateRaw); ?>">
|
||||
<?php echo htmlspecialchars($postDate); ?>
|
||||
</time>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="post-category">Sports</p>
|
||||
|
||||
<h2 class="title">
|
||||
<a href="blog-details.php">Nisi magni odit consequatur autem nulla dolorem</a>
|
||||
</h2>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
<img src="<?php echo $baseUrl; ?>/themes/template3/assets/img/blog/blog-author-2.jpg" alt="" class="img-fluid post-author-img flex-shrink-0">
|
||||
<div class="post-meta">
|
||||
<p class="post-author">Allisa Mayer</p>
|
||||
<p class="post-date">
|
||||
<time datetime="2022-01-01">Jun 5, 2022</time>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
</div><!-- End post list item -->
|
||||
|
||||
<div class="col-lg-6">
|
||||
<article>
|
||||
|
||||
<div class="post-img">
|
||||
<img src="<?php echo $baseUrl; ?>/themes/template3/assets/img/blog/blog-3.jpg" alt="" class="img-fluid">
|
||||
</div>
|
||||
|
||||
<p class="post-category">Entertainment</p>
|
||||
|
||||
<h2 class="title">
|
||||
<a href="blog-details.php">Possimus soluta ut id suscipit ea ut in quo quia et soluta</a>
|
||||
</h2>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
<img src="<?php echo $baseUrl; ?>/themes/template3/assets/img/blog/blog-author-3.jpg" alt="" class="img-fluid post-author-img flex-shrink-0">
|
||||
<div class="post-meta">
|
||||
<p class="post-author">Mark Dower</p>
|
||||
<p class="post-date">
|
||||
<time datetime="2022-01-01">Jun 22, 2022</time>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
</div><!-- End post list item -->
|
||||
|
||||
<div class="col-lg-6">
|
||||
<article>
|
||||
|
||||
<div class="post-img">
|
||||
<img src="<?php echo $baseUrl; ?>/themes/template3/assets/img/blog/blog-4.jpg" alt="" class="img-fluid">
|
||||
</div>
|
||||
|
||||
<p class="post-category">Sports</p>
|
||||
|
||||
<h2 class="title">
|
||||
<a href="blog-details.php">Non rem rerum nam cum quo minus olor distincti</a>
|
||||
</h2>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
<img src="<?php echo $baseUrl; ?>/themes/template3/assets/img/blog/blog-author-4.jpg" alt="" class="img-fluid post-author-img flex-shrink-0">
|
||||
<div class="post-meta">
|
||||
<p class="post-author">Lisa Neymar</p>
|
||||
<p class="post-date">
|
||||
<time datetime="2022-01-01">Jun 30, 2022</time>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
</div><!-- End post list item -->
|
||||
|
||||
<div class="col-lg-6">
|
||||
<article>
|
||||
|
||||
<div class="post-img">
|
||||
<img src="<?php echo $baseUrl; ?>/themes/template3/assets/img/blog/blog-5.jpg" alt="" class="img-fluid">
|
||||
</div>
|
||||
|
||||
<p class="post-category">Politics</p>
|
||||
|
||||
<h2 class="title">
|
||||
<a href="blog-details.php">Accusamus quaerat aliquam qui debitis facilis consequatur</a>
|
||||
</h2>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
<img src="<?php echo $baseUrl; ?>/themes/template3/assets/img/blog/blog-author-5.jpg" alt="" class="img-fluid post-author-img flex-shrink-0">
|
||||
<div class="post-meta">
|
||||
<p class="post-author">Denis Peterson</p>
|
||||
<p class="post-date">
|
||||
<time datetime="2022-01-01">Jan 30, 2022</time>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
</div><!-- End post list item -->
|
||||
|
||||
<div class="col-lg-6">
|
||||
<article>
|
||||
|
||||
<div class="post-img">
|
||||
<img src="<?php echo $baseUrl; ?>/themes/template3/assets/img/blog/blog-6.jpg" alt="" class="img-fluid">
|
||||
</div>
|
||||
|
||||
<p class="post-category">Entertainment</p>
|
||||
|
||||
<h2 class="title">
|
||||
<a href="blog-details.php">Distinctio provident quibusdam numquam aperiam aut</a>
|
||||
</h2>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
<img src="<?php echo $baseUrl; ?>/themes/template3/assets/img/blog/blog-author-6.jpg" alt="" class="img-fluid post-author-img flex-shrink-0">
|
||||
<div class="post-meta">
|
||||
<p class="post-author">Mika Lendon</p>
|
||||
<p class="post-date">
|
||||
<time datetime="2022-01-01">Feb 14, 2022</time>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
</div><!-- End post list item -->
|
||||
</article>
|
||||
</div><!-- End post list item -->
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<div class="col-12 text-center">
|
||||
<p>暂无新闻数据</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -196,14 +124,24 @@ require_once __DIR__ . '/header.php';
|
||||
<div class="container">
|
||||
<div class="d-flex justify-content-center">
|
||||
<ul>
|
||||
<li><a href="#"><i class="bi bi-chevron-left"></i></a></li>
|
||||
<li><a href="#">1</a></li>
|
||||
<li><a href="#" class="active">2</a></li>
|
||||
<li><a href="#">3</a></li>
|
||||
<li><a href="#">4</a></li>
|
||||
<li>...</li>
|
||||
<li><a href="#">10</a></li>
|
||||
<li><a href="#"><i class="bi bi-chevron-right"></i></a></li>
|
||||
<?php
|
||||
$prevPage = max(1, $currentPage - 1);
|
||||
$nextPage = min($totalPages, $currentPage + 1);
|
||||
$showMax = 10;
|
||||
$showTotal = min($totalPages, $showMax);
|
||||
?>
|
||||
<li><a href="<?php echo $baseUrl; ?>/blog?page=<?php echo $prevPage; ?>"><i class="bi bi-chevron-left"></i></a></li>
|
||||
<?php for ($p = 1; $p <= $showTotal; $p++): ?>
|
||||
<li>
|
||||
<a
|
||||
href="<?php echo $baseUrl; ?>/blog?page=<?php echo $p; ?>"
|
||||
<?php echo ($p === $currentPage) ? 'class="active"' : ''; ?>
|
||||
>
|
||||
<?php echo $p; ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endfor; ?>
|
||||
<li><a href="<?php echo $baseUrl; ?>/blog?page=<?php echo $nextPage; ?>"><i class="bi bi-chevron-right"></i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -250,7 +188,7 @@ require_once __DIR__ . '/header.php';
|
||||
<div class="post-item">
|
||||
<img src="<?php echo $baseUrl; ?>/themes/template3/assets/img/blog/blog-recent-1.jpg" alt="" class="flex-shrink-0">
|
||||
<div>
|
||||
<h4><a href="blog-details.php">Nihil blanditiis at in nihil autem</a></h4>
|
||||
<h4><a href="<?php echo $baseUrl; ?>/blog-details">Nihil blanditiis at in nihil autem</a></h4>
|
||||
<time datetime="2020-01-01">Jan 1, 2020</time>
|
||||
</div>
|
||||
</div><!-- End recent post item-->
|
||||
@@ -258,7 +196,7 @@ require_once __DIR__ . '/header.php';
|
||||
<div class="post-item">
|
||||
<img src="<?php echo $baseUrl; ?>/themes/template3/assets/img/blog/blog-recent-2.jpg" alt="" class="flex-shrink-0">
|
||||
<div>
|
||||
<h4><a href="blog-details.php">Quidem autem et impedit</a></h4>
|
||||
<h4><a href="<?php echo $baseUrl; ?>/blog-details">Quidem autem et impedit</a></h4>
|
||||
<time datetime="2020-01-01">Jan 1, 2020</time>
|
||||
</div>
|
||||
</div><!-- End recent post item-->
|
||||
@@ -266,7 +204,7 @@ require_once __DIR__ . '/header.php';
|
||||
<div class="post-item">
|
||||
<img src="<?php echo $baseUrl; ?>/themes/template3/assets/img/blog/blog-recent-3.jpg" alt="" class="flex-shrink-0">
|
||||
<div>
|
||||
<h4><a href="blog-details.php">Id quia et et ut maxime similique occaecati ut</a></h4>
|
||||
<h4><a href="<?php echo $baseUrl; ?>/blog-details">Id quia et et ut maxime similique occaecati ut</a></h4>
|
||||
<time datetime="2020-01-01">Jan 1, 2020</time>
|
||||
</div>
|
||||
</div><!-- End recent post item-->
|
||||
@@ -274,7 +212,7 @@ require_once __DIR__ . '/header.php';
|
||||
<div class="post-item">
|
||||
<img src="<?php echo $baseUrl; ?>/themes/template3/assets/img/blog/blog-recent-4.jpg" alt="" class="flex-shrink-0">
|
||||
<div>
|
||||
<h4><a href="blog-details.php">Laborum corporis quo dara net para</a></h4>
|
||||
<h4><a href="<?php echo $baseUrl; ?>/blog-details">Laborum corporis quo dara net para</a></h4>
|
||||
<time datetime="2020-01-01">Jan 1, 2020</time>
|
||||
</div>
|
||||
</div><!-- End recent post item-->
|
||||
@@ -282,33 +220,13 @@ require_once __DIR__ . '/header.php';
|
||||
<div class="post-item">
|
||||
<img src="<?php echo $baseUrl; ?>/themes/template3/assets/img/blog/blog-recent-5.jpg" alt="" class="flex-shrink-0">
|
||||
<div>
|
||||
<h4><a href="blog-details.php">Et dolores corrupti quae illo quod dolor</a></h4>
|
||||
<h4><a href="<?php echo $baseUrl; ?>/blog-details">Et dolores corrupti quae illo quod dolor</a></h4>
|
||||
<time datetime="2020-01-01">Jan 1, 2020</time>
|
||||
</div>
|
||||
</div><!-- End recent post item-->
|
||||
|
||||
</div><!--/Recent Posts Widget -->
|
||||
|
||||
<!-- Tags Widget -->
|
||||
<div class="tags-widget widget-item">
|
||||
|
||||
<h3 class="widget-title">标签</h3>
|
||||
<ul>
|
||||
<li><a href="#">App</a></li>
|
||||
<li><a href="#">IT</a></li>
|
||||
<li><a href="#">Business</a></li>
|
||||
<li><a href="#">Mac</a></li>
|
||||
<li><a href="#">Design</a></li>
|
||||
<li><a href="#">Office</a></li>
|
||||
<li><a href="#">Creative</a></li>
|
||||
<li><a href="#">Studio</a></li>
|
||||
<li><a href="#">Smart</a></li>
|
||||
<li><a href="#">Tips</a></li>
|
||||
<li><a href="#">Marketing</a></li>
|
||||
</ul>
|
||||
|
||||
</div><!--/Tags Widget -->
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -318,66 +236,6 @@ require_once __DIR__ . '/header.php';
|
||||
|
||||
</main>
|
||||
|
||||
<footer id="footer" class="footer light-background">
|
||||
|
||||
<div class="footer-top">
|
||||
<div class="container">
|
||||
<div class="row gy-4">
|
||||
<div class="col-lg-5 col-md-12 footer-about">
|
||||
<a href="<?php echo $baseUrl; ?>/" class="logo d-flex align-items-center">
|
||||
<span class="sitename">Nova</span>
|
||||
</a>
|
||||
<p>Cras fermentum odio eu feugiat lide par naso tierra. Justo eget nada terra videa magna derita valies darta donna mare fermentum iaculis eu non diam phasellus.</p>
|
||||
<div class="social-links d-flex mt-4">
|
||||
<a href=""><i class="bi bi-twitter-x"></i></a>
|
||||
<a href=""><i class="bi bi-facebook"></i></a>
|
||||
<a href=""><i class="bi bi-instagram"></i></a>
|
||||
<a href=""><i class="bi bi-linkedin"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2 col-6 footer-links">
|
||||
<h4>有用链接</h4>
|
||||
<ul>
|
||||
<li><a href="<?php echo $baseUrl; ?>/">Home</a></li>
|
||||
<li><a href="<?php echo $baseUrl; ?>/about.php">About us</a></li>
|
||||
<li><a href="<?php echo $baseUrl; ?>/services.php">Services</a></li>
|
||||
<li><a href="#">Terms of service</a></li>
|
||||
<li><a href="#">Privacy policy</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2 col-6 footer-links">
|
||||
<h4>特色业务</h4>
|
||||
<ul>
|
||||
<li><a href="<?php echo $baseUrl; ?>/portfolio.php">Web Design</a></li>
|
||||
<li><a href="<?php echo $baseUrl; ?>/portfolio.php">Web Development</a></li>
|
||||
<li><a href="<?php echo $baseUrl; ?>/services.php">Product Management</a></li>
|
||||
<li><a href="#">Marketing</a></li>
|
||||
<li><a href="#">Graphic Design</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-md-12 footer-contact text-center text-md-start">
|
||||
<h4>联系我们</h4>
|
||||
<p>A108 Adam Street</p>
|
||||
<p>New York, NY 535022</p>
|
||||
<p>United States</p>
|
||||
<p class="mt-4"><strong>Phone:</strong> <span>+1 5589 55488 55</span></p>
|
||||
<p><strong>Email:</strong> <span>info@example.com</span></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container copyright text-center">
|
||||
<p>© <span>Copyright</span> <strong class="px-1 sitename">Nova</strong> <span>All Rights Reserved</span></p>
|
||||
<div class="credits">
|
||||
Designed by <a href="https://bootstrapmade.com/">BootstrapMade</a> Distributed by <a href="https://themewagon.com">ThemeWagon</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
|
||||
<?php require_once __DIR__ . '/footer.php'; ?>
|
||||
@@ -1,33 +1,67 @@
|
||||
<!-- footer.php -->
|
||||
<!-- Scroll Top -->
|
||||
<a href="#" id="scroll-top" class="scroll-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a>
|
||||
<a href="#" id="scroll-top" class="scroll-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a>
|
||||
|
||||
<!-- Preloader -->
|
||||
<div id="preloader"></div>
|
||||
<!-- Preloader -->
|
||||
<div id="preloader"></div>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer id="footer" class="footer">
|
||||
<!-- Footer -->
|
||||
<footer id="footer" class="footer light-background">
|
||||
|
||||
<div class="footer-top">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-12 text-center">
|
||||
<p>Design and Developed by 云泽网 <?php echo $homeInfo['normal']['copyright']; ?> <?php echo $homeInfo['normal']['sitename']; ?> All Rights Reserved.</p>
|
||||
<div class="row gy-4">
|
||||
<div class="col-lg-5 col-md-12 footer-about">
|
||||
<a href="<?php echo $baseUrl; ?>/" class="logo d-flex align-items-center">
|
||||
<img src="<?php echo htmlspecialchars($homeInfo['normal']['logo']); ?>" alt="">
|
||||
</a>
|
||||
<p><?php echo htmlspecialchars($seoDescription); ?></p>
|
||||
<!-- <div class="social-links d-flex mt-4">
|
||||
<a href=""><i class="bi bi-twitter-x"></i></a>
|
||||
<a href=""><i class="bi bi-facebook"></i></a>
|
||||
<a href=""><i class="bi bi-instagram"></i></a>
|
||||
<a href=""><i class="bi bi-linkedin"></i></a>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2 col-6 footer-links">
|
||||
<h4>链接</h4>
|
||||
<ul>
|
||||
<li><a href="<?php echo $baseUrl; ?>/">主页</a></li>
|
||||
<li><a href="<?php echo $baseUrl; ?>/blog">新闻中心</a></li>
|
||||
<li><a href="<?php echo $baseUrl; ?>/contact">联系我们</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-md-12 footer-contact text-center text-md-start">
|
||||
<h4>联系我们</h4>
|
||||
<p><strong>地址:</strong> <span><?php echo ($homeInfo['contact']['address']); ?></span></p>
|
||||
<p><strong>电话:</strong> <span><?php echo ($homeInfo['contact']['contact_phone']); ?></span></p>
|
||||
<p><strong>邮箱:</strong> <span><?php echo ($homeInfo['contact']['contact_email']); ?></span></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<!-- Vendor JS Files -->
|
||||
<script src="<?php echo $baseUrl; ?>/themes/template3/assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="<?php echo $baseUrl; ?>/themes/template3/assets/vendor/php-email-form/validate.js"></script>
|
||||
<script src="<?php echo $baseUrl; ?>/themes/template3/assets/vendor/aos/aos.js"></script>
|
||||
<script src="<?php echo $baseUrl; ?>/themes/template3/assets/vendor/glightbox/js/glightbox.min.js"></script>
|
||||
<script src="<?php echo $baseUrl; ?>/themes/template3/assets/vendor/swiper/swiper-bundle.min.js"></script>
|
||||
<script src="<?php echo $baseUrl; ?>/themes/template3/assets/vendor/imagesloaded/imagesloaded.pkgd.min.js"></script>
|
||||
<script src="<?php echo $baseUrl; ?>/themes/template3/assets/vendor/isotope-layout/isotope.pkgd.min.js"></script>
|
||||
<div class="container copyright text-center">
|
||||
<p>Design and Developed by 云泽网 <?php echo $homeInfo['normal']['copyright']; ?> <?php echo $homeInfo['normal']['sitename']; ?> All Rights Reserved.</p>
|
||||
</div>
|
||||
|
||||
<!-- Main JS File -->
|
||||
<script src="<?php echo $baseUrl; ?>/themes/template3/assets/js/main.js"></script>
|
||||
</footer>
|
||||
|
||||
<!-- Vendor JS Files -->
|
||||
<script src="<?php echo $baseUrl; ?>/themes/template3/assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="<?php echo $baseUrl; ?>/themes/template3/assets/vendor/php-email-form/validate.js"></script>
|
||||
<script src="<?php echo $baseUrl; ?>/themes/template3/assets/vendor/aos/aos.js"></script>
|
||||
<script src="<?php echo $baseUrl; ?>/themes/template3/assets/vendor/glightbox/js/glightbox.min.js"></script>
|
||||
<script src="<?php echo $baseUrl; ?>/themes/template3/assets/vendor/swiper/swiper-bundle.min.js"></script>
|
||||
<script src="<?php echo $baseUrl; ?>/themes/template3/assets/vendor/imagesloaded/imagesloaded.pkgd.min.js"></script>
|
||||
<script src="<?php echo $baseUrl; ?>/themes/template3/assets/vendor/isotope-layout/isotope.pkgd.min.js"></script>
|
||||
|
||||
<!-- Main JS File -->
|
||||
<script src="<?php echo $baseUrl; ?>/themes/template3/assets/js/main.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
@@ -1,4 +1,3 @@
|
||||
<!-- header.php -->
|
||||
<?php
|
||||
// #########默认头部开始#########
|
||||
// 引入 ThinkPHP 应用
|
||||
@@ -11,7 +10,6 @@ $scheme = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') ? 'https' : '
|
||||
$baseUrl = $baseUrl ?? ($scheme . '://' . $host);
|
||||
$apiUrl = $apiUrl ?? 'https://api.yunzer.cn';
|
||||
|
||||
|
||||
/**
|
||||
* 核心请求函数:fetchApiData
|
||||
* 用于发送 GET 请求并解析 JSON
|
||||
@@ -52,10 +50,16 @@ $newsUrl = $apiUrl . '/getCenterNews?baseUrl=' . urlencode($host);
|
||||
$newsRes = fetchApiData($newsUrl);
|
||||
$newsList = $newsRes['list'] ?? [];
|
||||
|
||||
// 获取特色服务
|
||||
$servicesList = $homeInfo['services'] ?? [];
|
||||
|
||||
// 获取企业产品
|
||||
$productsList = $homeInfo['products'] ?? [];
|
||||
|
||||
// 获取友链数据
|
||||
$friendlinkList = $homeInfo['links'] ?? [];
|
||||
|
||||
// 动态设置 SEO 变量
|
||||
// 动态设置 SEO 变量(优先用每个页面自己的变量)
|
||||
$seoTitle = $pageTitle ?? ($homeInfo['normal']['sitename'] ?? '云泽网 默认标题');
|
||||
$seoDescription = $pageDescription ?? ($homeInfo['normal']['description'] ?? '');
|
||||
$seoKeywords = $pageKeywords ?? ($homeInfo['normal']['keywords'] ?? '');
|
||||
@@ -69,9 +73,11 @@ $seoKeywords = $pageKeywords ?? ($homeInfo['normal']['keywords'] ?? '');
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport">
|
||||
<base href="/themes/template3/">
|
||||
|
||||
<title><?php echo htmlspecialchars($homeInfo['normal']['sitename']); ?></title>
|
||||
<meta name="description" content="<?php echo $homeInfo['normal']['description']; ?>">
|
||||
<meta name="keywords" content="<?php echo $seoKeywords; ?>">
|
||||
<!-- 使用页面级 SEO 变量 -->
|
||||
<title><?php echo htmlspecialchars($seoTitle); ?></title>
|
||||
<meta name="description" content="<?php echo htmlspecialchars($seoDescription); ?>">
|
||||
<meta name="keywords" content="<?php echo htmlspecialchars($seoKeywords); ?>">
|
||||
|
||||
<link href="<?php echo $baseUrl; ?>/themes/template3/assets/img/favicon.png" rel="icon">
|
||||
<link href="<?php echo $baseUrl; ?>/themes/template3/assets/img/apple-touch-icon.png" rel="apple-touch-icon">
|
||||
|
||||
@@ -90,17 +96,27 @@ $seoKeywords = $pageKeywords ?? ($homeInfo['normal']['keywords'] ?? '');
|
||||
<header id="header" class="header d-flex align-items-center fixed-top">
|
||||
<div class="container-fluid container-xl position-relative d-flex align-items-center justify-content-between">
|
||||
|
||||
<?php
|
||||
// 安全获取 logo,避免 homeInfo['normal'] 未定义时报错
|
||||
$logo = '';
|
||||
if (!empty($homeInfo['normal']) && !empty($homeInfo['normal']['logow'])) {
|
||||
$logo = $baseUrl . $homeInfo['normal']['logow'];
|
||||
} else {
|
||||
// 兜底:使用模板自带的默认 logo
|
||||
$logo = $baseUrl . '/themes/template3/assets/img/logo.png';
|
||||
}
|
||||
?>
|
||||
<a href="<?php echo $baseUrl; ?>/" class="logo d-flex align-items-center">
|
||||
<img src="<?php echo $baseUrl . $homeInfo['normal']['logow']; ?>" alt="">
|
||||
<img src="<?php echo htmlspecialchars($logo); ?>" alt="">
|
||||
</a>
|
||||
|
||||
<nav id="navmenu" class="navmenu">
|
||||
<ul>
|
||||
<li><a href="<?php echo $baseUrl; ?>/" class="active">主页</a></li>
|
||||
<li><a href="<?php echo $baseUrl; ?>/blog.php">新闻中心</a></li>
|
||||
<li><a href="<?php echo $baseUrl; ?>/portfolio.php">特色业务</a></li>
|
||||
<li><a href="<?php echo $baseUrl; ?>/contact.php">联系我们</a></li>
|
||||
<li><a href="<?php echo $baseUrl; ?>/about.php">关于我们</a></li>
|
||||
<li><a href="<?php echo $baseUrl; ?>/blog">新闻中心</a></li>
|
||||
<li><a href="<?php echo $baseUrl; ?>/portfolio">特色业务</a></li>
|
||||
<li><a href="<?php echo $baseUrl; ?>/contact">联系我们</a></li>
|
||||
<li><a href="<?php echo $baseUrl; ?>/about">关于我们</a></li>
|
||||
</ul>
|
||||
<i class="mobile-nav-toggle d-xl-none bi bi-list"></i>
|
||||
</nav>
|
||||
|
||||
@@ -49,6 +49,29 @@ require_once __DIR__ . '/header.php';
|
||||
}
|
||||
document.getElementById('hero-indicator').textContent = (currentIndex + 1) + ' / ' + banners.length;
|
||||
}
|
||||
|
||||
// 自动轮播:每 5 秒切换一张
|
||||
var heroTimer = null;
|
||||
function startHeroAutoplay() {
|
||||
if (heroTimer) clearInterval(heroTimer);
|
||||
heroTimer = setInterval(function () {
|
||||
switchBanner(1);
|
||||
}, 5000);
|
||||
}
|
||||
function stopHeroAutoplay() {
|
||||
if (heroTimer) clearInterval(heroTimer);
|
||||
heroTimer = null;
|
||||
}
|
||||
|
||||
// 鼠标移入暂停,移出继续
|
||||
var heroSection = document.getElementById('hero');
|
||||
if (heroSection) {
|
||||
heroSection.addEventListener('mouseenter', stopHeroAutoplay);
|
||||
heroSection.addEventListener('mouseleave', startHeroAutoplay);
|
||||
}
|
||||
|
||||
// 初始化启动
|
||||
startHeroAutoplay();
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -147,7 +170,29 @@ require_once __DIR__ . '/header.php';
|
||||
<div class="row g-0">
|
||||
|
||||
<div class="col-xl-5 img-bg" data-aos="fade-up" data-aos-delay="100">
|
||||
<img src="<?php echo $apiUrl; ?>/themes/template3/assets/img/why-us-bg.jpg" alt="">
|
||||
<?php
|
||||
// why-us 左侧图片随 productsList 的 swiper 切换
|
||||
$whyUsFallbackImg = $apiUrl . '/themes/template3/assets/img/why-us-bg.jpg';
|
||||
$whyUsThumbs = [];
|
||||
if (!empty($productsList)) {
|
||||
foreach ($productsList as $product) {
|
||||
$thumb = $product['thumb'] ?? '';
|
||||
if (!empty($thumb)) {
|
||||
if (strpos($thumb, 'http') === 0) {
|
||||
$whyUsThumbs[] = $thumb;
|
||||
} elseif (strpos($thumb, '/') === 0) {
|
||||
$whyUsThumbs[] = $baseUrl . $thumb; // /storage/... 直接拼站点域名
|
||||
} else {
|
||||
$whyUsThumbs[] = $baseUrl . '/' . $thumb;
|
||||
}
|
||||
} else {
|
||||
$whyUsThumbs[] = $whyUsFallbackImg;
|
||||
}
|
||||
}
|
||||
}
|
||||
$whyUsInitialImg = !empty($whyUsThumbs) ? ($whyUsThumbs[0] ?? $whyUsFallbackImg) : $whyUsFallbackImg;
|
||||
?>
|
||||
<img id="why-us-img" src="<?php echo htmlspecialchars($whyUsInitialImg); ?>" alt="" data-fallback="<?php echo htmlspecialchars($whyUsFallbackImg); ?>">
|
||||
</div>
|
||||
|
||||
<div class="col-xl-7 slides position-relative" data-aos="fade-up" data-aos-delay="200">
|
||||
@@ -175,46 +220,59 @@ require_once __DIR__ . '/header.php';
|
||||
</script>
|
||||
<div class="swiper-wrapper">
|
||||
|
||||
<div class="swiper-slide">
|
||||
<div class="item">
|
||||
<h3 class="mb-3">让我们一起成长</h3>
|
||||
<h4 class="mb-3">Optio reiciendis accusantium iusto architecto at quia minima maiores quidem, dolorum.
|
||||
</h4>
|
||||
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Repellendus, ipsam perferendis asperiores
|
||||
explicabo vel tempore velit totam, natus nesciunt accusantium dicta quod quibusdam ipsum maiores nobis
|
||||
non, eum. Ullam reiciendis dignissimos laborum aut, magni voluptatem velit doloribus quas sapiente
|
||||
optio.</p>
|
||||
</div>
|
||||
</div><!-- End slide item -->
|
||||
<?php if (!empty($productsList)): ?>
|
||||
<?php foreach ($productsList as $i => $product): ?>
|
||||
<?php
|
||||
$title = $product['title'] ?? '';
|
||||
$desc = $product['desc'] ?? '';
|
||||
if (mb_strlen($desc) > 200) {
|
||||
$desc = mb_substr($desc, 0, 200) . '...';
|
||||
}
|
||||
?>
|
||||
<div class="swiper-slide">
|
||||
<div class="item">
|
||||
<h3 class="mb-3"><?php echo htmlspecialchars($title); ?></h3>
|
||||
<p><?php echo htmlspecialchars($desc); ?></p>
|
||||
</div>
|
||||
</div><!-- End slide item -->
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<!-- productsList 为空时兜底展示(保持原示例) -->
|
||||
<div class="swiper-slide">
|
||||
<div class="item">
|
||||
<h3 class="mb-3">让我们一起成长</h3>
|
||||
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Repellendus, ipsam perferendis asperiores
|
||||
explicabo vel tempore velit totam, natus nesciunt accusantium dicta quod quibusdam ipsum maiores nobis
|
||||
non, eum. Ullam reiciendis dignissimos laborum aut, magni voluptatem velit doloribus quas sapiente
|
||||
optio.</p>
|
||||
</div>
|
||||
</div><!-- End slide item -->
|
||||
|
||||
<div class="swiper-slide">
|
||||
<div class="item">
|
||||
<h3 class="mb-3">Unde perspiciatis ut repellat dolorem</h3>
|
||||
<h4 class="mb-3">Amet cumque nam sed voluptas doloribus iusto. Dolorem eos aliquam quis.</h4>
|
||||
<p>Dolorem quia fuga consectetur voluptatem. Earum consequatur nulla maxime necessitatibus cum
|
||||
accusamus. Voluptatem dolorem ut numquam dolorum delectus autem veritatis facilis. Et ea ut repellat
|
||||
ea. Facere est dolores fugiat dolor.</p>
|
||||
</div>
|
||||
</div><!-- End slide item -->
|
||||
<div class="swiper-slide">
|
||||
<div class="item">
|
||||
<h3 class="mb-3">Unde perspiciatis ut repellat dolorem</h3>
|
||||
<p>Dolorem quia fuga consectetur voluptatem. Earum consequatur nulla maxime necessitatibus cum
|
||||
accusamus. Voluptatem dolorem ut numquam dolorum delectus autem veritatis facilis. Et ea ut repellat
|
||||
ea. Facere est dolores fugiat dolor.</p>
|
||||
</div>
|
||||
</div><!-- End slide item -->
|
||||
|
||||
<div class="swiper-slide">
|
||||
<div class="item">
|
||||
<h3 class="mb-3">Aliquid non alias minus</h3>
|
||||
<h4 class="mb-3">Necessitatibus voluptatibus explicabo dolores a vitae voluptatum.</h4>
|
||||
<p>Neque voluptates aut. Soluta aut perspiciatis porro deserunt. Voluptate ut itaque velit. Aut
|
||||
consectetur voluptatem aspernatur sequi sit laborum. Voluptas enim dolorum fugiat aut.</p>
|
||||
</div>
|
||||
</div><!-- End slide item -->
|
||||
<div class="swiper-slide">
|
||||
<div class="item">
|
||||
<h3 class="mb-3">Aliquid non alias minus</h3>
|
||||
<p>Neque voluptates aut. Soluta aut perspiciatis porro deserunt. Voluptate ut itaque velit. Aut
|
||||
consectetur voluptatem aspernatur sequi sit laborum. Voluptas enim dolorum fugiat aut.</p>
|
||||
</div>
|
||||
</div><!-- End slide item -->
|
||||
|
||||
<div class="swiper-slide">
|
||||
<div class="item">
|
||||
<h3 class="mb-3">Necessitatibus suscipit non voluptatem quibusdam</h3>
|
||||
<h4 class="mb-3">Tempora quos est ut quia adipisci ut voluptas. Deleniti laborum soluta nihil est. Eum
|
||||
similique neque autem ut.</h4>
|
||||
<p>Ut rerum et autem vel. Et rerum molestiae aut sit vel incidunt sit at voluptatem. Saepe dolorem et
|
||||
sed voluptate impedit. Ad et qui sint at qui animi animi rerum.</p>
|
||||
</div>
|
||||
</div><!-- End slide item -->
|
||||
<div class="swiper-slide">
|
||||
<div class="item">
|
||||
<h3 class="mb-3">Necessitatibus suscipit non voluptatem quibusdam</h3>
|
||||
<p>Ut rerum et autem vel. Et rerum molestiae aut sit vel incidunt sit at voluptatem. Saepe dolorem et
|
||||
sed voluptate impedit. Ad et qui sint at qui animi animi rerum.</p>
|
||||
</div>
|
||||
</div><!-- End slide item -->
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
<div class="swiper-pagination"></div>
|
||||
@@ -230,79 +288,112 @@ require_once __DIR__ . '/header.php';
|
||||
|
||||
</section><!-- /Why Us Section -->
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
const section = document.getElementById('why-us');
|
||||
if (!section) return;
|
||||
const swiperEl = section.querySelector('.swiper.init-swiper');
|
||||
const imgEl = section.querySelector('#why-us-img');
|
||||
if (!swiperEl || !imgEl) return;
|
||||
|
||||
const wrapper = swiperEl.querySelector('.swiper-wrapper');
|
||||
if (!wrapper) return;
|
||||
|
||||
const slides = Array.from(wrapper.querySelectorAll('.swiper-slide'));
|
||||
const thumbs = <?php echo json_encode($whyUsThumbs ?? [], JSON_UNESCAPED_SLASHES); ?>;
|
||||
|
||||
function getActiveIndex() {
|
||||
const active = wrapper.querySelector('.swiper-slide-active');
|
||||
if (!active) return 0;
|
||||
const idx = slides.indexOf(active);
|
||||
return idx >= 0 ? idx : 0;
|
||||
}
|
||||
|
||||
function updateImg() {
|
||||
const idx = getActiveIndex();
|
||||
const fallback = imgEl.dataset.fallback || imgEl.src;
|
||||
const src = thumbs[idx] || thumbs[0] || fallback;
|
||||
if (src) imgEl.src = src;
|
||||
}
|
||||
|
||||
// 初始化 + 兼容 swiper 初始化时机
|
||||
window.addEventListener('load', function () {
|
||||
setTimeout(updateImg, 300);
|
||||
});
|
||||
|
||||
wrapper.addEventListener('transitionend', updateImg);
|
||||
swiperEl.addEventListener('transitionend', updateImg);
|
||||
})();
|
||||
</script>
|
||||
|
||||
<!-- Services Section -->
|
||||
<section id="services" class="services section">
|
||||
|
||||
<!-- Section Title -->
|
||||
<div class="container section-title" data-aos="fade-up">
|
||||
<h2>我们的服务</h2>
|
||||
<p>Necessitatibus eius consequatur ex aliquid fuga eum quidem sint consectetur velit</p>
|
||||
<p>OUR SERVICES</p>
|
||||
</div><!-- End Section Title -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row gy-4">
|
||||
<?php
|
||||
// 服务列表图标与颜色兜底(当接口没返回 thumb 时使用)
|
||||
$serviceIcons = ['bi-briefcase', 'bi-card-checklist', 'bi-bar-chart', 'bi-binoculars', 'bi-brightness-high', 'bi-calendar4-week'];
|
||||
$serviceColors = ['#f57813', '#15a04a', '#d90769', '#15bfbc', '#f5cf13', '#1335f5'];
|
||||
?>
|
||||
|
||||
<div class="col-lg-4 col-md-6 service-item d-flex" data-aos="fade-up" data-aos-delay="100">
|
||||
<div class="icon flex-shrink-0"><i class="bi bi-briefcase" style="color: #f57813;"></i></div>
|
||||
<div>
|
||||
<h4 class="title">Lorem Ipsum</h4>
|
||||
<p class="description">Voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint
|
||||
occaecati cupiditate non provident</p>
|
||||
<a href="#" class="readmore stretched-link"><span>了解更多</span><i class="bi bi-arrow-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Service Item -->
|
||||
<?php if (!empty($servicesList)): ?>
|
||||
<?php foreach ($servicesList as $i => $item): ?>
|
||||
<?php
|
||||
$title = $item['title'] ?? '';
|
||||
$desc = $item['desc'] ?? '';
|
||||
$serviceUrl = !empty($item['url']) ? $item['url'] : '#';
|
||||
|
||||
<div class="col-lg-4 col-md-6 service-item d-flex" data-aos="fade-up" data-aos-delay="200">
|
||||
<div class="icon flex-shrink-0"><i class="bi bi-card-checklist" style="color: #15a04a;"></i></div>
|
||||
<div>
|
||||
<h4 class="title">Dolor Sitema</h4>
|
||||
<p class="description">Minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
||||
consequat tarad limino ata</p>
|
||||
<a href="#" class="readmore stretched-link"><span>了解更多</span><i class="bi bi-arrow-right"></i></a>
|
||||
</div>
|
||||
</div><!-- End Service Item -->
|
||||
$thumb = $item['thumb'] ?? '';
|
||||
if ($thumb) {
|
||||
if (strpos($thumb, 'http') === 0) {
|
||||
$imgSrc = $thumb;
|
||||
} elseif (strpos($thumb, '/') === 0) {
|
||||
// 站点内相对路径,例如:/storage/uploads/xxx.jpg
|
||||
$imgSrc = $baseUrl . $thumb;
|
||||
} else {
|
||||
// 兜底:当接口返回非以 / 开头的相对路径时
|
||||
$imgSrc = $apiUrl . $thumb;
|
||||
}
|
||||
} else {
|
||||
$imgSrc = '';
|
||||
}
|
||||
|
||||
<div class="col-lg-4 col-md-6 service-item d-flex" data-aos="fade-up" data-aos-delay="300">
|
||||
<div class="icon flex-shrink-0"><i class="bi bi-bar-chart" style="color: #d90769;"></i></div>
|
||||
<div>
|
||||
<h4 class="title">Sed ut perspiciatis</h4>
|
||||
<p class="description">Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
||||
nulla pariatur</p>
|
||||
<a href="#" class="readmore stretched-link"><span>了解更多</span><i class="bi bi-arrow-right"></i></a>
|
||||
</div>
|
||||
</div><!-- End Service Item -->
|
||||
$icon = $serviceIcons[$i % count($serviceIcons)];
|
||||
$color = $serviceColors[$i % count($serviceColors)];
|
||||
$delay = ($i + 1) * 100;
|
||||
?>
|
||||
|
||||
<div class="col-lg-4 col-md-6 service-item d-flex" data-aos="fade-up" data-aos-delay="400">
|
||||
<div class="icon flex-shrink-0"><i class="bi bi-binoculars" style="color: #15bfbc;"></i></div>
|
||||
<div>
|
||||
<h4 class="title">Magni Dolores</h4>
|
||||
<p class="description">Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
|
||||
mollit anim id est laborum</p>
|
||||
<a href="#" class="readmore stretched-link"><span>了解更多</span><i class="bi bi-arrow-right"></i></a>
|
||||
<div class="col-lg-4 col-md-6 service-item d-flex" data-aos="fade-up" data-aos-delay="<?php echo $delay; ?>">
|
||||
<div class="icon flex-shrink-0">
|
||||
<?php if (!empty($imgSrc)): ?>
|
||||
<img src="<?php echo htmlspecialchars($imgSrc); ?>" alt=""
|
||||
style="width: 34px; height: 34px; object-fit: contain;">
|
||||
<?php else: ?>
|
||||
<i class="bi <?php echo $icon; ?>" style="color: <?php echo $color; ?>;"></i>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div>
|
||||
<h4 class="title"><?php echo htmlspecialchars($title); ?></h4>
|
||||
<p class="description"><?php echo htmlspecialchars($desc); ?></p>
|
||||
<a href="<?php echo htmlspecialchars($serviceUrl); ?>" class="readmore stretched-link">
|
||||
<span>了解更多</span><i class="bi bi-arrow-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div><!-- End Service Item -->
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<div class="col-12 text-center">
|
||||
<p>暂无服务数据</p>
|
||||
</div>
|
||||
</div><!-- End Service Item -->
|
||||
|
||||
<div class="col-lg-4 col-md-6 service-item d-flex" data-aos="fade-up" data-aos-delay="500">
|
||||
<div class="icon flex-shrink-0"><i class="bi bi-brightness-high" style="color: #f5cf13;"></i></div>
|
||||
<div>
|
||||
<h4 class="title">Nemo Enim</h4>
|
||||
<p class="description">At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium
|
||||
voluptatum deleniti atque</p>
|
||||
<a href="#" class="readmore stretched-link"><span>了解更多</span><i class="bi bi-arrow-right"></i></a>
|
||||
</div>
|
||||
</div><!-- End Service Item -->
|
||||
|
||||
<div class="col-lg-4 col-md-6 service-item d-flex" data-aos="fade-up" data-aos-delay="600">
|
||||
<div class="icon flex-shrink-0"><i class="bi bi-calendar4-week" style="color: #1335f5;"></i></div>
|
||||
<div>
|
||||
<h4 class="title">Eiusmod Tempor</h4>
|
||||
<p class="description">Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum
|
||||
soluta nobis est eligendi</p>
|
||||
<a href="#" class="readmore stretched-link"><span>了解更多</span><i class="bi bi-arrow-right"></i></a>
|
||||
</div>
|
||||
</div><!-- End Service Item -->
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -314,6 +405,7 @@ require_once __DIR__ . '/header.php';
|
||||
|
||||
<div class="container section-title" data-aos="fade-up">
|
||||
<h2>最新新闻</h2>
|
||||
<p>LATEST NEWS</p>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="row gy-5">
|
||||
|
||||
@@ -41,7 +41,7 @@ require_once __DIR__ . '/header.php';
|
||||
<h4>应用 1</h4>
|
||||
<p>Lorem ipsum, dolor sit amet consectetur</p>
|
||||
<a href="<?php echo $baseUrl; ?>/themes/template3/assets/img/portfolio/app-1.jpg" title="应用 1" data-gallery="portfolio-gallery-app" class="glightbox preview-link"><i class="bi bi-zoom-in"></i></a>
|
||||
<a href="<?php echo $baseUrl; ?>/portfolio-details.php" title="更多详情" class="details-link"><i class="bi bi-link-45deg"></i></a>
|
||||
<a href="<?php echo $baseUrl; ?>/portfolio-details" title="更多详情" class="details-link"><i class="bi bi-link-45deg"></i></a>
|
||||
</div>
|
||||
</div><!-- End Portfolio Item -->
|
||||
|
||||
@@ -51,7 +51,7 @@ require_once __DIR__ . '/header.php';
|
||||
<h4>产品 1</h4>
|
||||
<p>Lorem ipsum, dolor sit amet consectetur</p>
|
||||
<a href="<?php echo $baseUrl; ?>/themes/template3/assets/img/portfolio/product-1.jpg" title="产品 1" data-gallery="portfolio-gallery-product" class="glightbox preview-link"><i class="bi bi-zoom-in"></i></a>
|
||||
<a href="<?php echo $baseUrl; ?>/portfolio-details.php" title="更多详情" class="details-link"><i class="bi bi-link-45deg"></i></a>
|
||||
<a href="<?php echo $baseUrl; ?>/portfolio-details" title="更多详情" class="details-link"><i class="bi bi-link-45deg"></i></a>
|
||||
</div>
|
||||
</div><!-- End Portfolio Item -->
|
||||
|
||||
@@ -61,7 +61,7 @@ require_once __DIR__ . '/header.php';
|
||||
<h4>品牌 1</h4>
|
||||
<p>Lorem ipsum, dolor sit amet consectetur</p>
|
||||
<a href="<?php echo $baseUrl; ?>/themes/template3/assets/img/portfolio/branding-1.jpg" title="品牌 1" data-gallery="portfolio-gallery-branding" class="glightbox preview-link"><i class="bi bi-zoom-in"></i></a>
|
||||
<a href="<?php echo $baseUrl; ?>/portfolio-details.php" title="更多详情" class="details-link"><i class="bi bi-link-45deg"></i></a>
|
||||
<a href="<?php echo $baseUrl; ?>/portfolio-details" title="更多详情" class="details-link"><i class="bi bi-link-45deg"></i></a>
|
||||
</div>
|
||||
</div><!-- End Portfolio Item -->
|
||||
|
||||
@@ -71,7 +71,7 @@ require_once __DIR__ . '/header.php';
|
||||
<h4>书籍 1</h4>
|
||||
<p>Lorem ipsum, dolor sit amet consectetur</p>
|
||||
<a href="<?php echo $baseUrl; ?>/themes/template3/assets/img/portfolio/books-1.jpg" title="品牌 1" data-gallery="portfolio-gallery-book" class="glightbox preview-link"><i class="bi bi-zoom-in"></i></a>
|
||||
<a href="<?php echo $baseUrl; ?>/portfolio-details.php" title="更多详情" class="details-link"><i class="bi bi-link-45deg"></i></a>
|
||||
<a href="<?php echo $baseUrl; ?>/portfolio-details" title="更多详情" class="details-link"><i class="bi bi-link-45deg"></i></a>
|
||||
</div>
|
||||
</div><!-- End Portfolio Item -->
|
||||
|
||||
@@ -81,7 +81,7 @@ require_once __DIR__ . '/header.php';
|
||||
<h4>应用 2</h4>
|
||||
<p>Lorem ipsum, dolor sit amet consectetur</p>
|
||||
<a href="<?php echo $baseUrl; ?>/themes/template3/assets/img/portfolio/app-2.jpg" title="应用 2" data-gallery="portfolio-gallery-app" class="glightbox preview-link"><i class="bi bi-zoom-in"></i></a>
|
||||
<a href="<?php echo $baseUrl; ?>/portfolio-details.php" title="更多详情" class="details-link"><i class="bi bi-link-45deg"></i></a>
|
||||
<a href="<?php echo $baseUrl; ?>/portfolio-details" title="更多详情" class="details-link"><i class="bi bi-link-45deg"></i></a>
|
||||
</div>
|
||||
</div><!-- End Portfolio Item -->
|
||||
|
||||
@@ -91,7 +91,7 @@ require_once __DIR__ . '/header.php';
|
||||
<h4>产品 2</h4>
|
||||
<p>Lorem ipsum, dolor sit amet consectetur</p>
|
||||
<a href="<?php echo $baseUrl; ?>/themes/template3/assets/img/portfolio/product-2.jpg" title="产品 2" data-gallery="portfolio-gallery-product" class="glightbox preview-link"><i class="bi bi-zoom-in"></i></a>
|
||||
<a href="<?php echo $baseUrl; ?>/portfolio-details.php" title="更多详情" class="details-link"><i class="bi bi-link-45deg"></i></a>
|
||||
<a href="<?php echo $baseUrl; ?>/portfolio-details" title="更多详情" class="details-link"><i class="bi bi-link-45deg"></i></a>
|
||||
</div>
|
||||
</div><!-- End Portfolio Item -->
|
||||
|
||||
@@ -101,7 +101,7 @@ require_once __DIR__ . '/header.php';
|
||||
<h4>品牌 2</h4>
|
||||
<p>Lorem ipsum, dolor sit amet consectetur</p>
|
||||
<a href="<?php echo $baseUrl; ?>/themes/template3/assets/img/portfolio/branding-2.jpg" title="品牌 2" data-gallery="portfolio-gallery-branding" class="glightbox preview-link"><i class="bi bi-zoom-in"></i></a>
|
||||
<a href="<?php echo $baseUrl; ?>/portfolio-details.php" title="更多详情" class="details-link"><i class="bi bi-link-45deg"></i></a>
|
||||
<a href="<?php echo $baseUrl; ?>/portfolio-details" title="更多详情" class="details-link"><i class="bi bi-link-45deg"></i></a>
|
||||
</div>
|
||||
</div><!-- End Portfolio Item -->
|
||||
|
||||
@@ -111,7 +111,7 @@ require_once __DIR__ . '/header.php';
|
||||
<h4>书籍 2</h4>
|
||||
<p>Lorem ipsum, dolor sit amet consectetur</p>
|
||||
<a href="<?php echo $baseUrl; ?>/themes/template3/assets/img/portfolio/books-2.jpg" title="品牌 2" data-gallery="portfolio-gallery-book" class="glightbox preview-link"><i class="bi bi-zoom-in"></i></a>
|
||||
<a href="<?php echo $baseUrl; ?>/portfolio-details.php" title="更多详情" class="details-link"><i class="bi bi-link-45deg"></i></a>
|
||||
<a href="<?php echo $baseUrl; ?>/portfolio-details" title="更多详情" class="details-link"><i class="bi bi-link-45deg"></i></a>
|
||||
</div>
|
||||
</div><!-- End Portfolio Item -->
|
||||
|
||||
@@ -121,7 +121,7 @@ require_once __DIR__ . '/header.php';
|
||||
<h4>应用 3</h4>
|
||||
<p>Lorem ipsum, dolor sit amet consectetur</p>
|
||||
<a href="<?php echo $baseUrl; ?>/themes/template3/assets/img/portfolio/app-3.jpg" title="应用 3" data-gallery="portfolio-gallery-app" class="glightbox preview-link"><i class="bi bi-zoom-in"></i></a>
|
||||
<a href="<?php echo $baseUrl; ?>/portfolio-details.php" title="更多详情" class="details-link"><i class="bi bi-link-45deg"></i></a>
|
||||
<a href="<?php echo $baseUrl; ?>/portfolio-details" title="更多详情" class="details-link"><i class="bi bi-link-45deg"></i></a>
|
||||
</div>
|
||||
</div><!-- End Portfolio Item -->
|
||||
|
||||
@@ -131,7 +131,7 @@ require_once __DIR__ . '/header.php';
|
||||
<h4>产品 3</h4>
|
||||
<p>Lorem ipsum, dolor sit amet consectetur</p>
|
||||
<a href="<?php echo $baseUrl; ?>/themes/template3/assets/img/portfolio/product-3.jpg" title="产品 3" data-gallery="portfolio-gallery-product" class="glightbox preview-link"><i class="bi bi-zoom-in"></i></a>
|
||||
<a href="<?php echo $baseUrl; ?>/portfolio-details.php" title="更多详情" class="details-link"><i class="bi bi-link-45deg"></i></a>
|
||||
<a href="<?php echo $baseUrl; ?>/portfolio-details" title="更多详情" class="details-link"><i class="bi bi-link-45deg"></i></a>
|
||||
</div>
|
||||
</div><!-- End Portfolio Item -->
|
||||
|
||||
@@ -141,7 +141,7 @@ require_once __DIR__ . '/header.php';
|
||||
<h4>品牌 3</h4>
|
||||
<p>Lorem ipsum, dolor sit amet consectetur</p>
|
||||
<a href="<?php echo $baseUrl; ?>/themes/template3/assets/img/portfolio/branding-3.jpg" title="品牌 2" data-gallery="portfolio-gallery-branding" class="glightbox preview-link"><i class="bi bi-zoom-in"></i></a>
|
||||
<a href="<?php echo $baseUrl; ?>/portfolio-details.php" title="更多详情" class="details-link"><i class="bi bi-link-45deg"></i></a>
|
||||
<a href="<?php echo $baseUrl; ?>/portfolio-details" title="更多详情" class="details-link"><i class="bi bi-link-45deg"></i></a>
|
||||
</div>
|
||||
</div><!-- End Portfolio Item -->
|
||||
|
||||
@@ -151,7 +151,7 @@ require_once __DIR__ . '/header.php';
|
||||
<h4>书籍 3</h4>
|
||||
<p>Lorem ipsum, dolor sit amet consectetur</p>
|
||||
<a href="<?php echo $baseUrl; ?>/themes/template3/assets/img/portfolio/books-3.jpg" title="品牌 3" data-gallery="portfolio-gallery-book" class="glightbox preview-link"><i class="bi bi-zoom-in"></i></a>
|
||||
<a href="<?php echo $baseUrl; ?>/portfolio-details.php" title="更多详情" class="details-link"><i class="bi bi-link-45deg"></i></a>
|
||||
<a href="<?php echo $baseUrl; ?>/portfolio-details" title="更多详情" class="details-link"><i class="bi bi-link-45deg"></i></a>
|
||||
</div>
|
||||
</div><!-- End Portfolio Item -->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user