diff --git a/src/assets/affect_sample1.png b/src/assets/affect_sample1.png new file mode 100644 index 0000000..1940ebc Binary files /dev/null and b/src/assets/affect_sample1.png differ diff --git a/src/assets/affect_sample2.png b/src/assets/affect_sample2.png new file mode 100644 index 0000000..0132aa2 Binary files /dev/null and b/src/assets/affect_sample2.png differ diff --git a/src/assets/affect_sample3.png b/src/assets/affect_sample3.png new file mode 100644 index 0000000..0dcf67c Binary files /dev/null and b/src/assets/affect_sample3.png differ diff --git a/src/components/mainpage/slideSection/index.tsx b/src/components/mainpage/slideSection/index.tsx index d1249a3..a1be2c3 100644 --- a/src/components/mainpage/slideSection/index.tsx +++ b/src/components/mainpage/slideSection/index.tsx @@ -2,7 +2,7 @@ import React from "react"; import { ImgBox, SlideWrapper, - SlideElement, + TitleBox, } from "../../../styles/mainpage/slideSection"; import { Text } from "../../common"; @@ -11,12 +11,11 @@ import "swiper/css"; import "swiper/css/pagination"; import "swiper/css/navigation"; import { Pagination, Navigation } from "swiper"; +import sample1 from "../../../assets/affect_sample1.png"; +import SlideNextButton from "./SlideNextButton"; function SlideSection() { const slideList = [ - "https://image.fmkorea.com/files/attach/new/20180627/486616/53929437/1125408696/3d94f3de6495906341f10d941b69ec3c.jpeg", - "https://cdn.clien.net/web/api/file/F01/11493442/9bf8a4bfc1ce2e.jpg", - "https://photo.coolenjoy.co.kr/data/editor/1608/Bimg_20160830182658_rnuhpunc.jpg", "https://mblogthumb-phinf.pstatic.net/MjAyMjAxMjVfMTAg/MDAxNjQzMTAyOTg0ODA5.q_DQWr2DSXnLYALcvh7u9o8DLZbD6OixJWa_Y7bwv4Yg.IHgg6s43ZkW0jRw3kKxr0WWrccnHJ0HflOYCbDVdGwog.JPEG.minziminzi128/IMG_7369.JPG?type=w800", "https://pds.joongang.co.kr/news/component/htmlphoto_mmdata/202111/07/762ce144-d666-4790-8609-c78416910e88.jpg", ]; @@ -36,14 +35,16 @@ function SlideSection() { clickable: true, }} navigation={true} + loopAdditionalSlides={2} > {slideList.map((item, idx): JSX.Element => { return ( - - {idx} - - + + + title + + ` @@ -18,16 +17,9 @@ export const ImgBox = styled.div<{ title: string; content: string }>` background-image: ${(props) => props.content}; `; -export const SlideElement = styled.div` - border-radius: 10px; - width: 100%; - height: 325px; - background-size: cover; -`; - -export const NextElement = styled.div` - border-radius: 10px; - width: 50%; - height: 325px; - background-size: cover; +export const TitleBox = styled.div` + position: absolute; + top: 80%; + left: 5%; + width: 30%; `; diff --git a/src/styles/reset.ts b/src/styles/reset.ts index b8de9c7..7ed2242 100644 --- a/src/styles/reset.ts +++ b/src/styles/reset.ts @@ -138,6 +138,7 @@ const reset = css` width: 500px; height: 325px; overflow: visible; + position: relative; } .swiper-slide { align-items: center; @@ -154,5 +155,15 @@ const reset = css` .swiper-slide-active + .swiper-slide + .swiper-slide + .swiper-slide { opacity: 1; } + .swiper-button-prev::after { + opacity: 0; + display: none; + } + .swiper-button-next::after { + color: white; + margin-top: 220px; + margin-right: 30px; + font-size: 30px; + } `; export default reset;