-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #202 from boostcampwm-2024/feature/layout/detail/c…
…hart-#192 [FE] 차트 고도화 & 뉴스 레이아웃 수정
- Loading branch information
Showing
9 changed files
with
199 additions
and
75 deletions.
There are no files selected for viewing
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,35 @@ | ||
import { NewsMockDataType } from './newsMockData.ts'; | ||
|
||
type CardWithImageProps = { | ||
data: NewsMockDataType; | ||
}; | ||
export default function Card({ data }: CardWithImageProps) { | ||
return ( | ||
<a | ||
className='flex cursor-pointer flex-col rounded-lg border p-4 transition-all hover:bg-juga-grayscale-50' | ||
href={data.link} | ||
target='_blank' | ||
rel='noopener noreferrer' | ||
> | ||
<div className={'mb-2 flex w-full flex-row items-center justify-between'}> | ||
<div className={'flex flex-row items-center gap-3'}> | ||
<span className='rounded-full bg-juga-blue-10 px-2 py-0.5 text-xs text-juga-blue-50'> | ||
증권 | ||
</span> | ||
<h3 className='w-[320px] truncate text-left text-base font-medium'> | ||
{data.title} | ||
</h3> | ||
</div> | ||
<span className={'w-fit text-sm text-gray-500'}>{data.date}</span> | ||
</div> | ||
<div className='flex w-full items-center justify-between gap-4'> | ||
<p className='w-96 truncate text-left text-sm text-juga-grayscale-500'> | ||
{data.img} | ||
</p> | ||
<span className='whitespace-nowrap text-sm text-juga-grayscale-500'> | ||
{data.publisher} | ||
</span> | ||
</div> | ||
</a> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,27 +1,18 @@ | ||
import CardWithImage from './CardWithImage.tsx'; | ||
import CardWithoutImage from './CardWithoutImage.tsx'; | ||
import { newsMockData, NewsMockDataType } from './newsMockData.ts'; | ||
import Card from './Card.tsx'; | ||
import { newsMockData } from './newsMockData.ts'; | ||
|
||
export default function News() { | ||
return ( | ||
<div | ||
className={'items-center, mt-7 flex w-full flex-col justify-center gap-3'} | ||
> | ||
<div className={'flex flex-row'}> | ||
<div className={'text-left text-xl font-bold'}>주요 뉴스</div> | ||
<div className='w-full'> | ||
<div className='mb-4 flex items-center justify-between'> | ||
<h2 className='text-xl font-bold'>주요 뉴스</h2> | ||
</div> | ||
<ul className='grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4'> | ||
{newsMockData.slice(0, 4).map((data: NewsMockDataType) => ( | ||
<CardWithImage data={data} key={data.title} /> | ||
))} | ||
</ul> | ||
|
||
<ul className='mt-5 grid grid-cols-2 gap-3'> | ||
<CardWithoutImage /> | ||
<CardWithoutImage /> | ||
<CardWithoutImage /> | ||
<CardWithoutImage /> | ||
</ul> | ||
<div className='grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-2'> | ||
{newsMockData.slice(0, 4).map((news, index) => ( | ||
<Card key={index} data={news} /> | ||
))} | ||
</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
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.