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

style: make review summary gauge card responsive #486

Merged
merged 2 commits into from
Dec 10, 2024
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
28 changes: 16 additions & 12 deletions client/src/modules/Course/Components/Gauges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,14 @@ const Gauges = ({overall, difficulty, workload}: GaugesProps) => {
/>
})}
</div>
<div className={styles.ratingNum}> {difficulty ? difficulty.toPrecision(2) : "-"} </div>
<img src={difficultyEmote}
className={styles.emote}
title={difficultyHover}
alt={difficultyHover}
/>
<div className={styles.responsiveLabel}>
<div className={styles.ratingNum}> {difficulty ? difficulty.toPrecision(2) : "-"} </div>
<img src={difficultyEmote}
className={styles.emote}
title={difficultyHover}
alt={difficultyHover}
/>
</div>
</div>
<div className={styles.horizontal}>
<div className={styles.category}> Workload </div>
Expand All @@ -174,12 +176,14 @@ const Gauges = ({overall, difficulty, workload}: GaugesProps) => {
/>
})}
</div>
<div className={styles.ratingNum}> {workload ? workload.toPrecision(2) : "-"} </div>
<img src={workloadEmote}
className={styles.emote}
title={workloadHover}
alt={workloadHover}
/>
<div className={styles.responsiveLabel}>
<div className={styles.ratingNum}> {workload ? workload.toPrecision(2) : "-"} </div>
<img src={workloadEmote}
className={styles.emote}
title={workloadHover}
alt={workloadHover}
/>
</div>
</div>
</div>
</div>
Expand Down
23 changes: 21 additions & 2 deletions client/src/modules/Course/Styles/Gauges.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,16 @@
font-weight: 590;
}

@media only screen and (max-width: 1216px) {
.responsiveLabel {
display: flex;
flex-direction: row;
gap: 14px;
}

@media only screen and (max-width: 1124px) {
.container {
gap: 24px;
gap: 12px;
flex-direction: column;
}

.overallScore {
Expand Down Expand Up @@ -128,13 +135,19 @@

.horizontal {
gap: 6px;
flex-direction: column;
}

.ratingNum {
font-size: 14px;
font-weight: 590;
}

.ratings {
height: auto;
gap: 12px;
}

.bars {
display: flex;
flex-flow: row nowrap;
Expand All @@ -146,4 +159,10 @@
.bar {
width: 30px;
}

.responsiveLabel {
display: flex;
flex-flow: row nowrap;
gap: 10px;
}
}
Loading