yjryu / KERIS star
류윤주 류윤주 2023-11-16
231116 류윤주 홍보뉴스 커밋
@fdf76b9bedca70b3d641ab76948df4901c767c66
client/resources/css/Main.css
--- client/resources/css/Main.css
+++ client/resources/css/Main.css
@@ -90,9 +90,10 @@
   height: 100%;
   padding: 60px;
 }
-.swiper-slide div img {
-  border: 1px solid red;
+.swiper-slide .modal-img img {
+  width: 100%;
 }
+
 .main-puzzle-container {
   margin: 0 auto;
   display: grid;
@@ -270,12 +271,15 @@
 .main-wrap-news {
   width: 100%;
   height: 100%;
-  padding: 30px;
 }
 
 .main-wrap-news-hidden {
   width: 100%;
   margin: 0 auto;
+}
+
+.main-wrap-news-hidden .swiper{
+  padding: 0 50px;
 }
 
 .main-wrap-news h3 {
@@ -1094,11 +1098,7 @@
   box-shadow: 2px 2px 5px #8484847c;
 }
 
-.modal-img {
-  width: 100%;
-  height: 180px;
-  margin-bottom: 30px;
-}
+
 
 .news-bos-box div h3 {
   font-size: 1.7rem;
@@ -2442,10 +2442,8 @@
   color: aliceblue;
 }
 
-.swiper {
+.main-benner .swiper {
   height: 260px;
-
-  /* text-align: center; */
   padding: 0px 50px 50px 50px;
 }
 
@@ -2456,16 +2454,6 @@
   /* box-shadow: 0px 0px 5px rgb(209, 209, 209);/ */
 }
 
-.swiper-div {
-  display: flex;
-  align-items: center;
-  flex-direction: column;
-}
-
-.swiper-div embed {
-  height: 230px;
-  width: 350px;
-}
 
 .swiper-div p {
   text-align: center;
@@ -2476,11 +2464,11 @@
 .swiper-slide {
   cursor: pointer;
 }
-.main-wrap-news-hidden .swiper-slide img {
+/* .main-wrap-news-hidden .swiper-slide img {
   width: 77%;
   padding: 1rem;
   margin-left: 4rem;
-}
+} */
 
 .swiper-notice {
   border-radius: 0.5rem;
client/views/pages/user/main/Main.vue
--- client/views/pages/user/main/Main.vue
+++ client/views/pages/user/main/Main.vue
@@ -10,8 +10,9 @@
                             <!-- 공지사항 배너 -->
                             <div class="main-notice">
                                 <h2> <i class="fa-solid fa-volume-high" style="color: #ffffff;"></i>공지사항</h2>
-                                <swiper :direction="'vertical'" :loop="true" :spaceBetween="8" :slidesPerView="1" :centeredSlides="false"
-                                    :navigation="false" :modules="modules" class="mySwiper swiper-notice" :autoplay="{
+                                <swiper :direction="'vertical'" :loop="true" :spaceBetween="8" :slidesPerView="1"
+                                    :centeredSlides="false" :navigation="false" :modules="modules"
+                                    class="mySwiper swiper-notice" :autoplay="{
                                         delay: 1000,
                                         disableOnInteraction: false,
                                     }">
@@ -138,7 +139,6 @@
 
                             <h3>홍보/뉴스</h3>
                             <div class="main-wrap-news-hidden">
-
                                 <swiper ref="mySwiper" :navigation="true" :pagination="false" :slidesPerView="3"
                                     :mousewheel="true" :initialSlide="2" :centeredSlides="false" :spaceBetween="55"
                                     :loop="true" :breakpoints="{
@@ -149,21 +149,15 @@
                                         1023: { slidesPerView: 3 }
                                     }" :modules="modules" class="mySwiper">
                                     <swiper-slide v-for="(item, idx) in postList" :key="idx">
-                                        <div class="swiper-div">
                                             <div class="modal-img" @click="openModal(item)">
                                                 <img :src="'http://localhost:8080' + item.file_path + '\\thumbnail_' + item.file_nm + '.' + item.file_extn_nm"
                                                     alt="thumbnail" />
                                                 <p>{{ item.post_title }}</p>
                                             </div>
-                                        </div>
                                     </swiper-slide>
                                 </swiper>
-
-
                             </div>
                         </div>
-
-
                     </div>
                 </div>
 
@@ -462,28 +456,29 @@
             this.$router.push({ path: '/NoticeOne.page', query: { 'post_id': item.post_id, 'file_id': item.file_id } });
         },
 
-        swiperInit:function() {
-      this.$nextTick(() => {
-        if (this.swiper) {
-          this.swiper.destroy();
-        }
-        this.swiper = new Swiper('.swiper-notice', {
-          direction: 'vertical',
-          pagination: {
-            clickable: true,
-          },
-          loop: true,
-          spaceBetween: 8,
-          slidesPerView: 1,
-          centeredSlides: false,
-          navigation: false,
-          autoplay: {
-            delay: 1000,
-            disableOnInteraction: false,
-          }
-        });
-      });
-    },
+        swiperInit: function () {
+            console.log("2::::::")
+            this.$nextTick(() => {
+                if (this.swiper) {
+                    this.swiper.destroy();
+                }
+                this.swiper = new Swiper('.swiper-notice', {
+                    direction: 'vertical',
+                    pagination: {
+                        clickable: true,
+                    },
+                    loop: true,
+                    spaceBetween: 8,
+                    slidesPerView: 1,
+                    centeredSlides: false,
+                    navigation: false,
+                    autoplay: {
+                        delay: 1000,
+                        disableOnInteraction: false,
+                    }
+                });
+            });
+        },
     },
     watch: {
 
Add a comment
List