123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- <?php
- // 轮播图数据 - 修改为单张图片
- $carouselItems = [
- [
- "image" => "/images/test-header-7.png",
- "alt" => "政策法规"
- ]
- ];
- // 政策法规数据
- $policyItems = [
- ["title" => "文字占位符", "date" => "2025-12-07"],
- ["title" => "文字占位符", "date" => "2025-12-07"],
- ["title" => "文字占位符", "date" => "2025-12-07"],
- ["title" => "文字占位符", "date" => "2025-12-07"],
- ["title" => "文字占位符", "date" => "2025-12-07"],
- ["title" => "文字占位符", "date" => "2025-12-07"],
- ["title" => "文字占位符", "date" => "2025-12-07"],
- ["title" => "文字占位符", "date" => "2025-12-07"],
- ["title" => "文字占位符", "date" => "2025-12-07"],
- ["title" => "文字占位符", "date" => "2025-12-07"],
- ["title" => "文字占位符", "date" => "2025-12-07"],
- ["title" => "文字占位符", "date" => "2025-12-07"]
- ];
- // 分页数据
- $totalPages = 5;
- $currentPage = 1;
- ?>
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>厦门市文化遗产保护中心 - 政策法规</title>
- <link rel="stylesheet" href="/css/fonts.css">
- <link rel="stylesheet" href="/css/fontawesome.min.css">
- <link rel="stylesheet" href="/css/bootstrap.min.css">
- <link rel="stylesheet" href="/css/swiper-bundle.min.css">
- <link rel="stylesheet" href="/css/style.css">
- <script src="/js/jquery-3.7.1.js"></script>
- <script src="/js/bootstrap.bundle.js"></script>
- <script src="/js/swiper-bundle.min.js"></script>
- </head>
- <body>
- <?php include __DIR__ . '/components/navbar.php'; ?>
- <!-- 轮播图 -->
- <div class="swiper mySwiper" style="width: 100%; height: 400px;">
- <div class="swiper-wrapper">
- <?php foreach ($carouselItems as $item): ?>
- <div class="swiper-slide">
- <img src="<?php echo $item['image']; ?>" alt="<?php echo $item['alt']; ?>" style="width: 100%; height: 100%; object-fit: cover;">
- </div>
- <?php endforeach; ?>
- </div>
- <div class="swiper-pagination"></div>
- <div class="swiper-button-prev"></div>
- <div class="swiper-button-next"></div>
- </div>
- <!-- 主要内容 -->
- <div class="main-content">
- <div class="container">
- <div class="row">
- <!-- 右侧内容 -->
- <div class="col-12">
- <div class="content">
- <div class="section-title center large">
- <h2 class="icon">政策法规</h2>
- </div>
-
- <!-- 搜索区域 -->
- <div class="d-flex justify-content-center align-items-center gap-3 mb-4">
- <button class="bordered active">国家法律法规</button>
- <button class="bordered">地方政策文件</button>
- <div class="bordered-input">
- <input type="text" placeholder="输入关键字搜索政策法规">
- </div>
- <button class="bordered active">搜索</button>
- </div>
-
- <!-- 文章列表 -->
- <div class="news-list">
- <?php foreach ($policyItems as $item): ?>
- <div class="news-item dark">
- <a href="./xinWenXiangQing.php?id=<?php echo urlencode($item['title']); ?>" class="title"><?php echo $item['title']; ?></a>
- <span class="date"><?php echo $item['date']; ?></span>
- </div>
- <?php endforeach; ?>
- </div>
-
- <!-- 分页 -->
- <nav aria-label="List Page navigation">
- <ul class="pagination mt-4">
- <?php for ($i = 1; $i <= $totalPages; $i++): ?>
- <li class="<?php echo $i == $currentPage ? 'active' : ''; ?>"><a href="?page=<?php echo $i?>"><?php echo $i; ?></a></li>
- <?php endfor; ?>
- </ul>
- </nav>
- </div>
- </div>
- </div>
- </div>
- </div>
- <?php include __DIR__ . '/components/footer.php'; ?>
- <script>
- $(document).ready(function() {
- // 初始化 Swiper
- const swiper = new Swiper(".mySwiper", {
- slidesPerView: 1,
- spaceBetween: 30,
- loop: true,
- pagination: {
- el: ".swiper-pagination",
- clickable: true,
- },
- navigation: {
- nextEl: ".swiper-button-next",
- prevEl: ".swiper-button-prev",
- },
- autoplay: {
- delay: 5000,
- disableOnInteraction: false,
- },
- });
-
- });
- </script>
- </body>
- </html>
|