Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 74 additions & 13 deletions frontend/src/pages/qna/QnAListPage.module.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
/* ── 페이지 레이아웃 ── */
/* .pageWrapper {
background: var(--gray50);
min-height: 100vh;
} */

.page {
/* background: var(--gray50); */
display: flex;
flex-direction: column;
min-height: 100vh;
Expand All @@ -19,6 +25,7 @@
margin: 10px;
color: var(--black);
padding-top: 60px;
padding-bottom: 40px;
font-weight: 700;
line-height: normal;
}
Expand Down Expand Up @@ -108,16 +115,17 @@

/* ── 이해도 바 ── */
.understandBar {
padding: 8px 16px;
margin-top: 20px;
margin-bottom: 20px;
margin-bottom: 30px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
border-radius: 10px;
border: 1px solid var(--dark);
background: var(--white);
box-shadow: 1px 2px 3px 0 rgba(0, 0, 0, 0.25);
box-shadow: none;
width: 100%;
min-height: 56px;
padding: 10px 16px;
Expand Down Expand Up @@ -149,8 +157,11 @@
font-size: 24px;
font-weight: 500;
color: var(--black);
line-height: 1.4;
word-break: keep-all;
/* padding: 12px */
}

.longText {
font-size: 19px;
}

.understandCount {
Expand Down Expand Up @@ -214,13 +225,14 @@
}

.questionCard {
padding: 14px 16px;
padding: 16px 18px;
cursor: pointer;
transition: box-shadow 0.2s, background-color 0.2s, opacity 0.2s, border-color 0.2s;
transition: box-shadow 0.2s;
border-radius: 30px;
background: var(--white);
border: 1px solid var(--main);
box-shadow: 1px 2px 3px 0 rgba(0, 0, 0, 0.25);
box-shadow:
0 1px 4px rgba(0,0,0,0.06),
0 0 0 1px rgba(0,0,0,0.03);
width: 95%;
box-sizing: border-box;
min-height: 40px;
Expand All @@ -231,10 +243,13 @@
background: var(--gray50);
opacity: 0.6;
border-color: transparent;
box-shadow: 1px 2px 3px 0 rgba(0, 0, 0, 0.25);
box-shadow:
0 1px 4px rgba(0,0,0,0.06),
0 0 0 1px rgba(0,0,0,0.03);
}

.questionCard:hover {
transform: translateY(-1px);
box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.15);
}

Expand Down Expand Up @@ -640,7 +655,13 @@
}

.understandName {
font-size: 20px;
font-size: 18px;
}

.longText {
font-size: 17px;
margin: 15px;

}

.understandCount {
Expand All @@ -657,6 +678,40 @@
}
}

/* ════════════════════════════════════════
반응형 — (600px 이하)
════════════════════════════════════════ */
@media (max-width: 600px) {
.understandBar {
padding: 10px 12px;
gap: 4px;
}

.understandName {
font-size: 18px;
margin: 6px
}

.longText {
font-size: 15px;
margin: 8px
}

.understandCount {
font-size: 15px;
}

.oxBtn {
width: 32px;
height: 32px;
}

.arrowBtn svg {
width: 24px;
height: 24px;
}
}


