From 31e24d6e9ef886ae342f7aa5d6783402880e8d52 Mon Sep 17 00:00:00 2001 From: com02 Date: Mon, 6 Dec 2021 15:27:10 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=91=EA=B7=BC=EC=84=B1=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jsp/nlib/collection/searchItemDetail.jsp | 59 ++++++++++++++----- .../webapp/WEB-INF/tiles/tiles-layout.jsp | 5 +- src/main/webapp/css/default.css | 23 +++++++- src/main/webapp/css/media.css | 4 ++ src/main/webapp/js/default.js | 14 ++++- 5 files changed, 86 insertions(+), 19 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/nlib/collection/searchItemDetail.jsp b/src/main/webapp/WEB-INF/jsp/nlib/collection/searchItemDetail.jsp index ec6e308b..c40ffead 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/collection/searchItemDetail.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/collection/searchItemDetail.jsp @@ -428,7 +428,13 @@ function goList(){
-
+ @@ -470,7 +476,13 @@ function goList(){
-
+ @@ -525,7 +537,7 @@ function goList(){ } /* 함께 볼만한자료 슬라이드 */ - var swiper = new Swiper('.DetailSwiper1', { + var detailswiper1 = new Swiper('.DetailSwiper1', { loop: false, slidesPerView: _slidesPerView, spaceBetween: 30, @@ -538,12 +550,10 @@ function goList(){ nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev", }, - /* pagination: { - el: ".swiper-pagination", - clickable: true, - }, - */ + el: '.pagination .swiper-pagination', + type: 'fraction', + }, on: { init: function () { if (this.slides.length <= _lenght) { @@ -551,6 +561,7 @@ function goList(){ this.allowSlidePrev = this.allowSlideNext = false; // disabling swiping this.el.querySelector(".swiper-button-prev").style.visibility = "hidden"; // hiding arrows prev&next this.el.querySelector(".swiper-button-next").style.visibility = "hidden"; + this.el.querySelector(".pagination").style.visibility = "hidden"; } } } @@ -569,8 +580,8 @@ function goList(){ } /* 유사한 자료 슬라이드 */ - var swiper = new Swiper('.DetailSwiper2', { - loop: true, + var detailswiper2 = new Swiper('.DetailSwiper2', { + loop: false, slidesPerView: _slidesPerViewBottom, spaceBetween: _spaceBetween, centeredSlides: true, @@ -582,12 +593,10 @@ function goList(){ nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev", }, - /* pagination: { - el: ".swiper-pagination", - clickable: true, - }, - */ + el: '.pagination .swiper-pagination', + type: 'fraction', + }, on: { init: function () { if (this.slides.length <= _lenght) { @@ -595,9 +604,29 @@ function goList(){ this.allowSlidePrev = this.allowSlideNext = false; // disabling swiping this.el.querySelector(".swiper-button-prev").style.visibility = "hidden"; // hiding arrows prev&next this.el.querySelector(".swiper-button-next").style.visibility = "hidden"; + this.el.querySelector(".pagination").style.visibility = "hidden"; } } } }); + + $('.remote-detail1').click(function () { + if($(this).hasClass('restart')){ + $(this).removeClass('restart'); + detailswiper1.autoplay.start(); + }else{ + $(this).addClass('restart'); + detailswiper1.autoplay.stop(); + } + }); + $('.remote-detail2').click(function () { + if($(this).hasClass('restart')){ + $(this).removeClass('restart'); + detailswiper2.autoplay.start(); + }else{ + $(this).addClass('restart'); + detailswiper2.autoplay.stop(); + } + }); \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/tiles/tiles-layout.jsp b/src/main/webapp/WEB-INF/tiles/tiles-layout.jsp index c713181f..a407dcff 100644 --- a/src/main/webapp/WEB-INF/tiles/tiles-layout.jsp +++ b/src/main/webapp/WEB-INF/tiles/tiles-layout.jsp @@ -50,6 +50,7 @@ function fn_setPageTitle(title) { +
본문 바로가기
@@ -65,8 +66,10 @@ function fn_setPageTitle(title) {
+
- +
+