luDaoWenMai.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <?php
  2. // 轮播图数据 - 修改为单张图片
  3. $carouselItems = [
  4. [
  5. "image" => "/images/test-header-6.png",
  6. "alt" => "鹭岛文脉"
  7. ]
  8. ];
  9. // 鹭岛文脉数据
  10. $luDaoItems = [
  11. [
  12. "image" => "/images/test-header-1.png",
  13. "alt" => "传统工艺展示",
  14. "title" => "厦门市文化和旅游局关于2025年厦门市乡村旅游高质量发展的通知"
  15. ],
  16. [
  17. "image" => "/images/test-header-2.png",
  18. "alt" => "古建筑保护",
  19. "title" => "厦门市文化和旅游局关于2025年厦门市乡村旅游高质量发展的通知"
  20. ],
  21. [
  22. "image" => "/images/test-header-3.png",
  23. "alt" => "非遗传承人采访",
  24. "title" => "厦门市文化和旅游局关于2025年厦门市乡村旅游高质量发展的通知"
  25. ],
  26. [
  27. "image" => "/images/test-header-4.png",
  28. "alt" => "文化遗产展览",
  29. "title" => "厦门市文化和旅游局关于2025年厦门市乡村旅游高质量发展的通知"
  30. ],
  31. [
  32. "image" => "/images/test-header-6.png",
  33. "alt" => "民俗活动",
  34. "title" => "厦门市文化和旅游局关于2025年厦门市乡村旅游高质量发展的通知"
  35. ],
  36. [
  37. "image" => "/images/test-header-7.png",
  38. "alt" => "历史街区改造",
  39. "title" => "厦门市文化和旅游局关于2025年厦门市乡村旅游高质量发展的通知"
  40. ]
  41. ];
  42. ?>
  43. <!DOCTYPE html>
  44. <html lang="zh-CN">
  45. <head>
  46. <meta charset="UTF-8">
  47. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  48. <title>厦门市文化遗产保护中心 - 鹭岛文脉</title>
  49. <link rel="stylesheet" href="/css/fonts.css">
  50. <link rel="stylesheet" href="/css/fontawesome.min.css">
  51. <link rel="stylesheet" href="/css/bootstrap.min.css">
  52. <link rel="stylesheet" href="/css/swiper-bundle.min.css">
  53. <link rel="stylesheet" href="/css/style.css">
  54. <script src="/js/jquery-3.7.1.js"></script>
  55. <script src="/js/bootstrap.bundle.js"></script>
  56. <script src="/js/swiper-bundle.min.js"></script>
  57. </head>
  58. <body>
  59. <?php include __DIR__ . '/components/navbar.php'; ?>
  60. <!-- 轮播图 -->
  61. <div class="swiper mySwiper" style="width: 100%; height: 400px;">
  62. <div class="swiper-wrapper">
  63. <?php foreach ($carouselItems as $item): ?>
  64. <div class="swiper-slide">
  65. <img src="<?php echo $item['image']; ?>" alt="<?php echo $item['alt']; ?>" style="width: 100%; height: 100%; object-fit: cover;">
  66. </div>
  67. <?php endforeach; ?>
  68. </div>
  69. <div class="swiper-pagination"></div>
  70. <div class="swiper-button-prev"></div>
  71. <div class="swiper-button-next"></div>
  72. </div>
  73. <!-- 主要内容 -->
  74. <div class="main-content">
  75. <div class="container">
  76. <div class="content">
  77. <!-- 精彩推荐网格布局 -->
  78. <div class="featured-section">
  79. <div class="section-title center large">
  80. <h2 class="icon">鹭岛文脉</h2>
  81. </div>
  82. <div class="featured-grid">
  83. <?php foreach ($luDaoItems as $item): ?>
  84. <div class="featured-card">
  85. <img src="<?php echo $item['image']; ?>" alt="<?php echo $item['alt']; ?>">
  86. <p><?php echo $item['title']; ?></p>
  87. </div>
  88. <?php endforeach; ?>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. <?php include __DIR__ . '/components/footer.php'; ?>
  96. <script>
  97. $(document).ready(function() {
  98. // 初始化 Swiper
  99. const swiper = new Swiper(".mySwiper", {
  100. slidesPerView: 1,
  101. spaceBetween: 30,
  102. loop: true,
  103. pagination: {
  104. el: ".swiper-pagination",
  105. clickable: true,
  106. },
  107. navigation: {
  108. nextEl: ".swiper-button-next",
  109. prevEl: ".swiper-button-prev",
  110. },
  111. autoplay: {
  112. delay: 5000,
  113. disableOnInteraction: false,
  114. },
  115. });
  116. });
  117. </script>
  118. </body>
  119. </html>