@daeryun/dr_components 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/components/MapFix/AreaImage.d.ts +10 -0
- package/dist/components/MapFix/AreaImage.jsx +39 -0
- package/dist/components/MapFix/AreaImage.tsx +94 -0
- package/dist/components/MapFix/MapFix.d.ts +11 -0
- package/dist/components/MapFix/MapFix.jsx +108 -0
- package/dist/components/MapFix/MapFix.tsx +173 -0
- package/dist/components/banner/TopBanner.d.ts +4 -0
- package/dist/components/banner/TopBanner.jsx +239 -0
- package/dist/components/banner/TopBanner.module.css +111 -0
- package/dist/components/banner/TopBanner.tsx +341 -0
- package/dist/components/common/index.d.ts +1 -13
- package/dist/components/common/index.js +144 -191
- package/dist/components/common/index.ts +148 -210
- package/dist/components/index.js +1 -4
- package/dist/components/index.ts +1 -4
- package/dist/lib/utils.d.ts +7 -17
- package/dist/lib/utils.js +195 -126
- package/dist/lib/utils.ts +185 -119
- package/dist/styles/globals.css +277 -13
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -3
- package/dist/components/Cat/index.d.ts +0 -3
- package/dist/components/Cat/index.jsx +0 -9
- package/dist/components/Cat/index.tsx +0 -19
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import Image from 'next/image';
|
|
3
|
+
import { newNapAreaMobile } from '../common';
|
|
4
|
+
import AreaImage from './AreaImage';
|
|
5
|
+
|
|
6
|
+
import SwiperCore from 'swiper';
|
|
7
|
+
import Swiper from 'swiper';
|
|
8
|
+
|
|
9
|
+
import 'swiper/css';
|
|
10
|
+
import 'swiper/css/grid';
|
|
11
|
+
import 'swiper/css/pagination';
|
|
12
|
+
import 'swiper/swiper-bundle.css';
|
|
13
|
+
import { SwiperSlide } from 'swiper/react';
|
|
14
|
+
import Link from 'next/link';
|
|
15
|
+
import { useRouter } from 'next/router';
|
|
16
|
+
import { Pagination } from 'swiper/modules';
|
|
17
|
+
|
|
18
|
+
SwiperCore.use([Pagination]);
|
|
19
|
+
|
|
20
|
+
const MapFix = (props: { selectRegion: string; mapFixOpen: boolean; onClose: () => void }) => {
|
|
21
|
+
const { selectRegion, mapFixOpen, onClose } = props;
|
|
22
|
+
const router = useRouter();
|
|
23
|
+
|
|
24
|
+
const [mapAreas, setMapAreas] = useState<{ name: string; desc: string; url: string; src: string }[]>([]);
|
|
25
|
+
const [isShow, setIsShow] = useState<boolean>(true);
|
|
26
|
+
|
|
27
|
+
const swiper = useRef<Swiper | null>(null);
|
|
28
|
+
const divRef = useRef<HTMLDivElement>(null);
|
|
29
|
+
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
if (mapFixOpen) {
|
|
32
|
+
swiper.current = new Swiper('#swiper-container-map', {
|
|
33
|
+
modules: [Pagination],
|
|
34
|
+
slidesPerView: 1,
|
|
35
|
+
pagination: {
|
|
36
|
+
el: '#map-pagination',
|
|
37
|
+
clickable: true,
|
|
38
|
+
bulletClass: 'map-fix-swiper-pagination-inactive',
|
|
39
|
+
bulletActiveClass: 'map-fix-swiper-pagination-active'
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
swiper.current?.update();
|
|
43
|
+
|
|
44
|
+
return () => {
|
|
45
|
+
if (swiper.current && swiper.current?.destroy) {
|
|
46
|
+
swiper.current.destroy();
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
}, [selectRegion, mapAreas, mapFixOpen]);
|
|
51
|
+
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
const handleClickOutside = (event: MouseEvent) => {
|
|
54
|
+
const map = document.getElementById('map');
|
|
55
|
+
const banner = document.getElementById('bottom-banner');
|
|
56
|
+
if (
|
|
57
|
+
divRef.current &&
|
|
58
|
+
!divRef.current.contains(event.target as Node) &&
|
|
59
|
+
!(map && map.contains(event.target as Node)) &&
|
|
60
|
+
!(banner && banner.contains(event.target as Node))
|
|
61
|
+
) {
|
|
62
|
+
onClose();
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
67
|
+
|
|
68
|
+
return () => {
|
|
69
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
70
|
+
};
|
|
71
|
+
}, [divRef]);
|
|
72
|
+
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
const data = newNapAreaMobile[selectRegion];
|
|
75
|
+
setMapAreas(data);
|
|
76
|
+
}, [selectRegion]);
|
|
77
|
+
|
|
78
|
+
useEffect(() => {
|
|
79
|
+
onClose();
|
|
80
|
+
if (router.pathname === '/') {
|
|
81
|
+
setIsShow(true);
|
|
82
|
+
} else {
|
|
83
|
+
setIsShow(false);
|
|
84
|
+
}
|
|
85
|
+
}, [router.pathname]);
|
|
86
|
+
|
|
87
|
+
return isShow ? (
|
|
88
|
+
<div
|
|
89
|
+
ref={divRef}
|
|
90
|
+
className={
|
|
91
|
+
'overflow-hidden rounded-t-[10px] bg-[#fff] shadow-[0px_-3px_6px_#00000029] transition-[transform,height] duration-700 ease-linear md:hidden ' +
|
|
92
|
+
(mapFixOpen ? ' h-[400px] translate-y-0 ' : ' z-0 h-[0px] translate-y-[500px] ')
|
|
93
|
+
}
|
|
94
|
+
>
|
|
95
|
+
<div
|
|
96
|
+
className={'relative flex h-full w-full flex-col justify-between px-[30px] pb-10 pt-[30px] md:hidden '}
|
|
97
|
+
>
|
|
98
|
+
<span>
|
|
99
|
+
<Image
|
|
100
|
+
src={'/images/header/menu_x.webp'}
|
|
101
|
+
width={54}
|
|
102
|
+
height={54}
|
|
103
|
+
alt={'지도 레이어 팝업 닫기'}
|
|
104
|
+
className={'absolute right-5 top-5 h-[15px] w-[15px] cursor-pointer'}
|
|
105
|
+
draggable={false}
|
|
106
|
+
onClick={() => {
|
|
107
|
+
onClose();
|
|
108
|
+
}}
|
|
109
|
+
/>
|
|
110
|
+
<div>
|
|
111
|
+
<p className={'mb-[20px] text-center text-[20px] font-[700] leading-none'}>{selectRegion}</p>
|
|
112
|
+
|
|
113
|
+
<div
|
|
114
|
+
id={'swiper-container-map'}
|
|
115
|
+
className={'mx-auto h-[200px] w-full max-w-[300px] overflow-hidden'}
|
|
116
|
+
>
|
|
117
|
+
<span className={'swiper-wrapper h-full w-full'}>
|
|
118
|
+
{mapAreas && mapAreas.length > 0 ? (
|
|
119
|
+
[...Array(Math.ceil(mapAreas.length / 6))].map((_, wrapperIndex) => {
|
|
120
|
+
return (
|
|
121
|
+
<SwiperSlide
|
|
122
|
+
className={'mb-[5px] mr-[5px] !grid !grid-cols-3 !gap-[5px]'}
|
|
123
|
+
key={wrapperIndex}
|
|
124
|
+
>
|
|
125
|
+
{[...Array(6)].map((_, areaIndex) => {
|
|
126
|
+
const index = wrapperIndex * 6 + areaIndex;
|
|
127
|
+
return mapAreas[index] ? (
|
|
128
|
+
<AreaImage area={mapAreas[index]} key={areaIndex} />
|
|
129
|
+
) : (
|
|
130
|
+
<></>
|
|
131
|
+
);
|
|
132
|
+
})}
|
|
133
|
+
</SwiperSlide>
|
|
134
|
+
);
|
|
135
|
+
})
|
|
136
|
+
) : (
|
|
137
|
+
<></>
|
|
138
|
+
)}
|
|
139
|
+
</span>
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
<span
|
|
143
|
+
className={'mx-auto mt-1 flex h-[20px] !w-[46px] items-center justify-center gap-[3px]'}
|
|
144
|
+
id={'map-pagination'}
|
|
145
|
+
></span>
|
|
146
|
+
</span>
|
|
147
|
+
<Link
|
|
148
|
+
className={
|
|
149
|
+
'mx-auto flex h-[50px] w-[183px] items-center justify-between rounded-[40px] border border-solid border-black px-[20px] text-[16px] font-bold leading-none tracking-[-0.32px]'
|
|
150
|
+
}
|
|
151
|
+
href={'/map'}
|
|
152
|
+
onClick={() => {
|
|
153
|
+
onClose();
|
|
154
|
+
}}
|
|
155
|
+
>
|
|
156
|
+
VIEW MORE{' '}
|
|
157
|
+
<Image
|
|
158
|
+
width={52}
|
|
159
|
+
height={39}
|
|
160
|
+
draggable={'false'}
|
|
161
|
+
alt={''}
|
|
162
|
+
src={'https://daeryun-homepage.s3.ap-northeast-2.amazonaws.com/main_new/icon_arrow_black.webp'}
|
|
163
|
+
className={'h-auto w-[20px]'}
|
|
164
|
+
/>
|
|
165
|
+
</Link>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
) : (
|
|
169
|
+
<></>
|
|
170
|
+
);
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
export default MapFix;
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import style from './TopBanner.module.css';
|
|
11
|
+
import { useEffect, useState, useCallback } from 'react';
|
|
12
|
+
import 'swiper/css';
|
|
13
|
+
import { Swiper, SwiperSlide } from 'swiper/react';
|
|
14
|
+
import { Autoplay } from 'swiper/modules';
|
|
15
|
+
import Image from 'next/image';
|
|
16
|
+
import { useQuery } from 'react-query';
|
|
17
|
+
import { isCurrentTimeWithinPopupRange, paramFetch } from '../../lib';
|
|
18
|
+
import { DateTime } from 'luxon';
|
|
19
|
+
import classNames from 'classnames';
|
|
20
|
+
const TopBanner = () => {
|
|
21
|
+
//이미지 패스
|
|
22
|
+
const ImagePath = process.env.NEXT_PUBLIC_S3_URL + '';
|
|
23
|
+
//팝업 리스트
|
|
24
|
+
const [popup, setPopup] = useState([]);
|
|
25
|
+
const [isTop, setIsTop] = useState(true);
|
|
26
|
+
const addClickCnt = (idx) => {
|
|
27
|
+
paramFetch('https://mng.daeryunlaw.com/api/popup/top/click', { idx: idx }, null);
|
|
28
|
+
};
|
|
29
|
+
const handleScroll = useCallback(() => {
|
|
30
|
+
const scrollElm = document.scrollingElement;
|
|
31
|
+
if (scrollElm !== null) {
|
|
32
|
+
const scrollTop = Math.max(scrollElm.scrollTop, document.body.scrollTop);
|
|
33
|
+
if (scrollTop > 0) {
|
|
34
|
+
setIsTop(false);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
setIsTop(true);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}, []);
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
const handleScroll = () => {
|
|
43
|
+
setIsTop(window.scrollY <= 0);
|
|
44
|
+
};
|
|
45
|
+
// Add scroll event listener
|
|
46
|
+
window.addEventListener('scroll', handleScroll);
|
|
47
|
+
// Remove scroll event listener on component unmount
|
|
48
|
+
return () => {
|
|
49
|
+
window.removeEventListener('scroll', handleScroll);
|
|
50
|
+
};
|
|
51
|
+
}, []);
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
setIsTop(true);
|
|
54
|
+
document.addEventListener('scroll', handleScroll);
|
|
55
|
+
return () => {
|
|
56
|
+
document.removeEventListener('scroll', handleScroll); //clean up
|
|
57
|
+
};
|
|
58
|
+
}, [handleScroll]);
|
|
59
|
+
//userQuery
|
|
60
|
+
useQuery({
|
|
61
|
+
queryKey: ['popUpImg'],
|
|
62
|
+
queryFn: () => getPopUpData(),
|
|
63
|
+
//브라우저 화면을 focus할 때 새로 api를 호출할 건지 설정하는 옵션
|
|
64
|
+
refetchOnWindowFocus: false,
|
|
65
|
+
//기본설정 cacheTime:5분, staleTime:0초, 값을 Infinity로 설정할 경우 api return 값이 바뀌지 않는 이상 서버에 새로 요청하지 않고 캐싱된 데이터를 영구적으로 사용하여 api 호출 최적화
|
|
66
|
+
cacheTime: Infinity,
|
|
67
|
+
staleTime: Infinity,
|
|
68
|
+
onSuccess: (res) => {
|
|
69
|
+
const kstDateTime = DateTime.now().setZone('Asia/Seoul');
|
|
70
|
+
const nowDate = Number(kstDateTime.year + '' + zeroMaker(kstDateTime.month) + '' + zeroMaker(kstDateTime.day));
|
|
71
|
+
const nowTime = Number(zeroMaker(kstDateTime.hour) + zeroMaker(kstDateTime.minute));
|
|
72
|
+
const weekday = kstDateTime.weekdayShort + '';
|
|
73
|
+
const dateData = res.list.filter((item) => findDate(item, 'start') <= nowDate &&
|
|
74
|
+
findDate(item, 'end') >= nowDate &&
|
|
75
|
+
findDays(item, weekday) &&
|
|
76
|
+
findTime(item, nowTime));
|
|
77
|
+
setPopup(dateData.filter((item) => !(localStorage.getItem(item.idx + '_CloseTopPop') &&
|
|
78
|
+
Number(localStorage.getItem(item.idx + '_CloseTopPop')) > new Date().getTime())));
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
const findDays = (item, today) => {
|
|
82
|
+
if (item.days) {
|
|
83
|
+
return item.days.includes(today);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
const findDate = (item, key) => {
|
|
90
|
+
if (key === 'start') {
|
|
91
|
+
const start = new Date(item.start_at).toISOString().split('T');
|
|
92
|
+
return Number(start[0].split('-')[0] + start[0].split('-')[1] + start[0].split('-')[2]);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
const end = new Date(item.end_at).toISOString().split('T');
|
|
96
|
+
return Number(end[0].split('-')[0] + end[0].split('-')[1] + end[0].split('-')[2]);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
const findTime = (item, nowTime) => {
|
|
100
|
+
if (item.start_hour === null || item.start_min === null || item.end_hour === null || item.end_min === null) {
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
const start = Number(zeroMaker(item.start_hour) + zeroMaker(item.start_min));
|
|
104
|
+
const end = Number(zeroMaker(item.end_hour) + zeroMaker(item.end_min));
|
|
105
|
+
if (start < end) {
|
|
106
|
+
if (start <= nowTime && end >= nowTime) {
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
if (nowTime >= start) {
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
else if (nowTime <= end) {
|
|
118
|
+
return true;
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
const zeroMaker = (x) => {
|
|
126
|
+
if (x.toString().length == 1) {
|
|
127
|
+
return '0' + x.toString();
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
return x.toString();
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
//데이터 패칭 함수
|
|
134
|
+
const getPopUpData = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
135
|
+
const response = yield fetch('/api/popup/top/list');
|
|
136
|
+
return yield response.json();
|
|
137
|
+
});
|
|
138
|
+
//data.list에서 해당 idx를 삭제하는 함수
|
|
139
|
+
const filterClose = (idx) => {
|
|
140
|
+
const filterData = popup.filter((item) => item.idx !== idx);
|
|
141
|
+
setPopup(filterData);
|
|
142
|
+
};
|
|
143
|
+
//스토리지 저장
|
|
144
|
+
const addCookie = (idx) => {
|
|
145
|
+
//내일 현재시간까지
|
|
146
|
+
const nowDate = new Date();
|
|
147
|
+
const expires = nowDate.setHours(nowDate.getHours() + 24);
|
|
148
|
+
localStorage.setItem(idx + '_CloseTopPop', String(expires));
|
|
149
|
+
};
|
|
150
|
+
// //query보다 먼저 실행
|
|
151
|
+
// useEffect(() => {
|
|
152
|
+
// if (typeof localStorage != 'undefined') {
|
|
153
|
+
// // 저장된 값은 제외
|
|
154
|
+
// const newInit = initData.filter((item) => !localStorage.getItem(item.idx + '_CloseTopPop'))
|
|
155
|
+
// setPopup(newInit)
|
|
156
|
+
// }
|
|
157
|
+
// }, [])
|
|
158
|
+
// console.log(currentHours, currentMinutes)
|
|
159
|
+
// 팝업이 뜨는 시간 조정
|
|
160
|
+
// const startHour =7 //팝업시작 시간의 '시'
|
|
161
|
+
// const startMin = 2//팝업시작 시간의 '분'
|
|
162
|
+
// const endHour = 8//팝업종료 시간의 '시'
|
|
163
|
+
// const endMin = 50//팝업종료 시간의 '분'
|
|
164
|
+
return (<>
|
|
165
|
+
<div className={style.header_banner_wrap}>
|
|
166
|
+
{/*pc*/}
|
|
167
|
+
<div className={style.header_banner}>
|
|
168
|
+
<Swiper autoplay={{ delay: 5000 }} modules={[Autoplay]} loop={popup.filter(item => item.file_type === 'file_pc').length > 1}>
|
|
169
|
+
{popup.length > 0 ? (popup
|
|
170
|
+
.filter((item) => item.file_type === 'file_pc' &&
|
|
171
|
+
isCurrentTimeWithinPopupRange(item.days, item.startHour, item.startMin, item.endHour, item.endMin))
|
|
172
|
+
.map((item, index) => {
|
|
173
|
+
// {popup.length > 0 ? popup.filter((item: IBannerTypes) => item.file_type === 'file_pc').map((item: IBannerTypes, index: number) => {
|
|
174
|
+
return (<SwiperSlide key={index}>
|
|
175
|
+
<div className={style.header_banner_btn}>
|
|
176
|
+
<button onClick={() => {
|
|
177
|
+
filterClose(item.idx);
|
|
178
|
+
addCookie(item.idx);
|
|
179
|
+
}}>
|
|
180
|
+
하루동안 보지않기
|
|
181
|
+
</button>
|
|
182
|
+
<button onClick={() => {
|
|
183
|
+
filterClose(item.idx);
|
|
184
|
+
}}>
|
|
185
|
+
<Image src="/images/banner_btn.webp" alt="대륜 배너 이미지" width={42} height={42}/>
|
|
186
|
+
</button>
|
|
187
|
+
</div>
|
|
188
|
+
<div className={style.banner_block} style={{ background: `#${item.color_code}` }}>
|
|
189
|
+
<a href={item.p_link} target={item.link_type} onClick={() => {
|
|
190
|
+
addClickCnt(item.idx);
|
|
191
|
+
}}>
|
|
192
|
+
<Image src={ImagePath + item.file_path + '/' + item.save_file_name} alt={item.file_alt} width={2000} height={60} priority={true} quality={100} loading={'eager'}/>
|
|
193
|
+
{/*<Image src={"/images/대표메인_팝업_PC.jpg"} alt={item.file_alt} width={1920} height={50} priority={true} />*/}
|
|
194
|
+
</a>
|
|
195
|
+
</div>
|
|
196
|
+
</SwiperSlide>);
|
|
197
|
+
})) : (<></>)}
|
|
198
|
+
</Swiper>
|
|
199
|
+
</div>
|
|
200
|
+
|
|
201
|
+
{/*mobile*/}
|
|
202
|
+
<div className={classNames({
|
|
203
|
+
[style.header_banner_m]: true,
|
|
204
|
+
[style.header_banner_fix]: isTop === true ? true : false
|
|
205
|
+
})}>
|
|
206
|
+
<Swiper autoplay={{ delay: 5000 }} modules={[Autoplay]} loop={popup.filter((item) => item.file_type === 'file_mobile').length > 1}>
|
|
207
|
+
{popup.length > 0 ? (popup
|
|
208
|
+
.filter((item) => item.file_type === 'file_mobile')
|
|
209
|
+
.map((item, index) => {
|
|
210
|
+
return (<SwiperSlide key={index}>
|
|
211
|
+
<div className={style.header_banner_m_btn}>
|
|
212
|
+
<button onClick={() => {
|
|
213
|
+
filterClose(item.idx);
|
|
214
|
+
addCookie(item.idx);
|
|
215
|
+
}}>
|
|
216
|
+
하루동안 보지않기
|
|
217
|
+
</button>
|
|
218
|
+
<button onClick={() => {
|
|
219
|
+
filterClose(item.idx);
|
|
220
|
+
}}>
|
|
221
|
+
닫기
|
|
222
|
+
</button>
|
|
223
|
+
</div>
|
|
224
|
+
<div className={style.banner_block_m}>
|
|
225
|
+
<a href={item.p_link} target={item.link_type}>
|
|
226
|
+
<Image src={ImagePath + item.file_path + '/' + item.save_file_name} alt={item.file_alt} width={900} height={150} priority={true} onClick={() => {
|
|
227
|
+
addClickCnt(item.idx);
|
|
228
|
+
}} quality={100}/>
|
|
229
|
+
{/*<Image src={"/images/대표메인_팝업_900.jpg"} alt={item.file_alt} width={900} height={70} priority={true} />*/}
|
|
230
|
+
</a>
|
|
231
|
+
</div>
|
|
232
|
+
</SwiperSlide>);
|
|
233
|
+
})) : (<></>)}
|
|
234
|
+
</Swiper>
|
|
235
|
+
</div>
|
|
236
|
+
</div>
|
|
237
|
+
</>);
|
|
238
|
+
};
|
|
239
|
+
export default TopBanner;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/*header_banner 20230322*/
|
|
2
|
+
.header_banner_wrap {
|
|
3
|
+
z-index: 99;
|
|
4
|
+
position: fixed;
|
|
5
|
+
bottom: 0;
|
|
6
|
+
width: 100%;
|
|
7
|
+
}
|
|
8
|
+
.header_banner {
|
|
9
|
+
position: relative;
|
|
10
|
+
margin: 0 auto;
|
|
11
|
+
}
|
|
12
|
+
.header_banner_btn {
|
|
13
|
+
position: absolute;
|
|
14
|
+
color: #fff;
|
|
15
|
+
right: 50px;
|
|
16
|
+
top: 50%;
|
|
17
|
+
transform: translateY(-50%);
|
|
18
|
+
display: flex;
|
|
19
|
+
}
|
|
20
|
+
.header_banner_btn button {
|
|
21
|
+
background: transparent;
|
|
22
|
+
color: #fff;
|
|
23
|
+
font-size: 16px;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
}
|
|
26
|
+
.header_banner_btn button img {
|
|
27
|
+
width: 20px;
|
|
28
|
+
height: auto;
|
|
29
|
+
margin-left: 15px;
|
|
30
|
+
vertical-align: middle;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
}
|
|
33
|
+
.header_banner .banner_block img {
|
|
34
|
+
width: 100%;
|
|
35
|
+
height: auto !important;
|
|
36
|
+
}
|
|
37
|
+
.header_banner_m {
|
|
38
|
+
display: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@media (max-width: 1280px) {
|
|
42
|
+
.header_banner .banner_block img {
|
|
43
|
+
max-height: 40px !important;
|
|
44
|
+
}
|
|
45
|
+
.header_banner_btn button {
|
|
46
|
+
font-size: 14px;
|
|
47
|
+
}
|
|
48
|
+
.header_banner_btn button img {
|
|
49
|
+
width: 14px;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@media (max-width: 1024px) {
|
|
54
|
+
.header_banner_wrap{
|
|
55
|
+
position:relative;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@media (max-width: 900px) {
|
|
60
|
+
.header_banner {
|
|
61
|
+
display: none;
|
|
62
|
+
}
|
|
63
|
+
.header_banner_fix {
|
|
64
|
+
position: fixed;
|
|
65
|
+
bottom: 0;
|
|
66
|
+
}
|
|
67
|
+
.header_banner_m {
|
|
68
|
+
display: block;
|
|
69
|
+
margin: 0 auto;
|
|
70
|
+
text-align: center;
|
|
71
|
+
width: 100%;
|
|
72
|
+
}
|
|
73
|
+
.header_banner_m .banner_block_m a {
|
|
74
|
+
display: flex;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
align-items: center;
|
|
77
|
+
}
|
|
78
|
+
.header_banner_m .banner_block_m a img {
|
|
79
|
+
height: auto;
|
|
80
|
+
max-height: 150px !important;
|
|
81
|
+
}
|
|
82
|
+
.header_banner_m_btn {
|
|
83
|
+
display: flex;
|
|
84
|
+
width: 100%;
|
|
85
|
+
}
|
|
86
|
+
.header_banner_m_btn button {
|
|
87
|
+
width: 50%;
|
|
88
|
+
padding: 4px 0;
|
|
89
|
+
color: #fff;
|
|
90
|
+
background: #0a1932;
|
|
91
|
+
font-size: 12px;
|
|
92
|
+
cursor: pointer;
|
|
93
|
+
}
|
|
94
|
+
.header_banner_m_btn button:nth-child(2) {
|
|
95
|
+
background: #050404;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@media (max-width: 480px) {
|
|
100
|
+
.header_banner_m .banner_block_m a img {
|
|
101
|
+
max-height: 120px !important;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
/*header_banner 20230322 end*/
|
|
105
|
+
|
|
106
|
+
@media (max-width: 340px) {
|
|
107
|
+
/* .header_banner_wrap{min-width: 360px;} */
|
|
108
|
+
.header_banner_m .banner_block_m a img {
|
|
109
|
+
min-width: 360px;
|
|
110
|
+
}
|
|
111
|
+
}
|