diff --git a/assets/css/dashboard-widgets/score.css b/assets/css/dashboard-widgets/score.css index bad0f94ca..935efd39f 100644 --- a/assets/css/dashboard-widgets/score.css +++ b/assets/css/dashboard-widgets/score.css @@ -6,6 +6,10 @@ grid-gap: calc(var(--prpl-gap) / 2); } + .prpl-gauge-number { + font-size: var(--prpl-font-size-4xl); + } + h3 { font-weight: 500; } diff --git a/views/dashboard-widgets/score.php b/views/dashboard-widgets/score.php index a0cf6551b..3ba3b316e 100644 --- a/views/dashboard-widgets/score.php +++ b/views/dashboard-widgets/score.php @@ -16,31 +16,19 @@ get_widgets__activity_scores()->print_score_gauge(); ?> get_admin__dashboard_widget_score()->get_badge_details( $prpl_category )['progress']['progress'] ) { - continue; - } - - $prpl_widget = \progress_planner()->get_admin__page()->get_widget( 'badge-streak' ); - $prpl_gauge_details = [ - 'value' => 'monthly' === $prpl_category - ? \progress_planner()->get_admin__page()->get_widget( 'suggested-tasks' )->get_score() / \Progress_Planner\Badges\Monthly::TARGET_POINTS - : $prpl_widget->get_details( $prpl_category )->get_progress()['progress'] / 100, - 'max' => 'monthly' === $prpl_category ? \Progress_Planner\Badges\Monthly::TARGET_POINTS : 100, - 'background' => 'monthly' === $prpl_category - ? 'var(--prpl-background-orange)' - : $prpl_widget->get_details( $prpl_category )->get_background(), - 'color' => 'monthly' === $prpl_category - ? 'var(--prpl-color-accent-orange)' - : 'var(--prpl-color-accent-orange)', - 'badge' => 'monthly' === $prpl_category - ? \progress_planner()->get_badges()->get_badge( 'monthly-' . gmdate( 'Y' ) . '-m' . (int) gmdate( 'm' ) ) - : $prpl_widget->get_details( $prpl_category ), - 'badge_completed' => true, - ]; - - \progress_planner()->the_view( 'page-widgets/parts/gauge.php', [ 'prpl_gauge_details' => $prpl_gauge_details ] ); - } + \progress_planner()->the_view( + 'page-widgets/parts/gauge.php', + [ + 'prpl_gauge_details' => [ + 'value' => \progress_planner()->get_admin__page()->get_widget( 'suggested-tasks' )->get_score() / \Progress_Planner\Badges\Monthly::TARGET_POINTS, + 'max' => \Progress_Planner\Badges\Monthly::TARGET_POINTS, + 'background' => 'var(--prpl-background-orange)', + 'color' => 'var(--prpl-color-accent-orange)', + 'badge' => \progress_planner()->get_badges()->get_badge( 'monthly-' . gmdate( 'Y' ) . '-m' . (int) gmdate( 'm' ) ), + 'badge_completed' => true, + ], + ] + ); ?>