Ver Fonte

放开swiper注释,修改联系页面content图像

littlegreen há 4 meses atrás
pai
commit
d0fc3b45f2

+ 14 - 7
cms-editor/templates/default_v5/contact_list.html

@@ -35,13 +35,20 @@
     <script type="text/javascript" src="{dreamer-cms:template /}assets/js/wow.min.js"></script>
     <script src="{dreamer-cms:template /}assets/js/main.js"></script>
     <script>
-        $(document).ready(function () {
-            var imgWidth = $("#contact-img").width()
-            $("#contact .ueditor_baidumap").attr("width", imgWidth)
-            var params = new URLSearchParams($("#contact .ueditor_baidumap").attr("src"))
-            params.set('width', imgWidth);
-            $("#contact .ueditor_baidumap").attr("src", decodeURIComponent(params.toString()))
-        }); 
+        $(function () {
+            var pArr = document.querySelectorAll("#contact p")
+            pArr.forEach(element => {
+                element.style.width = "100%"
+            });
+            var imgArr = document.querySelectorAll("#contact img")
+            imgArr.forEach(i => {
+                i.style.width = "100%"
+                i.style.height = "auto"
+                let src = i.getAttribute("src")
+                i.setAttribute("data-src", src)
+                i.setAttribute("src", "{dreamer-cms:template /}assets/img/none.png")
+            });
+        })
     </script>
     <script src="{dreamer-cms:template /}assets/bootstrap/js/bootstrap.min.js"></script>
     <script src="{dreamer-cms:template /}assets/js/bs-init.js"></script>

+ 1 - 1
cms-editor/templates/default_v5/header.html

@@ -39,7 +39,7 @@
 
 <body style="margin: 0px;">
     <header>
-        <div class=" pt-xl-4" style="margin: 0 auto;padding: 0;">
+        <div class=" pt-xl-2" style="margin: 0 auto;padding: 0;">
             <nav class="navbar navbar-expand-md bg-body pt-3" style="width: 100%;">
                 <div class="nav-bar-box px-1 px-sm-2 px-md-2 px-l-3 px-xl-4">
                     <a class="navbar-brand d-flex align-items-center" href="/">

+ 3 - 3
cms-editor/templates/default_v5/swiper.html

@@ -54,9 +54,9 @@
   <script>
     var mySwiper = new Swiper('.swiper', {
       // direction: 'vertical', // 垂直切换选项
-      autoplay: {
-        delay: 3500
-      },
+      // autoplay: {
+      //   delay: 3500
+      // },
       loop: true, // 循环模式选项
       // 如果需要分页器
       pagination: {

+ 1 - 1
cms-editor/templates/default_v5/work_content.html

@@ -29,7 +29,7 @@
         </section>
         <section class="py-4 py-md-5 py-xl-8">
             <div class="overflow-hidden pt-2 pt-md-1 pt-xl-6" style="margin: 0 auto;padding: 0;">
-                <div id="content">
+                <div id="content" class="px-1 px-sm-2 px-md-2 px-l-3 px-xl-4">
                     {dreamer-cms:article field="content" /}
                 </div>
             </div>