/* ════════════════════════════════════════
반응형 — 모바일 (480px 이하)
Expand Down Expand Up @@ -686,16 +741,22 @@
}

.understandName {
font-size: 17px;
font-size: 18px;
margin: 6px
}

.longText {
font-size: 15px;
margin: 8px
}

.understandCount {
font-size: 14px;
}

.oxBtn {
width: 30px;
height: 30px;
width: 29px;
height: 29px;
font-size: 12px;
margin: 0 2px;
}
Expand Down
118 changes: 60 additions & 58 deletions frontend/src/pages/qna/QnAMainPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,69 +44,71 @@ function QNAMainPage() {
if (error) return <div className={styles.page}>오류: {error}</div>;

return (
<div className={styles.page}>
<div className={styles.pageWrapper}>
<div className={styles.page}>

{/* ── 진행 중인 세션 ── */}
{activeSessions.length > 0 && (
<>
<section className={styles.section}>
<h2 className={styles.sectionTitle}>현재 세션</h2>
{activeSessions.map(session => (
<div
key={session.sessionId}
className={styles.card}
onClick={() => navigate(`/sessions/${session.sessionId}/questions`, { state: { status: 'IN_SESSION' } })}
>
<p className={styles.cardTitle}>
<span className={styles.icon}>{getIcon(session.dayPart)}</span>
{session.title}
</p>
<p className={styles.cardWeek}>
{session.week}주차 {DAY_OF_WEEK_KO[session.dayOfWeek]} {DAY_PART_KO[session.dayPart]}
</p>
<p className={styles.cardDate}>{formatDate(session.sessionDate)}</p>
<p className={styles.cardTime}>{getTime(session.dayPart)}</p>
</div>
))}
</section>
<hr className={styles.divider} />
</>
)}
{/* ── 진행 중인 세션 ── */}
{activeSessions.length > 0 && (
<>
<section className={styles.section}>
<h2 className={styles.sectionTitle}>현재 세션</h2>
{activeSessions.map(session => (
<div
key={session.sessionId}
className={styles.card}
onClick={() => navigate(`/sessions/${session.sessionId}/questions`, { state: { status: 'IN_SESSION' } })}
>
<p className={styles.cardTitle}>
<span className={styles.icon}>{getIcon(session.dayPart)}</span>
{session.title}
</p>
<p className={styles.cardWeek}>
{session.week}주차 {DAY_OF_WEEK_KO[session.dayOfWeek]} {DAY_PART_KO[session.dayPart]}
</p>
<p className={styles.cardDate}>{formatDate(session.sessionDate)}</p>
<p className={styles.cardTime}>{getTime(session.dayPart)}</p>
</div>
))}
</section>
<hr className={styles.divider} />
</>
)}

{/* ── 지난 세션 ── */}
{pastSessions.length > 0 && (
<section className={styles.section}>
<h2 className={styles.sectionTitle}>지난 세션</h2>
<div className={styles.list}>
{pastSessions.map(session => (
<div
key={session.sessionId}
className={styles.listItem}
onClick={() => navigate(`/sessions/${session.sessionId}/questions`, { state: { status: 'AFTER_SESSION' } })}
>
<span>
<span className={styles.icon}>{getIcon(session.dayPart)}</span>
<span className={styles.listTitle}>{session.title}</span>
<span className={styles.listWeek}>
&nbsp;• {session.week}주차 {DAY_OF_WEEK_KO[session.dayOfWeek]} {DAY_PART_KO[session.dayPart]}
{/* ── 지난 세션 ── */}
{pastSessions.length > 0 && (
<section className={styles.section}>
<h2 className={styles.sectionTitle}>지난 세션</h2>
<div className={styles.list}>
{pastSessions.map(session => (
<div
key={session.sessionId}
className={styles.listItem}
onClick={() => navigate(`/sessions/${session.sessionId}/questions`, { state: { status: 'AFTER_SESSION' } })}
>
<span>
<span className={styles.icon}>{getIcon(session.dayPart)}</span>
<span className={styles.listTitle}>{session.title}</span>
<span className={styles.listWeek}>
&nbsp;• {session.week}주차 {DAY_OF_WEEK_KO[session.dayOfWeek]} {DAY_PART_KO[session.dayPart]}
</span>
</span>
</span>
<button className={styles.enterBtn}>
<FiLogIn size={25} />
</button>
</div>
))}
</div>
</section>
)}
<button className={styles.enterBtn}>
<FiLogIn className={styles.enterIcon} />
</button>
</div>
))}
</div>
</section>
)}

{/* ── 세션 없을 때 ── */}
{activeSessions.length === 0 && pastSessions.length === 0 && (
<section className={styles.section}>
<p className={styles.empty}>아직 생성된 Q&A가 없어요</p>
</section>
)}
{/* ── 세션 없을 때 ── */}
{activeSessions.length === 0 && pastSessions.length === 0 && (
<section className={styles.section}>
<p className={styles.empty}>아직 생성된 Q&A가 없어요</p>
</section>
)}

</div>
</div>
);
}
Expand Down
Loading
Loading