@daeryun/dr_components 0.7.63 → 0.7.67
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/Model/YoutubeLawyerModal.d.ts +6 -0
- package/dist/components/Model/YoutubeLawyerModal.jsx +35 -0
- package/dist/components/Model/YoutubeLawyerModal.tsx +64 -0
- package/dist/components/common/integrate/index.d.ts +1 -1
- package/dist/components/page/LawyerDetail/ILawyerDetailTypes.d.ts +1 -0
- package/dist/components/page/LawyerDetail/ILawyerDetailTypes.tsx +1 -0
- package/dist/components/page/LawyerDetail/LawyerDetail.stories.jsx +4 -2
- package/dist/components/page/LawyerDetail/LawyerDetail.stories.tsx +4 -2
- package/dist/components/page/LawyerDetail/component/BasicInfo.jsx +102 -76
- package/dist/components/page/LawyerDetail/component/BasicInfo.tsx +265 -197
- package/dist/styles/globals.css +306 -294
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -1
|
@@ -6,6 +6,7 @@ import * as gtag from '../../../../lib/gtag';
|
|
|
6
6
|
import mobile from 'is-mobile';
|
|
7
7
|
import { searchColorLawyerText } from '../../../common/integrate';
|
|
8
8
|
import { Wrapper } from '../../../index';
|
|
9
|
+
import YoutubeLawyerModal from '../../../../components/Model/YoutubeLawyerModal';
|
|
9
10
|
const BasicInfo = ({ lawyerInfo, codeList, centerCode, isUseWrapper, integrateSearch }) => {
|
|
10
11
|
var _a, _b;
|
|
11
12
|
const imagePath = process.env.NEXT_PUBLIC_S3_URL + '';
|
|
@@ -13,6 +14,7 @@ const BasicInfo = ({ lawyerInfo, codeList, centerCode, isUseWrapper, integrateSe
|
|
|
13
14
|
const [isMobile, setIsMobile] = useState(false);
|
|
14
15
|
//lawyerInfo l_ablilty 길이가 너무 긴경우
|
|
15
16
|
const [cssFlag, setCssFlag] = useState(false);
|
|
17
|
+
const [modalOn, setModalOn] = useState(false);
|
|
16
18
|
const isEven = useMemo(() => {
|
|
17
19
|
return Number(lawyerInfo.l_id.replace('tmp_', '')) % 2 === 0;
|
|
18
20
|
}, [lawyerInfo]);
|
|
@@ -53,39 +55,53 @@ const BasicInfo = ({ lawyerInfo, codeList, centerCode, isUseWrapper, integrateSe
|
|
|
53
55
|
const Container = ({ isUseWrapper, children }) => {
|
|
54
56
|
return isUseWrapper ? (<Wrapper className={'max-md:!px-0'}>{children}</Wrapper>) : (<div className={'relative mx-auto max-w-screen-2xl'}>{children}</div>);
|
|
55
57
|
};
|
|
56
|
-
return (
|
|
57
|
-
{
|
|
58
|
-
|
|
58
|
+
return (<>
|
|
59
|
+
<YoutubeLawyerModal onClick={() => {
|
|
60
|
+
setModalOn(false);
|
|
61
|
+
}} isYoutubeOn={modalOn} youtubeId={lawyerInfo.l_introduce_shorts}/>
|
|
59
62
|
|
|
60
|
-
<
|
|
61
|
-
|
|
63
|
+
<div className={'relative w-full pb-[120px] max-md:pb-0'}>
|
|
64
|
+
{/*#F8F8F8 배경 768px부터 hidden*/}
|
|
65
|
+
<div className={'absolute bottom-0 h-[386px] w-full bg-[#F8F8F8] max-md:hidden'}></div>
|
|
66
|
+
|
|
67
|
+
<Container isUseWrapper={isUseWrapper}>
|
|
68
|
+
<div className={'relative mx-auto h-[630px] max-xl:h-[580px] max-lg:h-[500px] max-md2:h-[450px] max-md:w-full max-xs:h-[360px] ' +
|
|
62
69
|
(isUseWrapper ? '' : ' w-[90%] ')}>
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
70
|
+
<Image src={`https://d1tgonli21s4df.cloudfront.net/lawyer/bg_pc${fixBg ? '3' : isEven ? '' : '2'}.webp`} alt={'변호사 리스트 배경'} fill quality={100} className={'object-cover max-sm:hidden'}/>
|
|
71
|
+
<Image src={`https://d1tgonli21s4df.cloudfront.net/lawyer/bg_mo${fixBg ? '3' : isEven ? '' : '2'}.webp`} alt={'변호사 리스트 배경'} fill quality={100} className={'object-cover sm:hidden'}/>
|
|
72
|
+
{/*변호사 이미지*/}
|
|
73
|
+
<div className={'absolute bottom-0 left-[50px] h-[569px] w-[515px] overflow-hidden max-xl:h-[510px] max-lg:h-[450px] max-md:left-1/2 max-md:h-[400px] max-md:-translate-x-1/2 max-xs:h-[317px] max-xs:w-[286px]'}>
|
|
74
|
+
<Image src={`${lawyerImagePath}/${lawyerInfo.nukki}`} alt={lawyerInfo.l_name + ' 변호사'} title={lawyerInfo.l_name + ' 변호사'} unoptimized={true} priority={true} sizes="(max-width: 700px)" fill className={'translate-y-7 scale-110 object-contain max-xl:translate-y-5 max-md:object-center max-xs:translate-y-3'}/>
|
|
75
|
+
</div>
|
|
76
|
+
{/*h1 sr_only*/}
|
|
77
|
+
<h1 className={'sr-only'}>
|
|
78
|
+
{lawyerInfo.l_name}{' '}
|
|
79
|
+
{codeList.filter((item) => item.code === lawyerInfo.lawyer_code)[0].code_name}
|
|
80
|
+
</h1>
|
|
81
|
+
{/*이름 pc*/}
|
|
82
|
+
<div className={'absolute bottom-[128px] right-[100px] z-10 text-right max-xl:bottom-[100px] max-lg:bottom-20 max-lg:right-20 max-md2:bottom-[60px] max-md2:right-[60px] max-md:hidden'}>
|
|
83
|
+
<span className={'mb-1 block text-[70px] font-[800] leading-[1.14] tracking-[-0.9px] max-xl:text-[64px] max-lg:text-[60px] max-md2:mb-0 max-md2:text-[54px] max-xs:text-[40px] '}>
|
|
84
|
+
{searchColorLawyerText(lawyerInfo.l_name, integrateSearch)}
|
|
85
|
+
</span>
|
|
86
|
+
{lawyerInfo.l_position ? (<span className={'text-[28px] font-[500] leading-[1.42] tracking-[-0.7px] ' +
|
|
80
87
|
'max-xl:text-[26px] ' +
|
|
81
88
|
'max-lg:text-[24px] ' +
|
|
82
89
|
'max-md2:text-[22px] '}>
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
90
|
+
|
|
91
|
+
{searchColorLawyerText(lawyerInfo.l_position, integrateSearch)}
|
|
92
|
+
</span>) : (<></>)}
|
|
93
|
+
|
|
94
|
+
{lawyerInfo.l_introduce_shorts && (<div className={'flex h-[49px] w-[189px] items-center justify-center gap-[4px] rounded-[24.5px] bg-[#fff] text-[22px] font-[600]'} onClick={() => {
|
|
95
|
+
setModalOn(true);
|
|
96
|
+
}}>
|
|
97
|
+
{' '}
|
|
98
|
+
<Image src={'/images/youtube_logo.png'} alt={'유튜브'} width={50} height={20} className={'shrink-0ㄴ'}/>
|
|
99
|
+
소개영상
|
|
100
|
+
<Image src={'/images/youtube_arrow.png'} alt={'유튜브'} width={13} height={14} className={'h-[14px]'}/>
|
|
101
|
+
</div>)}
|
|
102
|
+
</div>
|
|
103
|
+
{/*lawyer_code, l_ability, tel pc*/}
|
|
104
|
+
<div className={'absolute bottom-[-50px] right-10 z-10 grid w-full grid-cols-3 place-items-center bg-[#1E395C] text-center text-[24px] leading-[1.25] tracking-[-0.9px] text-white ' +
|
|
89
105
|
'tracking-[-0.9px] ' +
|
|
90
106
|
(cssFlag
|
|
91
107
|
? 'h-[100px] max-w-[1050px] max-xl:h-[110px] max-xl:max-w-[800px] max-lg:h-[100px] max-lg:max-w-[700px] max-md2:h-[90px] max-md2:max-w-[640px] '
|
|
@@ -94,63 +110,73 @@ const BasicInfo = ({ lawyerInfo, codeList, centerCode, isUseWrapper, integrateSe
|
|
|
94
110
|
' max-lg:text-[20px] ' +
|
|
95
111
|
'max-md2:right-5 max-md2:text-[18px] ' +
|
|
96
112
|
'max-md:hidden'}>
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
113
|
+
<p className={'relative w-full font-[800]'}>
|
|
114
|
+
|
|
115
|
+
{searchColorLawyerText(codeList.filter((item) => item.code === lawyerInfo.lawyer_code)[0].code_name, integrateSearch)}
|
|
116
|
+
<span className={'absolute right-0 top-1/2 block h-[50px] w-[2px] -translate-y-1/2 bg-white bg-opacity-20'}></span>
|
|
117
|
+
</p>
|
|
118
|
+
<h2 className={(cssFlag ? 'break-keep px-1 ' : 'whitespace-pre-wrap break-keep px-3 ') +
|
|
103
119
|
'relative w-full font-[500]'}>
|
|
104
|
-
|
|
120
|
+
{searchColorLawyerText(((_a = lawyerInfo.l_sort_center) === null || _a === void 0 ? void 0 : _a.includes(centerCode)) && lawyerInfo.careers_summary
|
|
105
121
|
? lawyerInfo.careers_summary
|
|
106
122
|
: lawyerInfo.l_ability, integrateSearch)}
|
|
107
123
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
124
|
+
<span className={'absolute right-0 top-1/2 block h-[50px] w-[2px] -translate-y-1/2 bg-white bg-opacity-20'}></span>
|
|
125
|
+
</h2>
|
|
126
|
+
<p className={'flex w-full items-center justify-center gap-2 font-[700]'}>
|
|
127
|
+
{lawyerInfo.l_tel && (<Link href={'tel:' + lawyerInfo.l_tel} onClick={handleOnClickLawyerTel} aria-label={lawyerInfo.l_name + '변호사에게 전화하기 ' + lawyerInfo.l_tel}>
|
|
128
|
+
T. {searchColorLawyerText(lawyerInfo.l_tel, integrateSearch)}
|
|
129
|
+
</Link>)}
|
|
130
|
+
{lawyerInfo.l_email ? (<Link href={`${process.env.NEXT_PUBLIC_MAIN_DOMAIN}/mail?lawyer=${lawyerInfo.l_name}`} rel={'nofollow'} className={'block w-fit'} aria-label={lawyerInfo.l_name + '변호사에게 메일보내기 ' + lawyerInfo.l_email}>
|
|
131
|
+
<Image src={'https://d1tgonli21s4df.cloudfront.net/lawyer/email_icon.webp'} alt={'이메일'} width={64} height={64} className={'w-[38px] max-xl:w-[32px] max-lg:w-[30px] max-xs:w-[26px]'}/>
|
|
132
|
+
</Link>) : (<></>)}
|
|
133
|
+
</p>
|
|
134
|
+
</div>
|
|
118
135
|
</div>
|
|
136
|
+
</Container>
|
|
137
|
+
{/*이름 mobile*/}
|
|
138
|
+
<div className={'mx-auto mt-4 md:hidden ' + (isUseWrapper ? 'max-md:px-10 max-2sm:px-5' : ' w-[90%] ')}>
|
|
139
|
+
<span className={'text-[50px] font-[800] leading-[1.14] tracking-[-0.9px] max-md:text-[46px] max-xs:text-[40px] '}>
|
|
140
|
+
{searchColorLawyerText(lawyerInfo.l_name, integrateSearch)}
|
|
141
|
+
</span>
|
|
142
|
+
{lawyerInfo.l_position ? (<span className={'text-[22px] font-[600] leading-[1.42] tracking-[-0.7px] max-xs:text-[20px] '}>
|
|
143
|
+
|
|
144
|
+
{searchColorLawyerText(lawyerInfo.l_position, integrateSearch)}
|
|
145
|
+
</span>) : (<></>)}
|
|
146
|
+
|
|
147
|
+
{lawyerInfo.l_introduce_shorts && (<div className={'flex h-[49px] w-[189px] items-center justify-center gap-[4px] rounded-[24.5px] bg-[#fff] text-[22px] font-[600]'} onClick={() => {
|
|
148
|
+
setModalOn(true);
|
|
149
|
+
}}>
|
|
150
|
+
{' '}
|
|
151
|
+
<Image src={'/images/youtube_logo.png'} alt={'유튜브'} width={50} height={20} className={'shrink-0'}/>
|
|
152
|
+
소개영상
|
|
153
|
+
<Image src={'/images/youtube_arrow.png'} alt={'유튜브'} width={13} height={14} className={'h-[14px]'}/>
|
|
154
|
+
</div>)}
|
|
119
155
|
</div>
|
|
120
|
-
</Container>
|
|
121
|
-
{/*이름 mobile*/}
|
|
122
|
-
<p className={'mx-auto mt-4 md:hidden ' + (isUseWrapper ? 'max-md:px-10 max-2sm:px-5' : ' w-[90%] ')}>
|
|
123
|
-
<span className={'text-[50px] font-[800] leading-[1.14] tracking-[-0.9px] max-md:text-[46px] max-xs:text-[40px] '}>
|
|
124
|
-
{searchColorLawyerText(lawyerInfo.l_name, integrateSearch)}
|
|
125
|
-
</span>
|
|
126
|
-
{lawyerInfo.l_position ? (<span className={'text-[22px] font-[600] leading-[1.42] tracking-[-0.7px] max-xs:text-[20px] '}>
|
|
127
|
-
|
|
128
|
-
{searchColorLawyerText(lawyerInfo.l_position, integrateSearch)}
|
|
129
|
-
</span>) : (<></>)}
|
|
130
|
-
</p>
|
|
131
156
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
157
|
+
{/*lawyer_code, l_ability, tel mobile*/}
|
|
158
|
+
<div className={'mt-[18px] flex h-[150px] w-[70%] min-w-[340px] flex-col justify-between bg-[#1E395C] px-5 py-[22px] text-[18px] leading-[1.25] tracking-[-0.9px] text-white md:hidden'}>
|
|
159
|
+
<p className={'font-[800]'}>
|
|
160
|
+
{searchColorLawyerText(codeList.filter((item) => item.code === lawyerInfo.lawyer_code)[0].code_name, integrateSearch)}
|
|
161
|
+
</p>
|
|
162
|
+
<p className={'font-[500] max-2sm:whitespace-pre-wrap'}>
|
|
163
|
+
{searchColorLawyerText(((_b = lawyerInfo.l_sort_center) === null || _b === void 0 ? void 0 : _b.includes(centerCode)) && lawyerInfo.careers_summary
|
|
139
164
|
? lawyerInfo.careers_summary
|
|
140
165
|
: lawyerInfo.l_ability, integrateSearch)}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
166
|
+
</p>
|
|
167
|
+
<p className={'flex items-center gap-2'}>
|
|
168
|
+
{lawyerInfo.l_tel && (<Link href={'tel:' + lawyerInfo.l_tel} onClick={handleOnClickLawyerTel} className={'text-[16px] '} aria-label={lawyerInfo.l_name + '변호사에게 전화하기 ' + lawyerInfo.l_tel}>
|
|
169
|
+
T.{' '}
|
|
170
|
+
<span className={'font-[600] underline underline-offset-[6px]'}>
|
|
171
|
+
{searchColorLawyerText(lawyerInfo.l_tel, integrateSearch)}
|
|
172
|
+
</span>
|
|
173
|
+
</Link>)}
|
|
174
|
+
{lawyerInfo.l_email ? (<Link href={`${process.env.NEXT_PUBLIC_MAIN_DOMAIN}/mail?lawyer=${lawyerInfo.l_name}`} rel={'nofollow'} className={'block w-fit'} aria-label={lawyerInfo.l_name + '변호사에게 메일보내기 ' + lawyerInfo.l_email}>
|
|
175
|
+
<Image src={'/images/lawyer/email_icon.webp'} alt={'이메일'} width={64} height={64} className={'w-[38px] max-xl:w-[32px] max-lg:w-[30px] max-xs:w-[26px]'}/>
|
|
176
|
+
</Link>) : (<></>)}
|
|
177
|
+
</p>
|
|
178
|
+
</div>
|
|
153
179
|
</div>
|
|
154
|
-
|
|
180
|
+
</>);
|
|
155
181
|
};
|
|
156
182
|
export default BasicInfo;
|