From c752c35cad5220d601d750ba7dff5f255fcdc8a3 Mon Sep 17 00:00:00 2001 From: Filip Ilic Date: Fri, 20 Dec 2024 16:29:08 +0100 Subject: [PATCH 1/2] implement design changes --- assets/css/dashboard-widgets/score.css | 7 ++++--- assets/js/web-components/prpl-gauge.js | 14 ++++++++++++-- assets/js/widgets/suggested-tasks.js | 7 ++++--- classes/widgets/class-suggested-tasks.php | 9 ++++++--- views/dashboard-widgets/score.php | 12 ++++++------ 5 files changed, 32 insertions(+), 17 deletions(-) diff --git a/assets/css/dashboard-widgets/score.css b/assets/css/dashboard-widgets/score.css index 97d43f0f8..4d4cfbf5c 100644 --- a/assets/css/dashboard-widgets/score.css +++ b/assets/css/dashboard-widgets/score.css @@ -1,6 +1,7 @@ #progress_planner_dashboard_widget_score { .prpl-dashboard-widget { + padding-top: 5px; /* Total 16px top spacing */ display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); grid-gap: calc(var(--prpl-gap) / 2); @@ -36,12 +37,12 @@ } .prpl-dashboard-widget-footer { - margin-top: 1em; - padding-top: 1em; + margin-top: 1rem; + padding-top: 1rem; border-top: 1px solid #c3c4c7; /* same color as the one WP-Core uses */ font-size: var(--prpl-font-size-base); display: flex; - gap: 1em; + gap: 0.5rem; align-items: center; } } diff --git a/assets/js/web-components/prpl-gauge.js b/assets/js/web-components/prpl-gauge.js index 0ccc0a12e..c82dec531 100644 --- a/assets/js/web-components/prpl-gauge.js +++ b/assets/js/web-components/prpl-gauge.js @@ -16,6 +16,9 @@ customElements.define( start: '270deg', cutout: '57%', contentFontSize: 'var(--prpl-font-size-6xl)', + contentPadding: + 'var(--prpl-padding) var(--prpl-padding) calc(var(--prpl-padding) * 2) var(--prpl-padding)', + marginBottom: 'var(--prpl-padding)', }, content = '' ) { @@ -41,11 +44,18 @@ customElements.define( props.cutout = this.getAttribute( 'cutout' ) || props.cutout; props.contentFontSize = this.getAttribute( 'contentFontSize' ) || props.contentFontSize; + props.contentPadding = + this.getAttribute( 'contentPadding' ) || props.contentPadding; + props.marginBottom = + this.getAttribute( 'marginBottom' ) || props.marginBottom; this.innerHTML = ` -
+ }; border-radius:var(--prpl-border-radius-big); aspect-ratio: 2 / 1; overflow: hidden; position: relative; margin-bottom: ${ + props.marginBottom + };">
- + @@ -22,7 +22,7 @@
- + get_widgets__activity_scores()->get_score() ); ?> @@ -31,7 +31,7 @@
-
+

@@ -39,9 +39,9 @@ From 25f00ace469d1af9a7ba5a6ef710fadb89e55821 Mon Sep 17 00:00:00 2001 From: Filip Ilic Date: Fri, 20 Dec 2024 16:49:46 +0100 Subject: [PATCH 2/2] Add Pro logo version --- assets/images/logo_progress_planner_pro.svg | 1 + views/admin-page-header.php | 8 +++++++- views/admin-page-settings.php | 8 +++++++- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 assets/images/logo_progress_planner_pro.svg diff --git a/assets/images/logo_progress_planner_pro.svg b/assets/images/logo_progress_planner_pro.svg new file mode 100644 index 000000000..1532dfc31 --- /dev/null +++ b/assets/images/logo_progress_planner_pro.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/views/admin-page-header.php b/views/admin-page-header.php index 0d0d43fb6..493fc10b0 100644 --- a/views/admin-page-header.php +++ b/views/admin-page-header.php @@ -19,7 +19,13 @@ ?>
diff --git a/views/admin-page-settings.php b/views/admin-page-settings.php index 9a5b16a83..ebf4e299d 100644 --- a/views/admin-page-settings.php +++ b/views/admin-page-settings.php @@ -14,7 +14,13 @@