@daeryun/dr_components 1.3.50 → 1.3.51
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/page/Blog/Blog.jsx +34 -29
- package/dist/components/page/Blog/Blog.tsx +70 -74
- package/dist/components/page/Blog/BlogList.d.ts +19 -0
- package/dist/components/page/Blog/BlogList.jsx +72 -0
- package/dist/components/page/Blog/BlogList.tsx +152 -0
- package/dist/components/page/Blog/BlogTypes.d.ts +11 -10
- package/dist/components/page/Blog/BlogTypes.ts +14 -2
- package/dist/components/page/Blog/BlogView.jsx +33 -29
- package/dist/components/page/Blog/BlogView.tsx +69 -78
- package/dist/components/page/index.d.ts +1 -0
- package/dist/components/page/index.js +1 -0
- package/dist/components/page/index.ts +1 -0
- package/dist/styles/globals.css +24 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -33,8 +33,7 @@ const Blog = ({ data, tel }: IBlogPageTypes) => {
|
|
|
33
33
|
shortsLinkList,
|
|
34
34
|
youtubeLinkList,
|
|
35
35
|
initialData,
|
|
36
|
-
|
|
37
|
-
prevPost
|
|
36
|
+
pnData
|
|
38
37
|
} = data;
|
|
39
38
|
const { width } = useBrowser(true);
|
|
40
39
|
const printRef = useRef<HTMLDivElement>(null);
|
|
@@ -372,89 +371,86 @@ const Blog = ({ data, tel }: IBlogPageTypes) => {
|
|
|
372
371
|
<></>
|
|
373
372
|
)}
|
|
374
373
|
{/* 이전글 다음글 */}
|
|
375
|
-
<
|
|
376
|
-
<div className={'flex
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
374
|
+
<section className={'mt-[60px] w-full max-md:mb-[30px]'}>
|
|
375
|
+
<div className={'flex w-full items-center justify-between max-md:flex-col'}>
|
|
376
|
+
{pnData[0].pre_idx ? (
|
|
377
|
+
<Link
|
|
378
|
+
href={pnData[0].pre_domain + 'blog/' + pnData[0].pre_idx}
|
|
379
|
+
target={
|
|
380
|
+
pnData[0].pre_center_code != process.env.NEXT_PUBLIC_CENTER_CODE
|
|
381
|
+
? '_target'
|
|
382
|
+
: '_self'
|
|
383
|
+
}
|
|
384
|
+
className={
|
|
385
|
+
'mb-6 flex w-full flex-col gap-[8px] md:mb-0 md:w-auto md:flex-row md:gap-[20px] lg:w-auto lg2:gap-[28px]'
|
|
386
|
+
}
|
|
387
|
+
aria-label={'이전글 ' + pnData[0].pre_title}
|
|
388
|
+
>
|
|
389
|
+
<Image
|
|
390
|
+
src={Arrow}
|
|
391
|
+
alt={''}
|
|
392
|
+
width={15}
|
|
393
|
+
height={15}
|
|
394
|
+
className={'m-auto hidden md:block'}
|
|
395
|
+
/>
|
|
396
|
+
<p className={'text-[#285FA7]'}>이전글</p>
|
|
397
|
+
<div>
|
|
398
|
+
<p className={'truncate md:w-[11em] lg:w-[14em] lg2:w-[18em] '}>
|
|
399
|
+
{pnData[0].pre_title}
|
|
399
400
|
</p>
|
|
400
|
-
</
|
|
401
|
-
|
|
402
|
-
|
|
401
|
+
</div>
|
|
402
|
+
</Link>
|
|
403
|
+
) : (
|
|
404
|
+
<div className={'flex w-[30%] gap-[28px]'}></div>
|
|
405
|
+
)}
|
|
406
|
+
|
|
407
|
+
{pnData[0].next_idx ? (
|
|
408
|
+
<>
|
|
409
|
+
<Link
|
|
410
|
+
href={pnData[0].next_domain + 'blog/' + pnData[0].next_idx}
|
|
411
|
+
target={
|
|
412
|
+
pnData[0].next_center_code != process.env.NEXT_PUBLIC_CENTER_CODE
|
|
413
|
+
? '_target'
|
|
414
|
+
: '_self'
|
|
415
|
+
}
|
|
403
416
|
className={
|
|
404
|
-
'
|
|
417
|
+
'flex w-full flex-col justify-end gap-[8px] md:order-last md:w-auto md:flex-row md:gap-[20px] lg:w-auto lg2:gap-[28px]'
|
|
405
418
|
}
|
|
419
|
+
aria-label={'다음글 ' + pnData[0].next_title}
|
|
406
420
|
>
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
421
|
+
<p className={'text-[#285FA7]'}>다음글</p>
|
|
422
|
+
<div aria-label={'다음글 ' + pnData[0].next_title}>
|
|
423
|
+
<p className={'truncate md:w-[11em] lg:w-[14em] lg2:w-[18em] '}>
|
|
424
|
+
{pnData[0].next_title}
|
|
425
|
+
</p>
|
|
426
|
+
</div>
|
|
427
|
+
<Image
|
|
428
|
+
src={RightArrow}
|
|
429
|
+
alt={''}
|
|
430
|
+
width={15}
|
|
431
|
+
height={15}
|
|
432
|
+
className={'m-auto hidden md:block'}
|
|
433
|
+
/>
|
|
434
|
+
</Link>
|
|
435
|
+
</>
|
|
436
|
+
) : (
|
|
437
|
+
<div className={'order-last flex w-[30%] gap-[28px]'}></div>
|
|
438
|
+
)}
|
|
411
439
|
|
|
412
|
-
<Link href={
|
|
413
|
-
<
|
|
440
|
+
<Link href={`/blog`} className={'max-md:mt-[40px]'}>
|
|
441
|
+
<div
|
|
414
442
|
className={
|
|
415
|
-
'rounded-[30px] border-[1px] border-solid border-[#b0b0b0] bg-[#41464C] px-[
|
|
443
|
+
'rounded-[30px] border-[1px] border-solid border-[#b0b0b0] bg-[#41464C] px-[32px] py-[10px] text-[#fff] lg2:px-[70px] lg2:py-[15px] '
|
|
416
444
|
}
|
|
417
445
|
>
|
|
418
446
|
목록보기
|
|
419
|
-
</
|
|
447
|
+
</div>
|
|
420
448
|
</Link>
|
|
421
|
-
|
|
422
|
-
<div
|
|
423
|
-
className={
|
|
424
|
-
'flex w-full flex-col justify-end gap-[8px] lg:w-auto lg:flex-row lg:items-center lg:gap-[20px] lg2:gap-[28px]'
|
|
425
|
-
}
|
|
426
|
-
>
|
|
427
|
-
<p className={'text-[18px] text-[#285FA7]'}>다음글</p>
|
|
428
|
-
{nextPost ? (
|
|
429
|
-
<Link href={nextPost ? nextPost.pathname + String(nextPost.idx) : '#'}>
|
|
430
|
-
<p
|
|
431
|
-
className={
|
|
432
|
-
'w-full truncate text-[16px] xs:text-[18px] lg:w-[14em] lg2:w-[18em] xxl:w-[18em] xxl:text-[20px] 5xl:w-[20em] '
|
|
433
|
-
}
|
|
434
|
-
>
|
|
435
|
-
{nextPost.title}
|
|
436
|
-
</p>
|
|
437
|
-
</Link>
|
|
438
|
-
) : (
|
|
439
|
-
<p
|
|
440
|
-
className={
|
|
441
|
-
'truncate text-[16px] xs:text-[18px] lg:w-[14em] lg2:w-[18em] xxl:w-[18em] xxl:text-[20px] 5xl:w-[20em]'
|
|
442
|
-
}
|
|
443
|
-
>
|
|
444
|
-
다음글이 없습니다.
|
|
445
|
-
</p>
|
|
446
|
-
)}
|
|
447
|
-
<Image
|
|
448
|
-
src={RightArrow}
|
|
449
|
-
alt={'화살표'}
|
|
450
|
-
title={'화살표'}
|
|
451
|
-
width={15}
|
|
452
|
-
height={15}
|
|
453
|
-
className={'m-auto hidden lg:block'}
|
|
454
|
-
/>
|
|
455
|
-
</div>
|
|
456
449
|
</div>
|
|
457
|
-
|
|
450
|
+
|
|
451
|
+
<div className={'my-10 mt-20 w-[100%]'}></div>
|
|
452
|
+
</section>
|
|
453
|
+
|
|
458
454
|
</div>
|
|
459
455
|
</div>
|
|
460
456
|
</div>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface IBlogListTypes {
|
|
3
|
+
tag_title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
type_idx: number;
|
|
6
|
+
created_at: string;
|
|
7
|
+
file_alt: string;
|
|
8
|
+
file_path: string;
|
|
9
|
+
save_file_name: string;
|
|
10
|
+
center_code?: string;
|
|
11
|
+
domain?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const BlogList: ({ list, currentPage, totalCount, isCenterBlogHas }: {
|
|
14
|
+
list: IBlogListTypes[];
|
|
15
|
+
currentPage: number;
|
|
16
|
+
totalCount: number;
|
|
17
|
+
isCenterBlogHas: boolean;
|
|
18
|
+
}) => React.JSX.Element;
|
|
19
|
+
export default BlogList;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
import { useRouter } from 'next/router';
|
|
12
|
+
import React, { useState } from 'react';
|
|
13
|
+
import PageWrapper from '../../Layout/PageWrapper';
|
|
14
|
+
import SearchBar from '../../SearchBar/SearchBar';
|
|
15
|
+
import Link from 'next/link';
|
|
16
|
+
import Image from 'next/image';
|
|
17
|
+
import PaginationForGroup from '../../PaginationForGroup/PaginationForGroup';
|
|
18
|
+
import { htmlTagRemove } from '../../../lib';
|
|
19
|
+
const BlogList = ({ list, currentPage, totalCount, isCenterBlogHas }) => {
|
|
20
|
+
const router = useRouter();
|
|
21
|
+
const [searchInput, setSearchInput] = useState('');
|
|
22
|
+
const handleInputChange = (e) => {
|
|
23
|
+
setSearchInput(e.currentTarget.value);
|
|
24
|
+
};
|
|
25
|
+
const handleClick = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
|
+
yield router.push({
|
|
27
|
+
pathname: '/blog',
|
|
28
|
+
query: { page: 1, search: searchInput }
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
const onPaginationChange = (pageNum) => __awaiter(void 0, void 0, void 0, function* () {
|
|
32
|
+
yield router.push({
|
|
33
|
+
pathname: '/blog',
|
|
34
|
+
query: Object.assign(Object.assign({}, router.query), { page: pageNum })
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
return (<>
|
|
38
|
+
<PageWrapper>
|
|
39
|
+
<div className="sticky top-[100px] z-[45] mb-[20px] bg-white pb-[2px] pt-4 max-md:top-[60px]">
|
|
40
|
+
<SearchBar onChange={handleInputChange} onClick={handleClick} search={searchInput} placeholder={'검색어를 입력해주세요.'} isKeyPress={true} marginTop={[70, 50, 50]} marginBottom={0}/>
|
|
41
|
+
</div>
|
|
42
|
+
<section className={'column-section'}>
|
|
43
|
+
{(list === null || list === void 0 ? void 0 : list.length) > 0 ? (<div className={'grid gap-[18px] sm:grid-cols-2 lg2:grid-cols-3'}>
|
|
44
|
+
{list.map((card, idx) => (<Link href={card.center_code === process.env.NEXT_PUBLIC_CENTER_CODE || isCenterBlogHas
|
|
45
|
+
? `/blog/${card.type_idx}`
|
|
46
|
+
: card.domain + `blog/${card.type_idx}`} key={idx} className="group flex flex-col overflow-hidden rounded-[30px] border border-solid border-transparent transition duration-300 ease-out hover:border-[#DDDDDD] max-xl:border-[#DDDDDD]" target={card.center_code === process.env.NEXT_PUBLIC_CENTER_CODE || isCenterBlogHas
|
|
47
|
+
? '_self'
|
|
48
|
+
: '_blank'}>
|
|
49
|
+
<div className="relative aspect-square w-full overflow-hidden">
|
|
50
|
+
{card.save_file_name ? (<Image src={process.env.NEXT_PUBLIC_S3_URL +
|
|
51
|
+
'/upload/seo/blog/' +
|
|
52
|
+
card.save_file_name} alt={card.file_alt} fill sizes={'600px'} className="object-cover"/>) : (<Image src={`/images/column/column_list_${(idx % 6) + 1}.webp`} alt="" fill sizes={'600px'} className="object-cover"/>)}
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<div className="flex flex-col gap-3 bg-white px-4 py-6">
|
|
56
|
+
<p className="line-clamp-2 text-xl font-extrabold md:text-2xl" dangerouslySetInnerHTML={{ __html: card.tag_title }}/>
|
|
57
|
+
<p className="line-clamp-2 text-[16px] text-[#666] md:text-[18px]" dangerouslySetInnerHTML={{ __html: htmlTagRemove(card.description) }}></p>
|
|
58
|
+
</div>
|
|
59
|
+
</Link>))}
|
|
60
|
+
</div>) : (<></>)}
|
|
61
|
+
{(list === null || list === void 0 ? void 0 : list.length) < 1 ? (<>
|
|
62
|
+
<div className={'h-[300px] text-center text-[20px] leading-[300px] '}>
|
|
63
|
+
검색 결과가 없습니다.
|
|
64
|
+
</div>
|
|
65
|
+
</>) : (<></>)}
|
|
66
|
+
</section>
|
|
67
|
+
|
|
68
|
+
<PaginationForGroup total={totalCount} currentPage={Number(currentPage)} size={12} className={'my-[100px]'} onChange={onPaginationChange}/>
|
|
69
|
+
</PageWrapper>
|
|
70
|
+
</>);
|
|
71
|
+
};
|
|
72
|
+
export default BlogList;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useRouter } from 'next/router';
|
|
4
|
+
import React, { useState } from 'react';
|
|
5
|
+
import PageWrapper from '../../Layout/PageWrapper';
|
|
6
|
+
import SearchBar from '../../SearchBar/SearchBar';
|
|
7
|
+
import Link from 'next/link';
|
|
8
|
+
import Image from 'next/image';
|
|
9
|
+
import PaginationForGroup from '../../PaginationForGroup/PaginationForGroup';
|
|
10
|
+
import { htmlTagRemove } from '../../../lib';
|
|
11
|
+
|
|
12
|
+
export interface IBlogListTypes {
|
|
13
|
+
tag_title: string;
|
|
14
|
+
description: string;
|
|
15
|
+
type_idx: number;
|
|
16
|
+
created_at: string;
|
|
17
|
+
file_alt: string;
|
|
18
|
+
file_path: string;
|
|
19
|
+
save_file_name: string;
|
|
20
|
+
center_code?: string;
|
|
21
|
+
domain?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const BlogList = ({
|
|
25
|
+
list,
|
|
26
|
+
currentPage,
|
|
27
|
+
totalCount,
|
|
28
|
+
isCenterBlogHas
|
|
29
|
+
}: {
|
|
30
|
+
list: IBlogListTypes[];
|
|
31
|
+
currentPage: number;
|
|
32
|
+
totalCount: number;
|
|
33
|
+
isCenterBlogHas: boolean;
|
|
34
|
+
}) => {
|
|
35
|
+
const router = useRouter();
|
|
36
|
+
|
|
37
|
+
const [searchInput, setSearchInput] = useState<string>('');
|
|
38
|
+
|
|
39
|
+
const handleInputChange = (e: React.FormEvent<HTMLInputElement>) => {
|
|
40
|
+
setSearchInput(e.currentTarget.value);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const handleClick = async () => {
|
|
44
|
+
await router.push({
|
|
45
|
+
pathname: '/blog',
|
|
46
|
+
query: { page: 1, search: searchInput }
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const onPaginationChange = async (pageNum: number) => {
|
|
51
|
+
await router.push({
|
|
52
|
+
pathname: '/blog',
|
|
53
|
+
query: { ...router.query, page: pageNum }
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<>
|
|
59
|
+
<PageWrapper>
|
|
60
|
+
<div className="sticky top-[100px] z-[45] mb-[20px] bg-white pb-[2px] pt-4 max-md:top-[60px]">
|
|
61
|
+
<SearchBar
|
|
62
|
+
onChange={handleInputChange}
|
|
63
|
+
onClick={handleClick}
|
|
64
|
+
search={searchInput}
|
|
65
|
+
placeholder={'검색어를 입력해주세요.'}
|
|
66
|
+
isKeyPress={true}
|
|
67
|
+
marginTop={[70, 50, 50]}
|
|
68
|
+
marginBottom={0}
|
|
69
|
+
/>
|
|
70
|
+
</div>
|
|
71
|
+
<section className={'column-section'}>
|
|
72
|
+
{list?.length > 0 ? (
|
|
73
|
+
<div className={'grid gap-[18px] sm:grid-cols-2 lg2:grid-cols-3'}>
|
|
74
|
+
{list.map((card, idx) => (
|
|
75
|
+
<Link
|
|
76
|
+
href={
|
|
77
|
+
card.center_code === process.env.NEXT_PUBLIC_CENTER_CODE || isCenterBlogHas
|
|
78
|
+
? `/blog/${card.type_idx}`
|
|
79
|
+
: card.domain + `blog/${card.type_idx}`
|
|
80
|
+
}
|
|
81
|
+
key={idx}
|
|
82
|
+
className="group flex flex-col overflow-hidden rounded-[30px] border border-solid border-transparent transition duration-300 ease-out hover:border-[#DDDDDD] max-xl:border-[#DDDDDD]"
|
|
83
|
+
target={
|
|
84
|
+
card.center_code === process.env.NEXT_PUBLIC_CENTER_CODE || isCenterBlogHas
|
|
85
|
+
? '_self'
|
|
86
|
+
: '_blank'
|
|
87
|
+
}
|
|
88
|
+
>
|
|
89
|
+
<div className="relative aspect-square w-full overflow-hidden">
|
|
90
|
+
{card.save_file_name ? (
|
|
91
|
+
<Image
|
|
92
|
+
src={
|
|
93
|
+
process.env.NEXT_PUBLIC_S3_URL +
|
|
94
|
+
'/upload/seo/blog/' +
|
|
95
|
+
card.save_file_name
|
|
96
|
+
}
|
|
97
|
+
alt={card.file_alt}
|
|
98
|
+
fill
|
|
99
|
+
sizes={'600px'}
|
|
100
|
+
className="object-cover"
|
|
101
|
+
/>
|
|
102
|
+
) : (
|
|
103
|
+
<Image
|
|
104
|
+
src={`/images/column/column_list_${(idx % 6) + 1}.webp`}
|
|
105
|
+
alt=""
|
|
106
|
+
fill
|
|
107
|
+
sizes={'600px'}
|
|
108
|
+
className="object-cover"
|
|
109
|
+
/>
|
|
110
|
+
)}
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
<div className="flex flex-col gap-3 bg-white px-4 py-6">
|
|
114
|
+
<p
|
|
115
|
+
className="line-clamp-2 text-xl font-extrabold md:text-2xl"
|
|
116
|
+
dangerouslySetInnerHTML={{ __html: card.tag_title }}
|
|
117
|
+
/>
|
|
118
|
+
<p
|
|
119
|
+
className="line-clamp-2 text-[16px] text-[#666] md:text-[18px]"
|
|
120
|
+
dangerouslySetInnerHTML={{ __html: htmlTagRemove(card.description) }}
|
|
121
|
+
></p>
|
|
122
|
+
</div>
|
|
123
|
+
</Link>
|
|
124
|
+
))}
|
|
125
|
+
</div>
|
|
126
|
+
) : (
|
|
127
|
+
<></>
|
|
128
|
+
)}
|
|
129
|
+
{list?.length < 1 ? (
|
|
130
|
+
<>
|
|
131
|
+
<div className={'h-[300px] text-center text-[20px] leading-[300px] '}>
|
|
132
|
+
검색 결과가 없습니다.
|
|
133
|
+
</div>
|
|
134
|
+
</>
|
|
135
|
+
) : (
|
|
136
|
+
<></>
|
|
137
|
+
)}
|
|
138
|
+
</section>
|
|
139
|
+
|
|
140
|
+
<PaginationForGroup
|
|
141
|
+
total={totalCount}
|
|
142
|
+
currentPage={Number(currentPage)}
|
|
143
|
+
size={12}
|
|
144
|
+
className={'my-[100px]'}
|
|
145
|
+
onChange={onPaginationChange}
|
|
146
|
+
/>
|
|
147
|
+
</PageWrapper>
|
|
148
|
+
</>
|
|
149
|
+
);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
export default BlogList;
|
|
@@ -4,20 +4,21 @@ export interface IBlogPageTypes {
|
|
|
4
4
|
data: IBlogTypes;
|
|
5
5
|
tel: string;
|
|
6
6
|
}
|
|
7
|
+
export interface IPnData {
|
|
8
|
+
pre_idx: number;
|
|
9
|
+
pre_title: string;
|
|
10
|
+
pre_center_code: string;
|
|
11
|
+
pre_domain: string;
|
|
12
|
+
next_idx: number;
|
|
13
|
+
next_title: string;
|
|
14
|
+
next_center_code: string;
|
|
15
|
+
next_domain: string;
|
|
16
|
+
}
|
|
7
17
|
export interface IBlogTypes {
|
|
8
18
|
template: ISeoTemplateTypes[];
|
|
9
19
|
h2List: ISeoTemplateTypes[] | null;
|
|
10
20
|
contentsList: IContentsListTypes[] | null;
|
|
11
|
-
|
|
12
|
-
idx: number;
|
|
13
|
-
title: string;
|
|
14
|
-
pathname: string;
|
|
15
|
-
} | null;
|
|
16
|
-
nextPost: {
|
|
17
|
-
idx: number;
|
|
18
|
-
title: string;
|
|
19
|
-
pathname: string;
|
|
20
|
-
} | null;
|
|
21
|
+
pnData: IPnData[];
|
|
21
22
|
fieldData: IFieldTypes[];
|
|
22
23
|
successData: ISuccessTypes[];
|
|
23
24
|
referenceLinkList: IAddLinkTypes[];
|
|
@@ -12,12 +12,24 @@ export interface IBlogPageTypes {
|
|
|
12
12
|
data: IBlogTypes;
|
|
13
13
|
tel: string;
|
|
14
14
|
}
|
|
15
|
+
|
|
16
|
+
export interface IPnData {
|
|
17
|
+
pre_idx: number;
|
|
18
|
+
pre_title: string;
|
|
19
|
+
pre_center_code: string;
|
|
20
|
+
pre_domain: string;
|
|
21
|
+
|
|
22
|
+
next_idx: number;
|
|
23
|
+
next_title: string;
|
|
24
|
+
next_center_code: string;
|
|
25
|
+
next_domain: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
15
28
|
export interface IBlogTypes {
|
|
16
29
|
template: ISeoTemplateTypes[];
|
|
17
30
|
h2List: ISeoTemplateTypes[] | null;
|
|
18
31
|
contentsList: IContentsListTypes[] | null;
|
|
19
|
-
|
|
20
|
-
nextPost: { idx: number; title: string; pathname: string } | null;
|
|
32
|
+
pnData: IPnData[];
|
|
21
33
|
fieldData: IFieldTypes[];
|
|
22
34
|
successData: ISuccessTypes[];
|
|
23
35
|
referenceLinkList: IAddLinkTypes[];
|
|
@@ -19,7 +19,7 @@ import Arrow from '../../../asset/images/success_new/left.webp';
|
|
|
19
19
|
import RightArrow from '../../../asset/images/success_new/right.webp';
|
|
20
20
|
import BlogWrapper from './BlogWrapper';
|
|
21
21
|
const BlogView = ({ data, tel }) => {
|
|
22
|
-
const { template, contentsList, h2List, fieldData, successData, referenceLinkList, newsLinkList, shortsLinkList, youtubeLinkList, initialData,
|
|
22
|
+
const { template, contentsList, h2List, fieldData, successData, referenceLinkList, newsLinkList, shortsLinkList, youtubeLinkList, initialData, pnData, faqElementMaxCountInContents } = data;
|
|
23
23
|
const { width } = useBrowser(true);
|
|
24
24
|
const [isFaqActive, setIsFaqActive] = useState(false);
|
|
25
25
|
const printRef = useRef(null);
|
|
@@ -177,39 +177,43 @@ const BlogView = ({ data, tel }) => {
|
|
|
177
177
|
</div>
|
|
178
178
|
<SeoConsulting tel={tel}/>
|
|
179
179
|
</div>) : (<></>)}
|
|
180
|
-
<
|
|
181
|
-
<div className={'flex
|
|
182
|
-
<
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
180
|
+
<section className={'mt-[60px] w-full max-md:mb-[30px]'}>
|
|
181
|
+
<div className={'flex w-full items-center justify-between max-md:flex-col'}>
|
|
182
|
+
{pnData[0].pre_idx ? (<Link href={pnData[0].pre_domain + 'blog/' + pnData[0].pre_idx} target={pnData[0].pre_center_code != process.env.NEXT_PUBLIC_CENTER_CODE
|
|
183
|
+
? '_target'
|
|
184
|
+
: '_self'} className={'mb-6 flex w-full flex-col gap-[8px] md:mb-0 md:w-auto md:flex-row md:gap-[20px] lg:w-auto lg2:gap-[28px]'} aria-label={'이전글 ' + pnData[0].pre_title}>
|
|
185
|
+
<Image src={Arrow} alt={''} width={15} height={15} className={'m-auto hidden md:block'}/>
|
|
186
|
+
<p className={'text-[#285FA7]'}>이전글</p>
|
|
187
|
+
<div>
|
|
188
|
+
<p className={'truncate md:w-[11em] lg:w-[14em] lg2:w-[18em] '}>
|
|
189
|
+
{pnData[0].pre_title}
|
|
188
190
|
</p>
|
|
189
|
-
</
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
191
|
+
</div>
|
|
192
|
+
</Link>) : (<div className={'flex w-[30%] gap-[28px]'}></div>)}
|
|
193
|
+
|
|
194
|
+
{pnData[0].next_idx ? (<>
|
|
195
|
+
<Link href={pnData[0].next_domain + 'blog/' + pnData[0].next_idx} target={pnData[0].next_center_code != process.env.NEXT_PUBLIC_CENTER_CODE
|
|
196
|
+
? '_target'
|
|
197
|
+
: '_self'} className={'flex w-full flex-col justify-end gap-[8px] md:order-last md:w-auto md:flex-row md:gap-[20px] lg:w-auto lg2:gap-[28px]'} aria-label={'다음글 ' + pnData[0].next_title}>
|
|
198
|
+
<p className={'text-[#285FA7]'}>다음글</p>
|
|
199
|
+
<div aria-label={'다음글 ' + pnData[0].next_title}>
|
|
200
|
+
<p className={'truncate md:w-[11em] lg:w-[14em] lg2:w-[18em] '}>
|
|
201
|
+
{pnData[0].next_title}
|
|
202
|
+
</p>
|
|
203
|
+
</div>
|
|
204
|
+
<Image src={RightArrow} alt={''} width={15} height={15} className={'m-auto hidden md:block'}/>
|
|
205
|
+
</Link>
|
|
206
|
+
</>) : (<div className={'order-last flex w-[30%] gap-[28px]'}></div>)}
|
|
193
207
|
|
|
194
|
-
<Link href={`/
|
|
195
|
-
<
|
|
208
|
+
<Link href={`/blog`} className={'max-md:mt-[40px]'}>
|
|
209
|
+
<div className={'rounded-[30px] border-[1px] border-solid border-[#b0b0b0] bg-[#41464C] px-[32px] py-[10px] text-[#fff] lg2:px-[70px] lg2:py-[15px] '}>
|
|
196
210
|
목록보기
|
|
197
|
-
</
|
|
211
|
+
</div>
|
|
198
212
|
</Link>
|
|
199
|
-
|
|
200
|
-
<div className={'flex w-full flex-col justify-end gap-[8px] lg:w-auto lg:flex-row lg:items-center lg:gap-[20px] lg2:gap-[28px]'}>
|
|
201
|
-
<p className={'shrink-0 text-[18px] text-[#285FA7]'}>다음글</p>
|
|
202
|
-
{nextPost ? (<Link href={nextPost.pathname + String(nextPost.idx)}>
|
|
203
|
-
<p className={'w-full truncate text-[16px] xs:text-[18px] lg:w-[13em] xl:w-[16em] xxl:text-[20px] 4xl:w-[20em] '}>
|
|
204
|
-
{nextPost.title}
|
|
205
|
-
</p>
|
|
206
|
-
</Link>) : (<p className={'truncate xs:text-[18px] lg:w-[13em] xl:w-[16em] xxl:text-[20px] 4xl:w-[20em] '}>
|
|
207
|
-
다음글이 없습니다.
|
|
208
|
-
</p>)}
|
|
209
|
-
<Image src={RightArrow} alt={'화살표'} title={'화살표'} width={15} height={15} className={'m-auto hidden lg:block'}/>
|
|
210
|
-
</div>
|
|
211
213
|
</div>
|
|
212
|
-
|
|
214
|
+
|
|
215
|
+
<div className={'my-10 mt-20 w-[100%]'}></div>
|
|
216
|
+
</section>
|
|
213
217
|
</div>
|
|
214
218
|
</BlogWrapper>
|
|
215
219
|
</div>
|