@daeryun/dr_components 0.5.43 → 0.5.45
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/PageTitleBox/archive.webp +0 -0
- package/dist/asset/images/PageTitleBox/archive_m.webp +0 -0
- package/dist/asset/images/PageTitleBox/broadcast.webp +0 -0
- package/dist/asset/images/PageTitleBox/broadcast_m.webp +0 -0
- package/dist/asset/images/PageTitleBox/field.webp +0 -0
- package/dist/asset/images/PageTitleBox/field_m.webp +0 -0
- package/dist/asset/images/PageTitleBox/info.webp +0 -0
- package/dist/asset/images/PageTitleBox/info_m.webp +0 -0
- package/dist/asset/images/PageTitleBox/notice.webp +0 -0
- package/dist/asset/images/PageTitleBox/notice_m.webp +0 -0
- package/dist/asset/images/PageTitleBox/reply.webp +0 -0
- package/dist/asset/images/PageTitleBox/reply_m.webp +0 -0
- package/dist/asset/images/PageTitleBox/success.webp +0 -0
- package/dist/asset/images/PageTitleBox/success_m.webp +0 -0
- package/dist/asset/images/PageTitleBox/trend.webp +0 -0
- package/dist/asset/images/PageTitleBox/trend_m.webp +0 -0
- package/dist/asset/images/categoryMenu/House.svg +3 -0
- package/dist/asset/images/categoryMenu/right_arrow.svg +3 -0
- package/dist/components/CategoryMenu/CategoryMenuForPage.d.ts +7 -0
- package/dist/components/CategoryMenu/CategoryMenuForPage.jsx +41 -0
- package/dist/components/CategoryMenu/CategoryMenuForPage.tsx +80 -0
- package/dist/components/PageTitleBox/PageTitleBox.d.ts +20 -0
- package/dist/components/PageTitleBox/PageTitleBox.jsx +50 -0
- package/dist/components/PageTitleBox/PageTitleBox.stories.d.ts +6 -0
- package/dist/components/PageTitleBox/PageTitleBox.stories.jsx +19 -0
- package/dist/components/PageTitleBox/PageTitleBox.stories.tsx +26 -0
- package/dist/components/PageTitleBox/PageTitleBox.tsx +78 -0
- package/dist/components/Seo/SeoStrength.jsx +1 -1
- package/dist/components/Seo/SeoStrength.tsx +1 -1
- package/dist/components/SubPage/SubPageTitle.d.ts +12 -0
- package/dist/components/SubPage/SubPageTitle.jsx +67 -0
- package/dist/components/SubPage/SubPageTitle.tsx +124 -0
- package/dist/lib/{catagoryMenuName.d.ts → categoryMenuName.d.ts} +1 -2
- package/dist/lib/categoryMenuName.js +152 -0
- package/dist/lib/categoryMenuName.ts +123 -0
- package/dist/lib/index.js +1 -1
- package/dist/lib/index.ts +5 -5
- package/dist/styles/globals.css +183 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/lib/catagoryMenuName.js +0 -8
- package/dist/lib/catagoryMenuName.ts +0 -12
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M16.6667 14.1668V9.54352C16.6667 9.09824 16.6663 8.87548 16.6122 8.66828C16.5642 8.48466 16.4854 8.31089 16.3788 8.15387C16.2586 7.97668 16.0913 7.82974 15.7562 7.53652L11.7562 4.03652C11.134 3.49212 10.823 3.22005 10.4729 3.11652C10.1644 3.02529 9.83555 3.02529 9.52706 3.11652C9.17722 3.21997 8.86658 3.49178 8.24534 4.03536L4.24402 7.53652C3.90891 7.82974 3.74174 7.97668 3.62146 8.15387C3.51487 8.31089 3.4355 8.48466 3.38752 8.66828C3.33337 8.87548 3.33337 9.09824 3.33337 9.54352V14.1668C3.33337 14.9434 3.33337 15.3315 3.46024 15.6378C3.6294 16.0462 3.95364 16.371 4.36202 16.5402C4.6683 16.6671 5.05659 16.6671 5.83316 16.6671C6.60973 16.6671 6.99844 16.6671 7.30473 16.5402C7.71311 16.371 8.03726 16.0462 8.20642 15.6379C8.33329 15.3316 8.33337 14.9433 8.33337 14.1667V13.3334C8.33337 12.4129 9.07957 11.6667 10 11.6667C10.9205 11.6667 11.6667 12.4129 11.6667 13.3334V14.1667C11.6667 14.9433 11.6667 15.3316 11.7936 15.6379C11.9627 16.0462 12.287 16.371 12.6954 16.5402C13.0016 16.6671 13.3899 16.6671 14.1665 16.6671C14.9431 16.6671 15.3318 16.6671 15.6381 16.5402C16.0464 16.371 16.3706 16.0462 16.5398 15.6378C16.6666 15.3315 16.6667 14.9434 16.6667 14.1668Z" stroke="#58595B" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React, { useEffect, useState } from 'react';
|
|
3
|
+
import Link from 'next/link';
|
|
4
|
+
import IconHome from '../../asset/images/categoryMenu/House.svg';
|
|
5
|
+
import IconArrow from '../../asset/images/categoryMenu/right_arrow.svg';
|
|
6
|
+
import { categoryMenuName } from '../../lib';
|
|
7
|
+
const CategoryMenuForPage = ({ className = '', url }) => {
|
|
8
|
+
const [menu, setMenu] = useState({
|
|
9
|
+
title: '',
|
|
10
|
+
subTitle: '',
|
|
11
|
+
address: ''
|
|
12
|
+
});
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
setMenu(categoryMenuName({ url }));
|
|
15
|
+
}, [url]);
|
|
16
|
+
const reloadUrl = (targetUrl) => {
|
|
17
|
+
if (url === targetUrl) {
|
|
18
|
+
window.location.href = targetUrl;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
return (<div className={'mr-0 flex gap-[3px] text-[16px] font-normal tracking-[-0.32px] max-md:text-[14px] max-3xs:text-[12px] ' +
|
|
22
|
+
className} aria-label={'페이지 상단 네비게이션'}>
|
|
23
|
+
<Link href="/public" tabIndex={0} id="daum-wm-content" className={'relative aspect-square w-[20px] max-md:w-[18px] '}>
|
|
24
|
+
<IconHome className={'h-full w-full object-contain'}/>
|
|
25
|
+
</Link>
|
|
26
|
+
{menu.title === menu.subTitle ? (<>
|
|
27
|
+
<IconArrow className={'aspect-square w-[20px] scale-[-1] stroke-[#58595B] max-md:w-[18px] max-3xs:w-[16px]'}/>
|
|
28
|
+
<Link href={`/${menu.address}`} onClick={() => reloadUrl(`/${menu.address}`)}>
|
|
29
|
+
<div className={'text-[#58595B]'}>{menu.title}</div>
|
|
30
|
+
</Link>
|
|
31
|
+
</>) : (<>
|
|
32
|
+
<IconArrow className={'aspect-square w-[20px] scale-[-1] stroke-[#58595B] max-md:w-[18px] max-3xs:w-[16px]'}/>
|
|
33
|
+
<div className={'text-[#58595B]'}>{menu.title}</div>
|
|
34
|
+
<IconArrow className={'aspect-square w-[20px] scale-[-1] stroke-[#58595B] max-md:w-[18px] max-3xs:w-[16px]'}/>
|
|
35
|
+
<Link href={`/${menu.address}`} onClick={() => reloadUrl(`/${menu.address}`)}>
|
|
36
|
+
<div className={'text-[#58595B]'}>{menu.subTitle}</div>
|
|
37
|
+
</Link>
|
|
38
|
+
</>)}
|
|
39
|
+
</div>);
|
|
40
|
+
};
|
|
41
|
+
export default CategoryMenuForPage;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
4
|
+
import Link from 'next/link';
|
|
5
|
+
import IconHome from '../../asset/images/categoryMenu/House.svg';
|
|
6
|
+
import IconArrow from '../../asset/images/categoryMenu/right_arrow.svg';
|
|
7
|
+
import { categoryMenuName } from '../../lib';
|
|
8
|
+
|
|
9
|
+
type CategoryMenuType = {
|
|
10
|
+
className?: string;
|
|
11
|
+
url: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const CategoryMenuForPage = ({ className = '', url }: CategoryMenuType) => {
|
|
15
|
+
const [menu, setMenu] = useState({
|
|
16
|
+
title: '',
|
|
17
|
+
subTitle: '',
|
|
18
|
+
address: ''
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
setMenu(categoryMenuName({ url }));
|
|
23
|
+
}, [url]);
|
|
24
|
+
|
|
25
|
+
const reloadUrl = (targetUrl: string) => {
|
|
26
|
+
if (url === targetUrl) {
|
|
27
|
+
window.location.href = targetUrl;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<div
|
|
33
|
+
className={
|
|
34
|
+
'mr-0 flex gap-[3px] text-[16px] font-normal tracking-[-0.32px] max-md:text-[14px] max-3xs:text-[12px] ' +
|
|
35
|
+
className
|
|
36
|
+
}
|
|
37
|
+
aria-label={'페이지 상단 네비게이션'}
|
|
38
|
+
>
|
|
39
|
+
<Link
|
|
40
|
+
href="/public"
|
|
41
|
+
tabIndex={0}
|
|
42
|
+
id="daum-wm-content"
|
|
43
|
+
className={'relative aspect-square w-[20px] max-md:w-[18px] '}
|
|
44
|
+
>
|
|
45
|
+
<IconHome className={'h-full w-full object-contain'} />
|
|
46
|
+
</Link>
|
|
47
|
+
{menu.title === menu.subTitle ? (
|
|
48
|
+
<>
|
|
49
|
+
<IconArrow
|
|
50
|
+
className={
|
|
51
|
+
'aspect-square w-[20px] scale-[-1] stroke-[#58595B] max-md:w-[18px] max-3xs:w-[16px]'
|
|
52
|
+
}
|
|
53
|
+
/>
|
|
54
|
+
<Link href={`/${menu.address}`} onClick={() => reloadUrl(`/${menu.address}`)}>
|
|
55
|
+
<div className={'text-[#58595B]'}>{menu.title}</div>
|
|
56
|
+
</Link>
|
|
57
|
+
</>
|
|
58
|
+
) : (
|
|
59
|
+
<>
|
|
60
|
+
<IconArrow
|
|
61
|
+
className={
|
|
62
|
+
'aspect-square w-[20px] scale-[-1] stroke-[#58595B] max-md:w-[18px] max-3xs:w-[16px]'
|
|
63
|
+
}
|
|
64
|
+
/>
|
|
65
|
+
<div className={'text-[#58595B]'}>{menu.title}</div>
|
|
66
|
+
<IconArrow
|
|
67
|
+
className={
|
|
68
|
+
'aspect-square w-[20px] scale-[-1] stroke-[#58595B] max-md:w-[18px] max-3xs:w-[16px]'
|
|
69
|
+
}
|
|
70
|
+
/>
|
|
71
|
+
<Link href={`/${menu.address}`} onClick={() => reloadUrl(`/${menu.address}`)}>
|
|
72
|
+
<div className={'text-[#58595B]'}>{menu.subTitle}</div>
|
|
73
|
+
</Link>
|
|
74
|
+
</>
|
|
75
|
+
)}
|
|
76
|
+
</div>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export default CategoryMenuForPage;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const ImgTypes: {
|
|
3
|
+
readonly ARCHIVE: "archive";
|
|
4
|
+
readonly BROADCAST: "broadcast";
|
|
5
|
+
readonly FIELD: "field";
|
|
6
|
+
readonly INFO: "info";
|
|
7
|
+
readonly NOTICE: "notice";
|
|
8
|
+
readonly REPLY: "reply";
|
|
9
|
+
readonly SUCCESS: "success";
|
|
10
|
+
readonly TREND: "trend";
|
|
11
|
+
};
|
|
12
|
+
type ImgType = (typeof ImgTypes)[keyof typeof ImgTypes];
|
|
13
|
+
interface PageTitleBoxProps {
|
|
14
|
+
titleTxt: React.ReactNode;
|
|
15
|
+
subTxt?: React.ReactNode;
|
|
16
|
+
imgType: ImgType;
|
|
17
|
+
url: string;
|
|
18
|
+
}
|
|
19
|
+
declare const PageTitleBox: ({ titleTxt, subTxt, imgType, url }: PageTitleBoxProps) => React.JSX.Element;
|
|
20
|
+
export default PageTitleBox;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Image from 'next/image';
|
|
4
|
+
import PageWrapper from '../Layout/PageWrapper';
|
|
5
|
+
import CategoryMenuForPage from '../CategoryMenu/CategoryMenuForPage';
|
|
6
|
+
import SubPageTitle from '../SubPage/SubPageTitle';
|
|
7
|
+
import archiveImg from '../../asset/images/PageTitleBox/archive.webp';
|
|
8
|
+
import broadcastImg from '../../asset/images/PageTitleBox/broadcast.webp';
|
|
9
|
+
import fieldImg from '../../asset/images/PageTitleBox/field.webp';
|
|
10
|
+
import infoImg from '../../asset/images/PageTitleBox/info.webp';
|
|
11
|
+
import noticeImg from '../../asset/images/PageTitleBox/notice.webp';
|
|
12
|
+
import replyImg from '../../asset/images/PageTitleBox/reply.webp';
|
|
13
|
+
import successImg from '../../asset/images/PageTitleBox/success.webp';
|
|
14
|
+
import trendImg from '../../asset/images/PageTitleBox/trend.webp';
|
|
15
|
+
export const ImgTypes = {
|
|
16
|
+
ARCHIVE: 'archive',
|
|
17
|
+
BROADCAST: 'broadcast',
|
|
18
|
+
FIELD: 'field',
|
|
19
|
+
INFO: 'info',
|
|
20
|
+
NOTICE: 'notice',
|
|
21
|
+
REPLY: 'reply',
|
|
22
|
+
SUCCESS: 'success',
|
|
23
|
+
TREND: 'trend'
|
|
24
|
+
};
|
|
25
|
+
const imageMap = {
|
|
26
|
+
[ImgTypes.ARCHIVE]: archiveImg,
|
|
27
|
+
[ImgTypes.BROADCAST]: broadcastImg,
|
|
28
|
+
[ImgTypes.FIELD]: fieldImg,
|
|
29
|
+
[ImgTypes.INFO]: infoImg,
|
|
30
|
+
[ImgTypes.NOTICE]: noticeImg,
|
|
31
|
+
[ImgTypes.REPLY]: replyImg,
|
|
32
|
+
[ImgTypes.SUCCESS]: successImg,
|
|
33
|
+
[ImgTypes.TREND]: trendImg
|
|
34
|
+
};
|
|
35
|
+
const PageTitleBox = ({ titleTxt, subTxt, imgType, url }) => {
|
|
36
|
+
return (<div className={'relative mt-[120px] flex h-[300px] w-full flex-col items-start justify-center bg-gray-200 ' +
|
|
37
|
+
//768px
|
|
38
|
+
'max-md:h-[250px] ' +
|
|
39
|
+
//640px
|
|
40
|
+
'max-sm:mt-[68px] ' +
|
|
41
|
+
//480px
|
|
42
|
+
'max-xs:h-[200px] '}>
|
|
43
|
+
<Image src={imageMap[imgType]} alt={''} fill sizes={'100vw'} className={'h-full w-full object-cover'} unoptimized draggable={false}/>
|
|
44
|
+
<PageWrapper className={'relative'}>
|
|
45
|
+
<CategoryMenuForPage className={'mb-[26px] max-md:mb-[20px] max-xs:mb-[12px] '} url={''}/>
|
|
46
|
+
<SubPageTitle titleTxt={titleTxt} subTxt={subTxt}/>
|
|
47
|
+
</PageWrapper>
|
|
48
|
+
</div>);
|
|
49
|
+
};
|
|
50
|
+
export default PageTitleBox;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import PageTitleBox, { ImgTypes } from './PageTitleBox';
|
|
2
|
+
const meta = {
|
|
3
|
+
component: PageTitleBox,
|
|
4
|
+
title: 'PageTitleBox'
|
|
5
|
+
};
|
|
6
|
+
export default meta;
|
|
7
|
+
export const Default = {
|
|
8
|
+
render: args => {
|
|
9
|
+
return (<div className={'w-full'}>
|
|
10
|
+
<PageTitleBox {...args}/>
|
|
11
|
+
</div>);
|
|
12
|
+
},
|
|
13
|
+
args: {
|
|
14
|
+
titleTxt: <>업무사례</>,
|
|
15
|
+
subTxt: <>손해배상(기)</>,
|
|
16
|
+
imgType: ImgTypes.ARCHIVE,
|
|
17
|
+
url: ''
|
|
18
|
+
}
|
|
19
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import PageTitleBox, { ImgTypes } from './PageTitleBox';
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof PageTitleBox> = {
|
|
5
|
+
component: PageTitleBox,
|
|
6
|
+
title: 'PageTitleBox'
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
|
|
10
|
+
type Story = StoryObj<typeof meta>;
|
|
11
|
+
|
|
12
|
+
export const Default: Story = {
|
|
13
|
+
render: args => {
|
|
14
|
+
return (
|
|
15
|
+
<div className={'w-full'}>
|
|
16
|
+
<PageTitleBox {...args} />
|
|
17
|
+
</div>
|
|
18
|
+
);
|
|
19
|
+
},
|
|
20
|
+
args: {
|
|
21
|
+
titleTxt: <>업무사례</>,
|
|
22
|
+
subTxt: <>손해배상(기)</>,
|
|
23
|
+
imgType: ImgTypes.ARCHIVE,
|
|
24
|
+
url: ''
|
|
25
|
+
}
|
|
26
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import Image, { StaticImageData } from 'next/image';
|
|
5
|
+
import PageWrapper from '../Layout/PageWrapper';
|
|
6
|
+
import CategoryMenuForPage from '../CategoryMenu/CategoryMenuForPage';
|
|
7
|
+
import SubPageTitle from '../SubPage/SubPageTitle';
|
|
8
|
+
|
|
9
|
+
import archiveImg from '../../asset/images/PageTitleBox/archive.webp';
|
|
10
|
+
import broadcastImg from '../../asset/images/PageTitleBox/broadcast.webp';
|
|
11
|
+
import fieldImg from '../../asset/images/PageTitleBox/field.webp';
|
|
12
|
+
import infoImg from '../../asset/images/PageTitleBox/info.webp';
|
|
13
|
+
import noticeImg from '../../asset/images/PageTitleBox/notice.webp';
|
|
14
|
+
import replyImg from '../../asset/images/PageTitleBox/reply.webp';
|
|
15
|
+
import successImg from '../../asset/images/PageTitleBox/success.webp';
|
|
16
|
+
import trendImg from '../../asset/images/PageTitleBox/trend.webp';
|
|
17
|
+
|
|
18
|
+
export const ImgTypes = {
|
|
19
|
+
ARCHIVE: 'archive',
|
|
20
|
+
BROADCAST: 'broadcast',
|
|
21
|
+
FIELD: 'field',
|
|
22
|
+
INFO: 'info',
|
|
23
|
+
NOTICE: 'notice',
|
|
24
|
+
REPLY: 'reply',
|
|
25
|
+
SUCCESS: 'success',
|
|
26
|
+
TREND: 'trend'
|
|
27
|
+
} as const;
|
|
28
|
+
type ImgType = (typeof ImgTypes)[keyof typeof ImgTypes];
|
|
29
|
+
|
|
30
|
+
const imageMap: Record<ImgType, StaticImageData> = {
|
|
31
|
+
[ImgTypes.ARCHIVE]: archiveImg,
|
|
32
|
+
[ImgTypes.BROADCAST]: broadcastImg,
|
|
33
|
+
[ImgTypes.FIELD]: fieldImg,
|
|
34
|
+
[ImgTypes.INFO]: infoImg,
|
|
35
|
+
[ImgTypes.NOTICE]: noticeImg,
|
|
36
|
+
[ImgTypes.REPLY]: replyImg,
|
|
37
|
+
[ImgTypes.SUCCESS]: successImg,
|
|
38
|
+
[ImgTypes.TREND]: trendImg
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
interface PageTitleBoxProps {
|
|
42
|
+
titleTxt: React.ReactNode;
|
|
43
|
+
subTxt?: React.ReactNode;
|
|
44
|
+
imgType: ImgType;
|
|
45
|
+
url: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const PageTitleBox = ({ titleTxt, subTxt, imgType, url }: PageTitleBoxProps) => {
|
|
49
|
+
return (
|
|
50
|
+
<div
|
|
51
|
+
className={
|
|
52
|
+
'relative mt-[120px] flex h-[300px] w-full flex-col items-start justify-center bg-gray-200 ' +
|
|
53
|
+
//768px
|
|
54
|
+
'max-md:h-[250px] ' +
|
|
55
|
+
//640px
|
|
56
|
+
'max-sm:mt-[68px] ' +
|
|
57
|
+
//480px
|
|
58
|
+
'max-xs:h-[200px] '
|
|
59
|
+
}
|
|
60
|
+
>
|
|
61
|
+
<Image
|
|
62
|
+
src={imageMap[imgType]}
|
|
63
|
+
alt={''}
|
|
64
|
+
fill
|
|
65
|
+
sizes={'100vw'}
|
|
66
|
+
className={'h-full w-full object-cover'}
|
|
67
|
+
unoptimized
|
|
68
|
+
draggable={false}
|
|
69
|
+
/>
|
|
70
|
+
<PageWrapper className={'relative'}>
|
|
71
|
+
<CategoryMenuForPage className={'mb-[26px] max-md:mb-[20px] max-xs:mb-[12px] '} url={''} />
|
|
72
|
+
<SubPageTitle titleTxt={titleTxt} subTxt={subTxt} />
|
|
73
|
+
</PageWrapper>
|
|
74
|
+
</div>
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export default PageTitleBox;
|
|
@@ -11,7 +11,7 @@ const SeoStrength = ({ initialData }) => {
|
|
|
11
11
|
const data = [
|
|
12
12
|
'대륜 로펌만의\n<b>AI 빅데이터 판결 분석</b> 변론',
|
|
13
13
|
`<b>${initialData.pro_count}명 이상</b>의\n다양한 분야의 전문가들`,
|
|
14
|
-
|
|
14
|
+
`${initialData.consult_date.toLocaleString()}\n<b>${initialData.mandate_cnt.toLocaleString()}건의 수임건수</b>` // Use template literal to inject initialData
|
|
15
15
|
];
|
|
16
16
|
const iconComponents = {
|
|
17
17
|
0: Icon1,
|
|
@@ -15,7 +15,7 @@ const SeoStrength = ({ initialData }: { initialData: IInitialDataTypes }) => {
|
|
|
15
15
|
const data = [
|
|
16
16
|
'대륜 로펌만의\n<b>AI 빅데이터 판결 분석</b> 변론',
|
|
17
17
|
`<b>${initialData.pro_count}명 이상</b>의\n다양한 분야의 전문가들`,
|
|
18
|
-
|
|
18
|
+
`${initialData.consult_date.toLocaleString()}\n<b>${initialData.mandate_cnt.toLocaleString()}건의 수임건수</b>` // Use template literal to inject initialData
|
|
19
19
|
];
|
|
20
20
|
|
|
21
21
|
const iconComponents: any = {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const SubPageTitle: (props: {
|
|
3
|
+
titleTxt: React.ReactNode;
|
|
4
|
+
subTxt?: React.ReactNode;
|
|
5
|
+
minTitle?: React.ReactNode;
|
|
6
|
+
minTxt?: React.ReactNode;
|
|
7
|
+
tailwindStyle?: string;
|
|
8
|
+
marginBottom?: number;
|
|
9
|
+
isViewP?: boolean;
|
|
10
|
+
isRed?: boolean;
|
|
11
|
+
}) => React.JSX.Element;
|
|
12
|
+
export default SubPageTitle;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
const SubPageTitle = (props) => {
|
|
3
|
+
return (<div className={props.tailwindStyle ? props.tailwindStyle : ''}>
|
|
4
|
+
<section className={'relative mx-auto flex w-full flex-row items-center justify-between '}>
|
|
5
|
+
{props.isViewP ? (<p className={'relative block font-[SUIT] text-6xl font-[800] tracking-[-1.5px] ' +
|
|
6
|
+
(props.isRed ? ' after:bg-mainRed ' : ' after:bg-[#285FA7] ') +
|
|
7
|
+
//1500px
|
|
8
|
+
'max-3xl:text-5xl max-3xl:after:right-[-20px] max-3xl:after:top-[-15px] max-3xl:after:h-[15px] max-3xl:after:w-[15px] ' +
|
|
9
|
+
//768px
|
|
10
|
+
'max-md:text-4xl max-md:after:right-[-18px] max-md:after:top-[-10px] max-md:after:h-[12px] max-md:after:w-[12px] ' +
|
|
11
|
+
//325px
|
|
12
|
+
'max-3xs:text-[28px] max-3xs:after:right-[-15px] max-3xs:after:top-[-3px] max-3xs:after:h-[10px] max-3xs:after:w-[10px]'}>
|
|
13
|
+
{props.titleTxt}
|
|
14
|
+
</p>) : (<h1 className={'relative block font-[SUIT] text-6xl font-[800] tracking-[-1.5px] ' +
|
|
15
|
+
(props.isRed ? ' after:bg-mainRed ' : ' after:bg-[#285FA7] ') +
|
|
16
|
+
//1500px
|
|
17
|
+
'max-3xl:text-5xl max-3xl:after:right-[-20px] max-3xl:after:top-[-15px] max-3xl:after:h-[15px] max-3xl:after:w-[15px] ' +
|
|
18
|
+
//768px
|
|
19
|
+
'max-md:text-4xl max-md:after:right-[-18px] max-md:after:top-[-10px] max-md:after:h-[12px] max-md:after:w-[12px] ' +
|
|
20
|
+
'max-xs:text-[32px] ' +
|
|
21
|
+
//325px
|
|
22
|
+
'max-3xs:text-[28px] max-3xs:after:right-[-15px] max-3xs:after:top-[-3px] max-3xs:after:h-[10px] max-3xs:after:w-[10px]'}>
|
|
23
|
+
{props.titleTxt}
|
|
24
|
+
</h1>)}
|
|
25
|
+
</section>
|
|
26
|
+
{props.subTxt ? (<div className={'mt-[17px] break-keep text-[26px] leading-[1.35] tracking-[-0.7px] text-[#58595B] ' +
|
|
27
|
+
//1500px
|
|
28
|
+
'max-3xl:text-[24px] ' +
|
|
29
|
+
//768px
|
|
30
|
+
'max-md:mt-[10px] max-md:text-[16px] ' +
|
|
31
|
+
//325px
|
|
32
|
+
'max-3xs:mt-[8px] max-3xs:text-[15px] '}>
|
|
33
|
+
{props.subTxt}
|
|
34
|
+
</div>) : ('')}
|
|
35
|
+
{props.minTitle ? (<p className={'mt-[20px] text-3xl font-normal uppercase tracking-normal text-[#285FA7] ' +
|
|
36
|
+
(props.isRed ? ' text-mainRed ' : ' text-[#285FA7] ') +
|
|
37
|
+
//1500px
|
|
38
|
+
'mt-[10px] max-3xl:text-2xl ' +
|
|
39
|
+
//768px
|
|
40
|
+
'max-md:mt-[5px] max-md:text-xl ' +
|
|
41
|
+
//325px
|
|
42
|
+
'max-3xs:mt-0 max-3xs:text-[14px]'}>
|
|
43
|
+
{props.minTitle}
|
|
44
|
+
</p>) : ('')}
|
|
45
|
+
|
|
46
|
+
{props.minTxt ? (<div className={' mt-[10px] break-keep text-[18px] tracking-[-0.4px] ' +
|
|
47
|
+
//1500px
|
|
48
|
+
'max-3xl:text-[16px] ' +
|
|
49
|
+
//768px
|
|
50
|
+
'max-md:mt-[12px] max-md:text-[12px] ' +
|
|
51
|
+
//325px
|
|
52
|
+
'max-md:mt-[12px] max-3xs:text-[12px] '}>
|
|
53
|
+
{props.minTxt}
|
|
54
|
+
</div>) : ('')}
|
|
55
|
+
|
|
56
|
+
{/*하단공백(margin bottom)*/}
|
|
57
|
+
{props.marginBottom ? <div style={{ width: '100%', height: `${props.marginBottom}px` }}></div> : ''}
|
|
58
|
+
|
|
59
|
+
{/*뷰페이지 하단 공백*/}
|
|
60
|
+
{props.isViewP ? (<div className={'h-[30px] w-full ' +
|
|
61
|
+
//768px
|
|
62
|
+
'max-md:h-[20px] ' +
|
|
63
|
+
//325px
|
|
64
|
+
'max-3xs:h-[10px] '}></div>) : ('')}
|
|
65
|
+
</div>);
|
|
66
|
+
};
|
|
67
|
+
export default SubPageTitle;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const SubPageTitle = (props: {
|
|
4
|
+
titleTxt: React.ReactNode;
|
|
5
|
+
subTxt?: React.ReactNode;
|
|
6
|
+
minTitle?: React.ReactNode;
|
|
7
|
+
minTxt?: React.ReactNode;
|
|
8
|
+
tailwindStyle?: string;
|
|
9
|
+
marginBottom?: number;
|
|
10
|
+
isViewP?: boolean;
|
|
11
|
+
isRed?: boolean;
|
|
12
|
+
}) => {
|
|
13
|
+
return (
|
|
14
|
+
<div className={props.tailwindStyle ? props.tailwindStyle : ''}>
|
|
15
|
+
<section className={'relative mx-auto flex w-full flex-row items-center justify-between '}>
|
|
16
|
+
{props.isViewP ? (
|
|
17
|
+
<p
|
|
18
|
+
className={
|
|
19
|
+
'relative block font-[SUIT] text-6xl font-[800] tracking-[-1.5px] ' +
|
|
20
|
+
(props.isRed ? ' after:bg-mainRed ' : ' after:bg-[#285FA7] ') +
|
|
21
|
+
//1500px
|
|
22
|
+
'max-3xl:text-5xl max-3xl:after:right-[-20px] max-3xl:after:top-[-15px] max-3xl:after:h-[15px] max-3xl:after:w-[15px] ' +
|
|
23
|
+
//768px
|
|
24
|
+
'max-md:text-4xl max-md:after:right-[-18px] max-md:after:top-[-10px] max-md:after:h-[12px] max-md:after:w-[12px] ' +
|
|
25
|
+
//325px
|
|
26
|
+
'max-3xs:text-[28px] max-3xs:after:right-[-15px] max-3xs:after:top-[-3px] max-3xs:after:h-[10px] max-3xs:after:w-[10px]'
|
|
27
|
+
}
|
|
28
|
+
>
|
|
29
|
+
{props.titleTxt}
|
|
30
|
+
</p>
|
|
31
|
+
) : (
|
|
32
|
+
<h1
|
|
33
|
+
className={
|
|
34
|
+
'relative block font-[SUIT] text-6xl font-[800] tracking-[-1.5px] ' +
|
|
35
|
+
(props.isRed ? ' after:bg-mainRed ' : ' after:bg-[#285FA7] ') +
|
|
36
|
+
//1500px
|
|
37
|
+
'max-3xl:text-5xl max-3xl:after:right-[-20px] max-3xl:after:top-[-15px] max-3xl:after:h-[15px] max-3xl:after:w-[15px] ' +
|
|
38
|
+
//768px
|
|
39
|
+
'max-md:text-4xl max-md:after:right-[-18px] max-md:after:top-[-10px] max-md:after:h-[12px] max-md:after:w-[12px] ' +
|
|
40
|
+
'max-xs:text-[32px] ' +
|
|
41
|
+
//325px
|
|
42
|
+
'max-3xs:text-[28px] max-3xs:after:right-[-15px] max-3xs:after:top-[-3px] max-3xs:after:h-[10px] max-3xs:after:w-[10px]'
|
|
43
|
+
}
|
|
44
|
+
>
|
|
45
|
+
{props.titleTxt}
|
|
46
|
+
</h1>
|
|
47
|
+
)}
|
|
48
|
+
</section>
|
|
49
|
+
{props.subTxt ? (
|
|
50
|
+
<div
|
|
51
|
+
className={
|
|
52
|
+
'mt-[17px] break-keep text-[26px] leading-[1.35] tracking-[-0.7px] text-[#58595B] ' +
|
|
53
|
+
//1500px
|
|
54
|
+
'max-3xl:text-[24px] ' +
|
|
55
|
+
//768px
|
|
56
|
+
'max-md:mt-[10px] max-md:text-[16px] ' +
|
|
57
|
+
//325px
|
|
58
|
+
'max-3xs:mt-[8px] max-3xs:text-[15px] '
|
|
59
|
+
}
|
|
60
|
+
>
|
|
61
|
+
{props.subTxt}
|
|
62
|
+
</div>
|
|
63
|
+
) : (
|
|
64
|
+
''
|
|
65
|
+
)}
|
|
66
|
+
{props.minTitle ? (
|
|
67
|
+
<p
|
|
68
|
+
className={
|
|
69
|
+
'mt-[20px] text-3xl font-normal uppercase tracking-normal text-[#285FA7] ' +
|
|
70
|
+
(props.isRed ? ' text-mainRed ' : ' text-[#285FA7] ') +
|
|
71
|
+
//1500px
|
|
72
|
+
'mt-[10px] max-3xl:text-2xl ' +
|
|
73
|
+
//768px
|
|
74
|
+
'max-md:mt-[5px] max-md:text-xl ' +
|
|
75
|
+
//325px
|
|
76
|
+
'max-3xs:mt-0 max-3xs:text-[14px]'
|
|
77
|
+
}
|
|
78
|
+
>
|
|
79
|
+
{props.minTitle}
|
|
80
|
+
</p>
|
|
81
|
+
) : (
|
|
82
|
+
''
|
|
83
|
+
)}
|
|
84
|
+
|
|
85
|
+
{props.minTxt ? (
|
|
86
|
+
<div
|
|
87
|
+
className={
|
|
88
|
+
' mt-[10px] break-keep text-[18px] tracking-[-0.4px] ' +
|
|
89
|
+
//1500px
|
|
90
|
+
'max-3xl:text-[16px] ' +
|
|
91
|
+
//768px
|
|
92
|
+
'max-md:mt-[12px] max-md:text-[12px] ' +
|
|
93
|
+
//325px
|
|
94
|
+
'max-md:mt-[12px] max-3xs:text-[12px] '
|
|
95
|
+
}
|
|
96
|
+
>
|
|
97
|
+
{props.minTxt}
|
|
98
|
+
</div>
|
|
99
|
+
) : (
|
|
100
|
+
''
|
|
101
|
+
)}
|
|
102
|
+
|
|
103
|
+
{/*하단공백(margin bottom)*/}
|
|
104
|
+
{props.marginBottom ? <div style={{ width: '100%', height: `${props.marginBottom}px` }}></div> : ''}
|
|
105
|
+
|
|
106
|
+
{/*뷰페이지 하단 공백*/}
|
|
107
|
+
{props.isViewP ? (
|
|
108
|
+
<div
|
|
109
|
+
className={
|
|
110
|
+
'h-[30px] w-full ' +
|
|
111
|
+
//768px
|
|
112
|
+
'max-md:h-[20px] ' +
|
|
113
|
+
//325px
|
|
114
|
+
'max-3xs:h-[10px] '
|
|
115
|
+
}
|
|
116
|
+
></div>
|
|
117
|
+
) : (
|
|
118
|
+
''
|
|
119
|
+
)}
|
|
120
|
+
</div>
|
|
121
|
+
);
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export default SubPageTitle;
|