From fa8defc316aefdbe943a0463295615787968b10c Mon Sep 17 00:00:00 2001 From: "Ignacio Ceballos (Yayo)" Date: Sun, 24 Nov 2024 14:19:08 +0100 Subject: [PATCH] progressView responsive detailing --- .../pages/progress-view.jsx | 94 +++++++++++++------ 1 file changed, 67 insertions(+), 27 deletions(-) diff --git a/src/pages/advent-calendar-2024/pages/progress-view.jsx b/src/pages/advent-calendar-2024/pages/progress-view.jsx index e4d86cedaf..92c1b77031 100644 --- a/src/pages/advent-calendar-2024/pages/progress-view.jsx +++ b/src/pages/advent-calendar-2024/pages/progress-view.jsx @@ -174,7 +174,7 @@ const ProgressView = () => { // Count completed achievements return ( - + @@ -241,8 +241,21 @@ const ProgressView = () => { }; const TotalProgress = () => { - return ( - + return isTabletOrSmaller ? ( + + + {completedDays.length}{" "} + + of + {" "} + {TOTAL_CALENDAR_DAYS} + @@ -270,6 +283,54 @@ const ProgressView = () => { + ) : ( +
+ + + {completedDays.length}{" "} + + of + {" "} + {TOTAL_CALENDAR_DAYS} + + + + + Total progress{" "} + {Math.round( + ((completedDays.length + completedAchievementsCount) / + (TOTAL_CALENDAR_DAYS + totalAchievements)) * + 100 + )} + % + + + +
+ } + /> +
+ + ); }; @@ -292,34 +353,13 @@ const ProgressView = () => { - + Completed Days - - - - {completedDays.length}{" "} - - of - {" "} - {TOTAL_CALENDAR_DAYS} - - - - + +