-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: tailwind pretendard 폰트 설정 * refactor: lint, prettier 설정 * feat: svg.webpack 추가 * feat: arrow 변경 * fix: svgr 오류 수정 * fix: svgr 오류 수정
- Loading branch information
Showing
8 changed files
with
148 additions
and
1,334 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// components/CardLayout.js | ||
import Image from 'next/image'; | ||
|
||
const ActivityCard = ({ imageSrc, title, description, isImageRight, description2 }) => { | ||
return ( | ||
<div className={`flex ${isImageRight ? 'flex-row-reverse' : 'flex-row'} items-center my-8`}> | ||
<div className="w-1/2"> | ||
<Image src={imageSrc} alt={title} width={500} height={300} className="object-cover" /> | ||
</div> | ||
<div className="w-1/2 px-6"> | ||
<h3 className="text-lg font-medium text-blue-500 mb-4">{title}</h3> | ||
<p className="font-medium text-xl mb-4">{description}</p> | ||
<p className="font-medium text-[#6B7684]">{description2}</p> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ActivityCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
import React from 'react'; | ||
|
||
import Image from 'next/image'; | ||
import Link from 'next/link'; | ||
|
||
// SVG 파일은 React 컴포넌트로 사용 | ||
import AvatarSvg from '@/public/profile.svg'; | ||
|
||
interface ProfileCardProps { | ||
name: string; | ||
description: string | null; | ||
avatar: string | null; // avatar가 URL이면 string | ||
github: string | null; | ||
instagram: string | null; | ||
blog: string | null; | ||
role: string | null; | ||
} | ||
|
||
export const ProfileCard: React.FC<ProfileCardProps> = ({ | ||
role, | ||
name, | ||
description, | ||
avatar, | ||
github, | ||
instagram, | ||
blog, | ||
}) => { | ||
const URL = [ | ||
{ | ||
name: 'github', | ||
url: github, | ||
}, | ||
{ | ||
name: 'instagram', | ||
url: instagram, | ||
}, | ||
{ | ||
name: 'blog', | ||
url: blog, | ||
}, | ||
]; | ||
|
||
return ( | ||
<div className="relative w-72 border border-wink-400 rounded-lg"> | ||
{role && ( | ||
<div className="absolute -top-3 left-5 bg-white px-3 py-0.5 rounded-full border border-wink-400 text-sm font-bold"> | ||
{role} | ||
</div> | ||
)} | ||
|
||
<div className="flex space-x-2 p-4"> | ||
{/* avatar가 URL인 경우 next/image 사용, 그렇지 않으면 SVG 컴포넌트 렌더링 */} | ||
{avatar ? ( | ||
<Image | ||
src={avatar} | ||
alt="Profile" | ||
width={64} | ||
height={64} | ||
className="w-16 h-16 object-cover rounded-full" | ||
/> | ||
) : ( | ||
<AvatarSvg className="w-16 h-16 object-cover rounded-full" /> | ||
)} | ||
<div className="flex flex-col"> | ||
<h2 className="text-lg font-bold mt-1.5">{name}</h2> | ||
{description && <p className="w-44 text-gray-600 truncate">{description}</p>} | ||
</div> | ||
</div> | ||
|
||
<div className="flex justify-around border-t border-wink-400 py-3 px-5"> | ||
{URL.map((url) => ( | ||
<Link | ||
key={url.name} | ||
href={url.url || ''} | ||
aria-disabled={!url.url} | ||
className="text-blue-600 font-roboto font-bold italic uppercase aria-disabled:cursor-default aria-disabled:text-wink-200" | ||
> | ||
{url.name} | ||
</Link> | ||
))} | ||
</div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.