design: LearningLecturesPage 카드 크기 수정

This commit is contained in:
정기영 2024-07-23 10:31:16 +09:00
parent b34273992c
commit b948fbde88
2 changed files with 49 additions and 12 deletions

View File

@ -1,5 +1,5 @@
import { ClassCard } from '../../components/ClassCard'; import styles from './LearningLecturesPage.module.css';
import { ClassGrid } from '../../components/ClassGrid'; import { Link } from 'react-router-dom';
export default function LearningLecturesPage() { export default function LearningLecturesPage() {
const { data: onGoingClasses } = { const { data: onGoingClasses } = {
@ -11,15 +11,20 @@ export default function LearningLecturesPage() {
}; };
return ( return (
<ClassGrid title="수강중인 강의"> <section>
<h2 className={styles.title}>수강중인 강의</h2>
<div className={styles.grid}>
{onGoingClasses.map((lecture) => ( {onGoingClasses.map((lecture) => (
<ClassCard <Link
key={lecture.lecture_id} key={lecture.lecture_id}
path={`/lecture/${lecture.lecture_id}`} to={`/lecture/${lecture.lecture_id}`}
className={styles.card}
> >
{lecture.title} <div className={styles.thumbnail} />
</ClassCard> <div>{lecture.title}</div>
</Link>
))} ))}
</ClassGrid> </div>
</section>
); );
} }

View File

@ -0,0 +1,32 @@
.title {
font-size: 32px;
line-height: 1.2;
font-weight: 700;
color: var(--text-color);
margin: 0 0 20px;
}
.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(285px, auto));
gap: 20px;
justify-content: start;
margin-bottom: 40px;
}
.card {
display: flex;
flex-direction: column;
gap: 12px;
font-size: 16px;
line-height: 1.4;
font-weight: 400;
}
.thumbnail {
width: 286.66px;
height: 220px;
border-radius: 20px;
background-color: var(--background-secondary);
box-sizing: border-box;
}