@daeryun/dr_components 0.4.96 → 0.4.98
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/asset/images/header/head_link.svg +3 -0
- package/dist/components/Header/HeaderWrapper.d.ts +8 -0
- package/dist/components/Header/HeaderWrapper.jsx +8 -0
- package/dist/components/Header/HeaderWrapper.tsx +22 -0
- package/dist/components/Header/MobileHeader.jsx +3 -3
- package/dist/components/Header/MobileHeader.tsx +3 -3
- package/dist/components/Header/PcHeader.jsx +6 -4
- package/dist/components/Header/PcHeader.tsx +13 -4
- package/dist/components/page/LawyerDetail/BasicInfo.d.ts +8 -0
- package/dist/components/page/LawyerDetail/BasicInfo.jsx +127 -0
- package/dist/components/page/LawyerDetail/BasicInfo.tsx +265 -0
- package/dist/components/page/LawyerDetail/CareerList.d.ts +20 -0
- package/dist/components/page/LawyerDetail/CareerList.jsx +289 -0
- package/dist/components/page/LawyerDetail/CareerList.tsx +544 -0
- package/dist/components/page/LawyerDetail/ILawyerDetailTypes.d.ts +48 -0
- package/dist/components/page/LawyerDetail/ILawyerDetailTypes.jsx +1 -0
- package/dist/components/page/LawyerDetail/ILawyerDetailTypes.tsx +53 -0
- package/dist/components/page/LawyerDetail/Introduce.d.ts +7 -0
- package/dist/components/page/LawyerDetail/Introduce.jsx +25 -0
- package/dist/components/page/LawyerDetail/Introduce.tsx +41 -0
- package/dist/components/page/LawyerDetail/LawyerDetail.d.ts +11 -0
- package/dist/components/page/LawyerDetail/LawyerDetail.jsx +117 -0
- package/dist/components/page/LawyerDetail/LawyerDetail.stories.d.ts +6 -0
- package/dist/components/page/LawyerDetail/LawyerDetail.stories.jsx +2485 -0
- package/dist/components/page/LawyerDetail/LawyerDetail.stories.tsx +2495 -0
- package/dist/components/page/LawyerDetail/LawyerDetail.tsx +180 -0
- package/dist/components/page/LawyerDetail/MobileRelatedPage.d.ts +10 -0
- package/dist/components/page/LawyerDetail/MobileRelatedPage.jsx +45 -0
- package/dist/components/page/LawyerDetail/MobileRelatedPage.tsx +118 -0
- package/dist/components/page/LawyerDetail/MobileSpeciality.d.ts +9 -0
- package/dist/components/page/LawyerDetail/MobileSpeciality.jsx +59 -0
- package/dist/components/page/LawyerDetail/MobileSpeciality.tsx +113 -0
- package/dist/components/page/LawyerDetail/MobileTabButton.d.ts +5 -0
- package/dist/components/page/LawyerDetail/MobileTabButton.jsx +20 -0
- package/dist/components/page/LawyerDetail/MobileTabButton.tsx +35 -0
- package/dist/components/page/LawyerDetail/PcTabButton.d.ts +8 -0
- package/dist/components/page/LawyerDetail/PcTabButton.jsx +102 -0
- package/dist/components/page/LawyerDetail/PcTabButton.tsx +182 -0
- package/dist/components/page/LawyerDetail/detail.module.css +602 -0
- package/dist/styles/globals.css +692 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
4
|
+
import { useRouter, useSearchParams } from 'next/navigation';
|
|
5
|
+
import Link from 'next/link';
|
|
6
|
+
import Image from 'next/image';
|
|
7
|
+
import { ILawyerCareer, ILawyer, IBoard, ISuccess, ILawyerCerti, ICommonCode } from './ILawyerDetailTypes';
|
|
8
|
+
import BasicInfo from './BasicInfo';
|
|
9
|
+
import CareerList from './CareerList';
|
|
10
|
+
import PcTabButton from './PcTabButton';
|
|
11
|
+
import MobileTabButton from './MobileTabButton';
|
|
12
|
+
import MobileSpeciality from './MobileSpeciality';
|
|
13
|
+
import Introduce from './Introduce';
|
|
14
|
+
import MobileRelatedPage from './MobileRelatedPage';
|
|
15
|
+
import { bodyFetch, lawyerCode } from '../../../lib';
|
|
16
|
+
|
|
17
|
+
interface IDetailProps {
|
|
18
|
+
lawyerInfo: ILawyer;
|
|
19
|
+
careerList: ILawyerCareer[];
|
|
20
|
+
speciality: ILawyerCareer[];
|
|
21
|
+
certiList: ILawyerCerti[];
|
|
22
|
+
codeList: ICommonCode[];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const Detail = ({ lawyerInfo, careerList, certiList, codeList, speciality }: IDetailProps) => {
|
|
26
|
+
const searchParams = useSearchParams();
|
|
27
|
+
const targetRefs = {
|
|
28
|
+
career: useRef(null),
|
|
29
|
+
act: useRef(null),
|
|
30
|
+
success: useRef(null),
|
|
31
|
+
edu: useRef(null),
|
|
32
|
+
book: useRef(null),
|
|
33
|
+
certi: useRef(null)
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const targetTitleRefs = {
|
|
37
|
+
career: useRef<HTMLHeadingElement>(null),
|
|
38
|
+
act: useRef<HTMLHeadingElement>(null),
|
|
39
|
+
success: useRef<HTMLHeadingElement>(null),
|
|
40
|
+
edu: useRef<HTMLHeadingElement>(null),
|
|
41
|
+
book: useRef<HTMLHeadingElement>(null),
|
|
42
|
+
certi: useRef<HTMLHeadingElement>(null)
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const [successList, setSuccessList] = useState<ISuccess[]>([]);
|
|
46
|
+
const [broadcastList, setBroadcastList] = useState<IBoard[]>([]);
|
|
47
|
+
const [reviewList, setReviewList] = useState<IBoard[]>([]);
|
|
48
|
+
const [queryStr, setQueryStr] = useState<string>('');
|
|
49
|
+
const [integrateSearch, setIntegrateSearch] = useState<string>('');
|
|
50
|
+
|
|
51
|
+
const [isLawyer, setIsLawyer] = useState<boolean>(
|
|
52
|
+
lawyerInfo && lawyerInfo.lawyer_code !== null && lawyerCode.includes(lawyerInfo.lawyer_code)
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
//모바일 전문분야 더보기 버튼
|
|
56
|
+
const [maxLines, setMaxLines] = useState(0); // 최종 박스 크기
|
|
57
|
+
|
|
58
|
+
//모바일 전문분야 최대높이 계산
|
|
59
|
+
const calculateMaxLines = () => {
|
|
60
|
+
const ulElement = document.getElementById('field_box');
|
|
61
|
+
return ulElement ? ulElement.offsetHeight : 0;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
if (lawyerInfo !== null) {
|
|
66
|
+
bodyFetch('/api/mapping/list', { idx: lawyerInfo.l_id, key: 'contents' }, (obj: any) => {
|
|
67
|
+
setSuccessList(obj.returnObj.successList);
|
|
68
|
+
setBroadcastList(obj.returnObj.broadcastList);
|
|
69
|
+
setReviewList(obj.returnObj.reviewList);
|
|
70
|
+
});
|
|
71
|
+
// sessionStorage.setItem('selected-lawyer-id', lawyerInfo.l_id)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
//모바일 전문분야
|
|
75
|
+
const handleResize = () => {
|
|
76
|
+
const newMaxLines = calculateMaxLines();
|
|
77
|
+
setMaxLines(newMaxLines);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
window.addEventListener('resize', handleResize);
|
|
81
|
+
handleResize();
|
|
82
|
+
|
|
83
|
+
return () => {
|
|
84
|
+
window.removeEventListener('resize', handleResize);
|
|
85
|
+
};
|
|
86
|
+
}, []);
|
|
87
|
+
|
|
88
|
+
useEffect(() => {
|
|
89
|
+
const page = searchParams.get('page');
|
|
90
|
+
const integrate_search = searchParams.get('integrate_search');
|
|
91
|
+
if (page) {
|
|
92
|
+
const pro = searchParams.get('pro');
|
|
93
|
+
const search = searchParams.get('search');
|
|
94
|
+
const selected = searchParams.get('selected');
|
|
95
|
+
const nameFilter = searchParams.get('nameFilter');
|
|
96
|
+
setQueryStr(`?pro=${pro}&page=${page}&selected=${selected}&search=${search}&nameFilter=${nameFilter}`);
|
|
97
|
+
} else {
|
|
98
|
+
setQueryStr('');
|
|
99
|
+
}
|
|
100
|
+
setIntegrateSearch(integrate_search ? String(integrate_search) : '');
|
|
101
|
+
}, [searchParams]);
|
|
102
|
+
|
|
103
|
+
return lawyerInfo ? (
|
|
104
|
+
<section
|
|
105
|
+
id={'sub_contents'}
|
|
106
|
+
className={' pt-[310px] max-xl:pt-[260px] max-lg:pt-[180px] max-md:pt-[120px] max-sm:pt-[68px]'}
|
|
107
|
+
>
|
|
108
|
+
<BasicInfo codeList={codeList} lawyerInfo={lawyerInfo} integrateSearch={integrateSearch} />
|
|
109
|
+
|
|
110
|
+
{/*변호사 설명*/}
|
|
111
|
+
<Introduce lawyerInfo={lawyerInfo} integrateSearch={integrateSearch} />
|
|
112
|
+
|
|
113
|
+
<div className={'h-[1px] w-full bg-[#ddd]'}></div>
|
|
114
|
+
|
|
115
|
+
{/*모바일 전문분야*/}
|
|
116
|
+
<MobileSpeciality
|
|
117
|
+
speciality={speciality}
|
|
118
|
+
codeList={codeList}
|
|
119
|
+
maxLines={maxLines}
|
|
120
|
+
integrateSearch={integrateSearch}
|
|
121
|
+
/>
|
|
122
|
+
|
|
123
|
+
<section className={'mx-auto max-w-screen-2xl '}>
|
|
124
|
+
<div className={'relative mx-auto w-[90%]'}>
|
|
125
|
+
{/*모바일 업무사례, 언론보도, 후기*/}
|
|
126
|
+
<MobileRelatedPage
|
|
127
|
+
lawyerInfo={lawyerInfo}
|
|
128
|
+
successList={successList}
|
|
129
|
+
broadcastList={broadcastList}
|
|
130
|
+
reviewList={reviewList}
|
|
131
|
+
isLawyer={isLawyer}
|
|
132
|
+
/>
|
|
133
|
+
|
|
134
|
+
{/*모바일 상단 버튼*/}
|
|
135
|
+
<MobileTabButton targetRefs={targetRefs} />
|
|
136
|
+
|
|
137
|
+
{/*pc 상단 버튼*/}
|
|
138
|
+
<PcTabButton targetTitleRefs={targetTitleRefs} targetRefs={targetRefs} careerList={careerList} />
|
|
139
|
+
|
|
140
|
+
{/* 경력 리스트 */}
|
|
141
|
+
<CareerList
|
|
142
|
+
integrateSearch={integrateSearch}
|
|
143
|
+
successList={successList}
|
|
144
|
+
broadcastList={broadcastList}
|
|
145
|
+
reviewList={reviewList}
|
|
146
|
+
careerList={careerList}
|
|
147
|
+
lawyerInfo={lawyerInfo}
|
|
148
|
+
speciality={speciality}
|
|
149
|
+
codeList={codeList}
|
|
150
|
+
certiList={certiList}
|
|
151
|
+
targetRefs={targetRefs}
|
|
152
|
+
targetTitleRefs={targetTitleRefs}
|
|
153
|
+
/>
|
|
154
|
+
|
|
155
|
+
<div className={'m-auto mb-[100px] flex w-[90%] max-w-[1400px] justify-center sm:justify-end '}>
|
|
156
|
+
<Link href={'/lawyer' + queryStr}>
|
|
157
|
+
<div
|
|
158
|
+
className={
|
|
159
|
+
'flex w-[10em] items-center justify-between rounded-[34px] border-[1px] border-solid border-[#ddd] bg-[#113461] px-6 py-4 text-[20px] font-bold text-[#fff] sm:w-[232px] '
|
|
160
|
+
}
|
|
161
|
+
>
|
|
162
|
+
변호사 더보기
|
|
163
|
+
<Image
|
|
164
|
+
src={'https://d1tgonli21s4df.cloudfront.net/lawyer/Arrow_Right_LG.svg'}
|
|
165
|
+
alt={''}
|
|
166
|
+
title={''}
|
|
167
|
+
width={36}
|
|
168
|
+
height={36}
|
|
169
|
+
className={'h-[30px] w-auto'}
|
|
170
|
+
/>
|
|
171
|
+
</div>
|
|
172
|
+
</Link>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
</section>
|
|
176
|
+
</section>
|
|
177
|
+
) : null;
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
export default Detail;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IBoard, ILawyer, ISuccess } from './ILawyerDetailTypes';
|
|
3
|
+
declare const MobileRelatedPage: ({ lawyerInfo, broadcastList, reviewList, successList, isLawyer }: {
|
|
4
|
+
lawyerInfo: ILawyer;
|
|
5
|
+
isLawyer: boolean;
|
|
6
|
+
broadcastList: IBoard[];
|
|
7
|
+
reviewList: IBoard[];
|
|
8
|
+
successList: ISuccess[];
|
|
9
|
+
}) => React.JSX.Element;
|
|
10
|
+
export default MobileRelatedPage;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import Link from 'next/link';
|
|
2
|
+
import Image from 'next/image';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { useTranslation } from 'next-i18next';
|
|
5
|
+
const MobileRelatedPage = ({ lawyerInfo, broadcastList, reviewList, successList, isLawyer }) => {
|
|
6
|
+
const { t } = useTranslation('common');
|
|
7
|
+
return (<span className={'flex w-full gap-[20px] lg:hidden ' +
|
|
8
|
+
//768px
|
|
9
|
+
'max-md:gap-2 ' +
|
|
10
|
+
//
|
|
11
|
+
`${isLawyer ? 'my-[40px] max-md:my-[30px]' : 'mb-[40px] max-md:mb-[30px]'}`}>
|
|
12
|
+
{successList.length > 0 ? (<Link href={'/success/lawyer/' + lawyerInfo.l_name} className={'flex-1'}>
|
|
13
|
+
<div className={'flex h-[60px] w-full items-center justify-between rounded-full border-[1px] border-solid border-[#dfdfdf] px-[30px] text-[18px] font-[700] tracking-[-0.8px] text-[#333333] ' +
|
|
14
|
+
//768px
|
|
15
|
+
'max-md:flex-col max-md:justify-center max-md:gap-1 max-md:rounded-[10px] max-md:px-0 max-md:text-[16px]'}>
|
|
16
|
+
<p>업무사례</p>
|
|
17
|
+
<Image src={'https://d1tgonli21s4df.cloudfront.net/lawyer/arrow_g.webp'} alt={''} title={''} width={30} height={20} className={'h-auto w-[24px] ' +
|
|
18
|
+
//768px
|
|
19
|
+
'max-md:w-[18px] '}/>
|
|
20
|
+
</div>
|
|
21
|
+
</Link>) : ('')}
|
|
22
|
+
|
|
23
|
+
{broadcastList.length > 0 ? (<Link href="/broadcast" className={'flex-1'}>
|
|
24
|
+
<div className={'flex h-[60px] w-full items-center justify-between rounded-full border-[1px] border-solid border-[#dfdfdf] px-[30px] text-[18px] font-[700] tracking-[-0.8px] text-[#333333] ' +
|
|
25
|
+
//768px
|
|
26
|
+
'max-md:flex-col max-md:justify-center max-md:gap-1 max-md:rounded-[10px] max-md:px-0 max-md:text-[16px]'}>
|
|
27
|
+
<p>언론보도</p>
|
|
28
|
+
<Image src={'https://d1tgonli21s4df.cloudfront.net/lawyer/arrow_g.webp'} alt={''} title={''} width={30} height={20} className={'h-auto w-[24px] ' +
|
|
29
|
+
//768px
|
|
30
|
+
'max-md:w-[18px] '}/>
|
|
31
|
+
</div>
|
|
32
|
+
</Link>) : ('')}
|
|
33
|
+
{reviewList.length > 0 ? (<Link href="/reply" className={'flex-1'}>
|
|
34
|
+
<div className={'flex h-[60px] w-full items-center justify-between rounded-full border-[1px] border-solid border-[#dfdfdf] px-[30px] text-[18px] font-[700] tracking-[-0.8px] text-[#333333] ' +
|
|
35
|
+
//768px
|
|
36
|
+
'max-md:flex-col max-md:justify-center max-md:gap-1 max-md:rounded-[10px] max-md:px-0 max-md:text-[16px]'}>
|
|
37
|
+
<p>후기</p>
|
|
38
|
+
<Image src={'https://d1tgonli21s4df.cloudfront.net/lawyer/arrow_g.webp'} alt={''} title={''} width={30} height={20} className={'h-auto w-[24px] ' +
|
|
39
|
+
//768px
|
|
40
|
+
'max-md:w-[18px] '}/>
|
|
41
|
+
</div>
|
|
42
|
+
</Link>) : ('')}
|
|
43
|
+
</span>);
|
|
44
|
+
};
|
|
45
|
+
export default MobileRelatedPage;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import Link from 'next/link';
|
|
2
|
+
import Image from 'next/image';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { useTranslation } from 'next-i18next';
|
|
5
|
+
import { IBoard, ILawyer, ISuccess } from './ILawyerDetailTypes';
|
|
6
|
+
|
|
7
|
+
const MobileRelatedPage = ({
|
|
8
|
+
lawyerInfo,
|
|
9
|
+
broadcastList,
|
|
10
|
+
reviewList,
|
|
11
|
+
successList,
|
|
12
|
+
isLawyer
|
|
13
|
+
}: {
|
|
14
|
+
lawyerInfo: ILawyer;
|
|
15
|
+
isLawyer: boolean;
|
|
16
|
+
broadcastList: IBoard[];
|
|
17
|
+
reviewList: IBoard[];
|
|
18
|
+
successList: ISuccess[];
|
|
19
|
+
}) => {
|
|
20
|
+
const { t } = useTranslation('common');
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<span
|
|
24
|
+
className={
|
|
25
|
+
'flex w-full gap-[20px] lg:hidden ' +
|
|
26
|
+
//768px
|
|
27
|
+
'max-md:gap-2 ' +
|
|
28
|
+
//
|
|
29
|
+
`${isLawyer ? 'my-[40px] max-md:my-[30px]' : 'mb-[40px] max-md:mb-[30px]'}`
|
|
30
|
+
}
|
|
31
|
+
>
|
|
32
|
+
{successList.length > 0 ? (
|
|
33
|
+
<Link href={'/success/lawyer/' + lawyerInfo.l_name} className={'flex-1'}>
|
|
34
|
+
<div
|
|
35
|
+
className={
|
|
36
|
+
'flex h-[60px] w-full items-center justify-between rounded-full border-[1px] border-solid border-[#dfdfdf] px-[30px] text-[18px] font-[700] tracking-[-0.8px] text-[#333333] ' +
|
|
37
|
+
//768px
|
|
38
|
+
'max-md:flex-col max-md:justify-center max-md:gap-1 max-md:rounded-[10px] max-md:px-0 max-md:text-[16px]'
|
|
39
|
+
}
|
|
40
|
+
>
|
|
41
|
+
<p>업무사례</p>
|
|
42
|
+
<Image
|
|
43
|
+
src={'https://d1tgonli21s4df.cloudfront.net/lawyer/arrow_g.webp'}
|
|
44
|
+
alt={''}
|
|
45
|
+
title={''}
|
|
46
|
+
width={30}
|
|
47
|
+
height={20}
|
|
48
|
+
className={
|
|
49
|
+
'h-auto w-[24px] ' +
|
|
50
|
+
//768px
|
|
51
|
+
'max-md:w-[18px] '
|
|
52
|
+
}
|
|
53
|
+
/>
|
|
54
|
+
</div>
|
|
55
|
+
</Link>
|
|
56
|
+
) : (
|
|
57
|
+
''
|
|
58
|
+
)}
|
|
59
|
+
|
|
60
|
+
{broadcastList.length > 0 ? (
|
|
61
|
+
<Link href="/broadcast" className={'flex-1'}>
|
|
62
|
+
<div
|
|
63
|
+
className={
|
|
64
|
+
'flex h-[60px] w-full items-center justify-between rounded-full border-[1px] border-solid border-[#dfdfdf] px-[30px] text-[18px] font-[700] tracking-[-0.8px] text-[#333333] ' +
|
|
65
|
+
//768px
|
|
66
|
+
'max-md:flex-col max-md:justify-center max-md:gap-1 max-md:rounded-[10px] max-md:px-0 max-md:text-[16px]'
|
|
67
|
+
}
|
|
68
|
+
>
|
|
69
|
+
<p>언론보도</p>
|
|
70
|
+
<Image
|
|
71
|
+
src={'https://d1tgonli21s4df.cloudfront.net/lawyer/arrow_g.webp'}
|
|
72
|
+
alt={''}
|
|
73
|
+
title={''}
|
|
74
|
+
width={30}
|
|
75
|
+
height={20}
|
|
76
|
+
className={
|
|
77
|
+
'h-auto w-[24px] ' +
|
|
78
|
+
//768px
|
|
79
|
+
'max-md:w-[18px] '
|
|
80
|
+
}
|
|
81
|
+
/>
|
|
82
|
+
</div>
|
|
83
|
+
</Link>
|
|
84
|
+
) : (
|
|
85
|
+
''
|
|
86
|
+
)}
|
|
87
|
+
{reviewList.length > 0 ? (
|
|
88
|
+
<Link href="/reply" className={'flex-1'}>
|
|
89
|
+
<div
|
|
90
|
+
className={
|
|
91
|
+
'flex h-[60px] w-full items-center justify-between rounded-full border-[1px] border-solid border-[#dfdfdf] px-[30px] text-[18px] font-[700] tracking-[-0.8px] text-[#333333] ' +
|
|
92
|
+
//768px
|
|
93
|
+
'max-md:flex-col max-md:justify-center max-md:gap-1 max-md:rounded-[10px] max-md:px-0 max-md:text-[16px]'
|
|
94
|
+
}
|
|
95
|
+
>
|
|
96
|
+
<p>후기</p>
|
|
97
|
+
<Image
|
|
98
|
+
src={'https://d1tgonli21s4df.cloudfront.net/lawyer/arrow_g.webp'}
|
|
99
|
+
alt={''}
|
|
100
|
+
title={''}
|
|
101
|
+
width={30}
|
|
102
|
+
height={20}
|
|
103
|
+
className={
|
|
104
|
+
'h-auto w-[24px] ' +
|
|
105
|
+
//768px
|
|
106
|
+
'max-md:w-[18px] '
|
|
107
|
+
}
|
|
108
|
+
/>
|
|
109
|
+
</div>
|
|
110
|
+
</Link>
|
|
111
|
+
) : (
|
|
112
|
+
''
|
|
113
|
+
)}
|
|
114
|
+
</span>
|
|
115
|
+
);
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export default MobileRelatedPage;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ILawyerCareer } from './ILawyerDetailTypes';
|
|
3
|
+
declare const MobileSpeciality: ({ speciality, codeList, maxLines, integrateSearch }: {
|
|
4
|
+
speciality: ILawyerCareer[];
|
|
5
|
+
maxLines: number;
|
|
6
|
+
codeList: any[];
|
|
7
|
+
integrateSearch: string;
|
|
8
|
+
}) => React.JSX.Element;
|
|
9
|
+
export default MobileSpeciality;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import Link from 'next/link';
|
|
2
|
+
import Image from 'next/image';
|
|
3
|
+
import React, { useState } from 'react';
|
|
4
|
+
import { useTranslation } from 'next-i18next';
|
|
5
|
+
import { searchColorLawyerText } from '../../common/integrate';
|
|
6
|
+
const MobileSpeciality = ({ speciality, codeList, maxLines, integrateSearch }) => {
|
|
7
|
+
const { t } = useTranslation('common'); //모바일 전문분야 더보기 버튼
|
|
8
|
+
const [mobileCareerViewMore, setMobileCareerViewMore] = useState(false);
|
|
9
|
+
return (<section className={'mx-auto mt-[80px] max-w-screen-2xl ' +
|
|
10
|
+
//1024px
|
|
11
|
+
'max-lg:mt-[60px] ' +
|
|
12
|
+
//640px
|
|
13
|
+
'overflow-hidden max-sm:mt-[40px]'}>
|
|
14
|
+
<div className={'relative mx-auto w-[90%]'}>
|
|
15
|
+
{/*모바일 전문분야*/}
|
|
16
|
+
<div className={'m-auto w-full sm:w-full lg:hidden'}>
|
|
17
|
+
{speciality && speciality.length > 1 ? (<div className={''}>
|
|
18
|
+
<div className={'mb-[10px] text-[20px] font-[700] tracking-[-1px]'} id="fields">
|
|
19
|
+
관련 업무분야
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<div className={'mb-[10px] !max-h-fit overflow-hidden'} style={{
|
|
23
|
+
height: maxLines < 80 || mobileCareerViewMore ? maxLines + 'px' : '80px'
|
|
24
|
+
}}>
|
|
25
|
+
<ul className={'h-fit w-full'} id={'field_box'}>
|
|
26
|
+
{speciality.map((item, index) => {
|
|
27
|
+
// prettier-ignore
|
|
28
|
+
const url = codeList.filter(c => c.parent_code === 'center' && c.code_name.includes(item.career_txt)) && codeList.filter(c => c.parent_code === 'center' && c.code_name.includes(item.career_txt)).length > 0
|
|
29
|
+
? codeList.filter(c => c.parent_code === 'center' && c.code_name.includes(item.career_txt))[0].etc2
|
|
30
|
+
: 'https://www.daeryunlaw.com/';
|
|
31
|
+
const careerTxt = item.career_txt
|
|
32
|
+
? item.career_txt.replace('일반소송', '민사').replace('중재', '손해배상')
|
|
33
|
+
: '';
|
|
34
|
+
return (<li className={'mr-[5px] mt-[5px] inline-block basis-[100%] flex-wrap rounded-[20px] border-[1px] border-solid border-[#dfdfdf] px-[10px] py-[4px] text-[16px] font-[700] tracking-[-0.9px] text-[#555] '} key={`li_key_${item}_${index}`}>
|
|
35
|
+
<Link href={url} target={'_blank'} key={`a_key_${item}_${index}`}>
|
|
36
|
+
<span className={'flex items-center gap-[2px]'}>
|
|
37
|
+
<Image src={'https://d1tgonli21s4df.cloudfront.net/lawyer/hover_off.webp'} alt={careerTxt + '전문변호사'} width={6} height={6}/>
|
|
38
|
+
{searchColorLawyerText(careerTxt, integrateSearch)}
|
|
39
|
+
</span>
|
|
40
|
+
</Link>
|
|
41
|
+
</li>);
|
|
42
|
+
})}
|
|
43
|
+
</ul>
|
|
44
|
+
</div>
|
|
45
|
+
<span className={'mb-[10px] block w-full'}>
|
|
46
|
+
<button onClick={() => {
|
|
47
|
+
setMobileCareerViewMore(true);
|
|
48
|
+
}} className={`${mobileCareerViewMore || maxLines <= 80 ? 'hidden ' : 'block '}` +
|
|
49
|
+
'mx-auto mt-[20px] w-fit rounded-[20px] border-[1px] border-solid border-[#767676] bg-[#767676] px-[20px] py-[4px] text-[16px] font-[700] tracking-[-0.9px] text-[#fff] ' +
|
|
50
|
+
'before:absolute before:bottom-[17px] before:left-[-50px] before:-z-10 before:block before:h-[1px] before:w-[1100px] before:bg-[#ddd] before:content-[""]'}>
|
|
51
|
+
더보기 +
|
|
52
|
+
</button>
|
|
53
|
+
</span>
|
|
54
|
+
</div>) : ('')}
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</section>);
|
|
58
|
+
};
|
|
59
|
+
export default MobileSpeciality;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import Link from 'next/link';
|
|
2
|
+
import Image from 'next/image';
|
|
3
|
+
import React, { useState } from 'react';
|
|
4
|
+
import { useTranslation } from 'next-i18next';
|
|
5
|
+
import { ILawyerCareer } from './ILawyerDetailTypes';
|
|
6
|
+
import { searchColorLawyerText } from '../../common/integrate';
|
|
7
|
+
|
|
8
|
+
const MobileSpeciality = ({
|
|
9
|
+
speciality,
|
|
10
|
+
codeList,
|
|
11
|
+
maxLines,
|
|
12
|
+
integrateSearch
|
|
13
|
+
}: {
|
|
14
|
+
speciality: ILawyerCareer[];
|
|
15
|
+
maxLines: number;
|
|
16
|
+
codeList: any[];
|
|
17
|
+
integrateSearch: string;
|
|
18
|
+
}) => {
|
|
19
|
+
const { t } = useTranslation('common'); //모바일 전문분야 더보기 버튼
|
|
20
|
+
const [mobileCareerViewMore, setMobileCareerViewMore] = useState<boolean>(false);
|
|
21
|
+
return (
|
|
22
|
+
<section
|
|
23
|
+
className={
|
|
24
|
+
'mx-auto mt-[80px] max-w-screen-2xl ' +
|
|
25
|
+
//1024px
|
|
26
|
+
'max-lg:mt-[60px] ' +
|
|
27
|
+
//640px
|
|
28
|
+
'overflow-hidden max-sm:mt-[40px]'
|
|
29
|
+
}
|
|
30
|
+
>
|
|
31
|
+
<div className={'relative mx-auto w-[90%]'}>
|
|
32
|
+
{/*모바일 전문분야*/}
|
|
33
|
+
<div className={'m-auto w-full sm:w-full lg:hidden'}>
|
|
34
|
+
{speciality && speciality.length > 1 ? (
|
|
35
|
+
<div className={''}>
|
|
36
|
+
<div className={'mb-[10px] text-[20px] font-[700] tracking-[-1px]'} id="fields">
|
|
37
|
+
관련 업무분야
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<div
|
|
41
|
+
className={'mb-[10px] !max-h-fit overflow-hidden'}
|
|
42
|
+
style={{
|
|
43
|
+
height: maxLines < 80 || mobileCareerViewMore ? maxLines + 'px' : '80px'
|
|
44
|
+
}}
|
|
45
|
+
>
|
|
46
|
+
<ul className={'h-fit w-full'} id={'field_box'}>
|
|
47
|
+
{speciality.map((item, index: number) => {
|
|
48
|
+
// prettier-ignore
|
|
49
|
+
const url = codeList.filter(c => c.parent_code === 'center' && c.code_name.includes(item.career_txt)) && codeList.filter(c => c.parent_code === 'center' && c.code_name.includes(item.career_txt)).length > 0
|
|
50
|
+
? codeList.filter(c => c.parent_code === 'center' && c.code_name.includes(item.career_txt))[0].etc2
|
|
51
|
+
: 'https://www.daeryunlaw.com/';
|
|
52
|
+
|
|
53
|
+
const careerTxt = item.career_txt
|
|
54
|
+
? item.career_txt.replace('일반소송', '민사').replace('중재', '손해배상')
|
|
55
|
+
: '';
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<li
|
|
59
|
+
className={
|
|
60
|
+
'mr-[5px] mt-[5px] inline-block basis-[100%] flex-wrap rounded-[20px] border-[1px] border-solid border-[#dfdfdf] px-[10px] py-[4px] text-[16px] font-[700] tracking-[-0.9px] text-[#555] '
|
|
61
|
+
}
|
|
62
|
+
key={`li_key_${item}_${index}`}
|
|
63
|
+
>
|
|
64
|
+
<Link
|
|
65
|
+
href={url}
|
|
66
|
+
target={'_blank'}
|
|
67
|
+
key={`a_key_${item}_${index}`}
|
|
68
|
+
// className={
|
|
69
|
+
// 'mr-[5px] mt-[5px] inline-block basis-[100%] flex-wrap rounded-[20px] border-[1px] border-solid border-[#dfdfdf] px-[10px] py-[4px] text-[16px] font-[700] tracking-[-0.9px] text-[#555] '
|
|
70
|
+
// }
|
|
71
|
+
>
|
|
72
|
+
<span className={'flex items-center gap-[2px]'}>
|
|
73
|
+
<Image
|
|
74
|
+
src={
|
|
75
|
+
'https://d1tgonli21s4df.cloudfront.net/lawyer/hover_off.webp'
|
|
76
|
+
}
|
|
77
|
+
alt={careerTxt + '전문변호사'}
|
|
78
|
+
width={6}
|
|
79
|
+
height={6}
|
|
80
|
+
/>
|
|
81
|
+
{searchColorLawyerText(careerTxt, integrateSearch)}
|
|
82
|
+
</span>
|
|
83
|
+
</Link>
|
|
84
|
+
</li>
|
|
85
|
+
);
|
|
86
|
+
})}
|
|
87
|
+
</ul>
|
|
88
|
+
</div>
|
|
89
|
+
<span className={'mb-[10px] block w-full'}>
|
|
90
|
+
<button
|
|
91
|
+
onClick={() => {
|
|
92
|
+
setMobileCareerViewMore(true);
|
|
93
|
+
}}
|
|
94
|
+
className={
|
|
95
|
+
`${mobileCareerViewMore || maxLines <= 80 ? 'hidden ' : 'block '}` +
|
|
96
|
+
'mx-auto mt-[20px] w-fit rounded-[20px] border-[1px] border-solid border-[#767676] bg-[#767676] px-[20px] py-[4px] text-[16px] font-[700] tracking-[-0.9px] text-[#fff] ' +
|
|
97
|
+
'before:absolute before:bottom-[17px] before:left-[-50px] before:-z-10 before:block before:h-[1px] before:w-[1100px] before:bg-[#ddd] before:content-[""]'
|
|
98
|
+
}
|
|
99
|
+
>
|
|
100
|
+
더보기 +
|
|
101
|
+
</button>
|
|
102
|
+
</span>
|
|
103
|
+
</div>
|
|
104
|
+
) : (
|
|
105
|
+
''
|
|
106
|
+
)}
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
</section>
|
|
110
|
+
);
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export default MobileSpeciality;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
const MobileTabButton = ({ targetRefs }) => {
|
|
4
|
+
const scrollToTarget = (targetRef) => {
|
|
5
|
+
if (targetRef.current) {
|
|
6
|
+
targetRef.current.scrollIntoView({ behavior: 'smooth' });
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
return (<div className={"relative m-auto w-full after:absolute after:right-[2em] after:top-[calc(50%-3px)] after:h-[10px] after:w-[10px] after:translate-y-[-50%] after:rotate-[135deg] after:border-r-[2px] after:border-t-[2px] after:border-[#fff] after:content-[''] sm:hidden"}>
|
|
10
|
+
<select aria-label={'search-tab'} className={'z-9 relative my-1 block w-full appearance-none rounded-[30px] border border-gray-400 bg-[#285FA7] px-6 py-3 text-[18px] font-[700] tracking-[-1.1px] text-[#fff] hover:border-gray-500 sm:hidden '} onChange={e => {
|
|
11
|
+
scrollToTarget(targetRefs[e.target.value]);
|
|
12
|
+
}}>
|
|
13
|
+
<option value="career">경력</option>
|
|
14
|
+
<option value="act">주요업무 및 활동</option>
|
|
15
|
+
<option value="success">주요실적</option>
|
|
16
|
+
<option value="edu">학력</option>
|
|
17
|
+
</select>
|
|
18
|
+
</div>);
|
|
19
|
+
};
|
|
20
|
+
export default MobileTabButton;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
const MobileTabButton = ({ targetRefs }: { targetRefs: any }) => {
|
|
5
|
+
const scrollToTarget = (targetRef: any) => {
|
|
6
|
+
if (targetRef.current) {
|
|
7
|
+
targetRef.current.scrollIntoView({ behavior: 'smooth' });
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<div
|
|
13
|
+
className={
|
|
14
|
+
"relative m-auto w-full after:absolute after:right-[2em] after:top-[calc(50%-3px)] after:h-[10px] after:w-[10px] after:translate-y-[-50%] after:rotate-[135deg] after:border-r-[2px] after:border-t-[2px] after:border-[#fff] after:content-[''] sm:hidden"
|
|
15
|
+
}
|
|
16
|
+
>
|
|
17
|
+
<select
|
|
18
|
+
aria-label={'search-tab'}
|
|
19
|
+
className={
|
|
20
|
+
'z-9 relative my-1 block w-full appearance-none rounded-[30px] border border-gray-400 bg-[#285FA7] px-6 py-3 text-[18px] font-[700] tracking-[-1.1px] text-[#fff] hover:border-gray-500 sm:hidden '
|
|
21
|
+
}
|
|
22
|
+
onChange={e => {
|
|
23
|
+
scrollToTarget(targetRefs[e.target.value as keyof typeof targetRefs]);
|
|
24
|
+
}}
|
|
25
|
+
>
|
|
26
|
+
<option value="career">경력</option>
|
|
27
|
+
<option value="act">주요업무 및 활동</option>
|
|
28
|
+
<option value="success">주요실적</option>
|
|
29
|
+
<option value="edu">학력</option>
|
|
30
|
+
</select>
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default MobileTabButton;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ILawyerCareer } from './ILawyerDetailTypes';
|
|
3
|
+
declare const PcTabButton: ({ careerList, targetRefs, targetTitleRefs }: {
|
|
4
|
+
careerList: ILawyerCareer[];
|
|
5
|
+
targetRefs: any;
|
|
6
|
+
targetTitleRefs: any;
|
|
7
|
+
}) => React.JSX.Element;
|
|
8
|
+
export default PcTabButton;
|