From 7075d2cc65e0848792ee55c86c2f3bc9112e336d Mon Sep 17 00:00:00 2001 From: jaemin Date: Sat, 30 Nov 2024 23:02:40 +0900 Subject: [PATCH] update: add career section content --- app/data/repositories/CareerRepositoryImpl.ts | 40 +++++++++++++++ app/data/repositories/index.ts | 2 + app/domain/entities/career.entity.ts | 13 +++++ app/domain/entities/skill.entity.ts | 2 +- app/domain/repositories/career.repo.ts | 5 ++ .../component/section/CareerSection.tsx | 49 ++++++++++++++++--- app/presentation/component/text/DateText.tsx | 2 +- tailwind.config.ts | 1 + 8 files changed, 105 insertions(+), 9 deletions(-) create mode 100644 app/data/repositories/CareerRepositoryImpl.ts create mode 100644 app/domain/entities/career.entity.ts create mode 100644 app/domain/repositories/career.repo.ts diff --git a/app/data/repositories/CareerRepositoryImpl.ts b/app/data/repositories/CareerRepositoryImpl.ts new file mode 100644 index 0000000..1a1ff9d --- /dev/null +++ b/app/data/repositories/CareerRepositoryImpl.ts @@ -0,0 +1,40 @@ +import { CareerEntity } from '@/app/domain/entities/career.entity' +import { CareerRepository } from '@/app/domain/repositories/career.repo' + +export class CareerRepositoryImpl implements CareerRepository { + private readonly mockData: CareerEntity[] = [ + { + companyName: '(주)홈초이스', + logoUrl: 'https://github.com/jaemin-s/jaemin-s/raw/refs/heads/main/image/logo/homechoice.svg', + employmentPeriod: '2024.01 ~ 재직중', + companyDescription: 'VOD, 배급, 광고, 채널 등의 다양한 사업을 영위하는 종합미디어 그룹', + achievementItems: [ + { + achievementTitle: 'UI/UX 개편', + projectPeriod: '2024년 상반기', + achievementDescription: 'Smart TV앱의 전반적인 UI/UX 개선 작업', + }, + { + achievementTitle: 'Smart TV App 심사 등록 관리', + projectPeriod: '2024년 상반기', + achievementDescription: 'Samsung, LG 스토어 심사 담당', + }, + { + achievementTitle: 'UI/UX 개편', + projectPeriod: '2024년 상반기', + achievementDescription: 'Smart TV앱의 전반적인 UI/UX 개선 작업', + }, + { + achievementTitle: 'Smart TV App 심사 등록 관리', + projectPeriod: '2024년 상반기', + achievementDescription: 'Samsung, LG 스토어 심사 담당', + }, + ], + }, + ] + + async getCareerList(): Promise { + await new Promise((resolve) => setTimeout(resolve, 200)) + return this.mockData + } +} diff --git a/app/data/repositories/index.ts b/app/data/repositories/index.ts index a7758bc..fca0fc5 100644 --- a/app/data/repositories/index.ts +++ b/app/data/repositories/index.ts @@ -1,3 +1,5 @@ +import { CareerRepositoryImpl } from './careerRepositoryImpl' import { SkillRepositoryImpl } from './SkillRepositoryImpl' export const skillRepository = new SkillRepositoryImpl() +export const CareerRepository = new CareerRepositoryImpl() diff --git a/app/domain/entities/career.entity.ts b/app/domain/entities/career.entity.ts new file mode 100644 index 0000000..5b8e7a6 --- /dev/null +++ b/app/domain/entities/career.entity.ts @@ -0,0 +1,13 @@ +export interface CareerEntity { + companyName: string + logoUrl: string + employmentPeriod: string + companyDescription: string + achievementItems: AchievementItem[] +} + +export interface AchievementItem { + achievementTitle: string + projectPeriod: string + achievementDescription: string +} diff --git a/app/domain/entities/skill.entity.ts b/app/domain/entities/skill.entity.ts index fdf342f..a7827ed 100644 --- a/app/domain/entities/skill.entity.ts +++ b/app/domain/entities/skill.entity.ts @@ -1,6 +1,6 @@ export interface SkillCategory { categoryName: string - skillList: Array + skillList: Skill[] } export interface Skill { diff --git a/app/domain/repositories/career.repo.ts b/app/domain/repositories/career.repo.ts new file mode 100644 index 0000000..a67233d --- /dev/null +++ b/app/domain/repositories/career.repo.ts @@ -0,0 +1,5 @@ +import { CareerEntity } from '../entities/career.entity' + +export interface CareerRepository { + getCareerList(): Promise +} diff --git a/app/presentation/component/section/CareerSection.tsx b/app/presentation/component/section/CareerSection.tsx index 2df4a8a..834a865 100644 --- a/app/presentation/component/section/CareerSection.tsx +++ b/app/presentation/component/section/CareerSection.tsx @@ -1,14 +1,49 @@ import React from 'react' import BodyText from '../text/BodyText' +import DateText from '../text/DateText' +import { CareerRepository } from '@/app/data/repositories' +// import Image from 'next/image' + +const CareerSection = async () => { + const CareerList = await CareerRepository.getCareerList() -const CareerSection = () => { return ( -
-
-

-

- {''} -
+
+
    + {CareerList.map((item, index) => ( +
  • +
    + {/* */} + +
    +
    +
    +

    {item.companyName}

    + {item.employmentPeriod} + {item.companyDescription} +
    +
      + {item.achievementItems.map((expItem, childIndex) => ( +
    • childIndex ? 'border-b-[2px]' : 'border-none'} border-stone-400 pb-2`} + key={`careerItem_${index}_${childIndex}`} + > +

      + {expItem.achievementTitle} +

      + {expItem.projectPeriod} + {expItem.achievementDescription} +
    • + ))} +
    +
    +
  • + ))} +
) } diff --git a/app/presentation/component/text/DateText.tsx b/app/presentation/component/text/DateText.tsx index 44ec7b1..a355d3f 100644 --- a/app/presentation/component/text/DateText.tsx +++ b/app/presentation/component/text/DateText.tsx @@ -2,7 +2,7 @@ import { TextProps } from '@/app/domain/entities/Text.entity' import React from 'react' const DateText = ({ children, className = '' }: TextProps) => { - return

{children}

+ return

{children}

} export default DateText diff --git a/tailwind.config.ts b/tailwind.config.ts index 65e93c6..2da8846 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -18,6 +18,7 @@ export default { sage: Colors.SAGE, //font-color : forest, copper cream: Colors.CREAM, //font-color : forest, copper black: Colors.BLACK, + gray: Colors.GRAY, }, }, },