Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

프로그레스 페이지 반응형 디자인 구현 및 접근성 디자인 업데이트 #185

Closed
wants to merge 2 commits into from
Closed
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
93 changes: 68 additions & 25 deletions src/components/Sidebar/Sidebar.module.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
aside {
position: sticky;
top: 87px;
display: flex;
z-index: var(--z-index-aside);
max-width: 203px;
flex-direction: column-reverse;
@media (min-width: 1080px) {
position: sticky;
top: 87px;
flex-direction: column;
max-width: 203px;
}
}

.cohort {
display: flex;
justify-content: flex-end;
display: none;
@media (min-width: 1080px) {
display: flex;
justify-content: flex-end;
}
}

.container {
Expand All @@ -24,7 +32,11 @@ aside {
.profile {
position: relative;
text-align: center;
margin-top: 30px;
margin-bottom: 25px;
@media (min-width: 1080px) {
margin-top: 22.5px;
}
}

.avatar {
Expand Down Expand Up @@ -67,51 +79,74 @@ aside {
.username {
font-size: 14px;
color: var(--text-secondary);
margin-bottom: 20px;
font-weight: var(var(--font-weight-regular));
@media (min-width: 1080px) {
margin-bottom: 25px;
}
}

.currentStatus {
display: flex;
justify-content: center;
margin-bottom: 35px;
padding-bottom: 31px;
border-bottom: 2px solid var(--primary);
@media (min-width: 1080px) {
padding-bottom: 31px;
border-bottom: 2px solid var(--primary);
}
}

.currentStatus img {
width: 80px;
height: 103px;
width: 70px;
height: 85px;
@media (min-width: 1080px) {
width: 80px;
height: 103px;
}
}

.taskCounts {
display: flex;
flex-direction: column;
justify-content: center;
margin-top: 50px;
margin-bottom: 35px;
gap: 35px;
font-size: 20px;
font-weight: var(--font-weight-bold);
gap: 10px;
margin-bottom: 30px;
@media (min-width: 1080px) {
flex-direction: column;
margin-top: 50px;
gap: 35px;
font-weight: var(--font-weight-bold);
}
}

.task {
display: flex;
flex-direction: column;
align-items: center;
font-size: 14px;
font-size: 18px;
font-weight: var(--font-weight-bold);
gap: 5px;
@media (min-width: 1080px) {
font-size: 20px;
}
}

.progress {
font-size: 12px;
@media (min-width: 1080px) {
font-size: 14px;
}
}

.easy {
color: #1cbaba;
color: #007f71;
}

.medium {
color: #ffb700;
color: #936a00;
}

.hard {
color: #f63737;
color: #e0284b;
}

.gradientText {
Expand All @@ -127,16 +162,23 @@ aside {

.returnButtonLink {
display: block;
width: 80%;
margin-bottom: 15px;
align-self: flex-end;
width: 47%;
padding: 10px 0;
border: 1px solid var(--bg-400);
border-radius: 10px;
color: var(--bg-400) !important;
font-size: 14px;
font-size: 12px;
text-align: center;
margin-top: 20px;
margin-left: auto;
margin-right: auto;

@media (min-width: 1080px) {
width: 80%;
font-size: 14px;
margin-top: 20px;
margin-left: auto;
margin-right: auto;
}

&:hover {
background-color: var(--bg-400);
Expand All @@ -153,12 +195,13 @@ aside {

.problemButtonLink {
display: block;
width: 135px;
padding: 10px 0;
background-color: var(--bg-400);
border: 1px solid var(--bg-400);
border-radius: 10px;
color: white !important;
font-size: 14px;
font-size: 11px;
font-weight: var(--font-weight-bold);
text-align: center;
margin-top: 20px;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default function Sidebar(props: SidebarProps) {
<span className={styles.gradientText}>{solvedProblems} </span>
<span className={styles.solidText}> 문제</span>
</div>
<div className={styles.progress}>
<div>
<a
className={styles.problemButtonLink}
href={`https://github.com/DaleStudy/leetcode-study/pulls?q=is%3Apr+author%3A${githubUsername}`}
Expand All @@ -105,7 +105,7 @@ export default function Sidebar(props: SidebarProps) {
{taskProgress.map(({ label, progress, className }) => (
<div key={label} className={styles.task}>
<span className={className}>{label}</span>
<span>{progress}</span>
<span className={styles.progress}>{progress}</span>
</div>
))}
</section>
Expand Down
41 changes: 34 additions & 7 deletions src/components/Table/Table.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,33 @@ table {
}

th {
height: 48px;
background-color: var(--bg-100);
font-size: 18px;
font-weight: var(--font-weight-bold);
text-align: center;
height: 35px;
font-size: 13px;
@media (min-width: 1080px) {
height: 48px;
font-size: 18px;
}
}

/* Row & Cell Styles */
td {
height: 48px;
height: 35px;
font-size: 10px;
@media (min-width: 1080px) {
height: 48px;
font-size: 16px;
}
}

tr:nth-child(odd) {
background-color: var(--bg-200);
}

tr:nth-child(even) {
background-color: var(--bg-100);
background-color: #ffffff;
}

/* Problem column */
Expand Down Expand Up @@ -49,15 +58,33 @@ tr:nth-child(even) {
}

.easy {
color: #1cbaba;
color: #007f71;
}

.medium {
color: #ffb700;
color: #936a00;
}

.hard {
color: #f63737;
color: #e0284b;
}

.completedIcon {
width: 10px;
height: 7.5px;
@media (min-width: 1080px) {
width: 18px;
height: 13.5px;
}
}

.incompleteIcon {
width: 8px;
height: 8px;
@media (min-width: 1080px) {
width: 15px;
height: 15px;
}
}

/* Status column */
Expand Down
30 changes: 12 additions & 18 deletions src/components/Table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,24 +90,18 @@ export function Table({
}

function getTaskIcon(completed: boolean) {
if (completed) {
return (
<img
src="/completed-status-icon.svg"
alt="완료 문제 상태 아이콘"
aria-label="완료 문제"
></img>
);
} else {
return (
<img
src="/incomplete-status-icon.svg"
alt="미완료 문제 상태 아이콘"
aria-label="미완료 문제"
style={{ opacity: 0.4 }}
/>
);
}
const iconClass = completed ? styles.completedIcon : styles.incompleteIcon;

return (
<img
src={
completed ? "/completed-status-icon.svg" : "/incomplete-status-icon.svg"
}
alt={completed ? "완료 문제 상태 아이콘" : "미완료 문제 상태 아이콘"}
aria-label={completed ? "완료 문제" : "미완료 문제"}
className={iconClass}
/>
);
}

function getDifficultyClass(difficulty: string) {
Expand Down
23 changes: 18 additions & 5 deletions src/pages/Progress/Progress.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,33 @@
}

h1 {
font-size: 24px;
font-size: 20px;
margin-bottom: 15px;
@media (min-width: 1080px) {
font-size: 24px;
}
}

.container {
display: flex;
justify-content: space-between;
margin-top: 30px;
flex-direction: column;
gap: 20px;
@media (min-width: 1080px) {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-top: 30px;
}
}

.sideBar {
width: 30%;
@media (min-width: 1080px) {
width: 30%;
}
}

.problemTableWrapper {
width: 75%;
@media (min-width: 1080px) {
width: 75%;
}
}
Loading