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