Skip to content

Commit

Permalink
Merge pull request #486 from cornell-dti/responsive-review-summary-card
Browse files Browse the repository at this point in the history
style: make review summary gauge card responsive
  • Loading branch information
qiandrewj authored Dec 10, 2024
2 parents 73ce045 + f46586b commit b00b42d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 14 deletions.
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;
}
}

0 comments on commit b00b42d

Please sign in to comment.