From 9fd8ba431c590b9ab934b4ce4d1f297f06295039 Mon Sep 17 00:00:00 2001 From: djordje vlaisavljevic Date: Tue, 7 Dec 2021 13:14:31 +0100 Subject: [PATCH] Updated editor product card styles refs https://github.com/TryGhost/Team/issues/1245 --- ghost/admin/app/styles/components/koenig.css | 35 ++++++-- .../addon/components/koenig-card-product.hbs | 84 ++++++++++--------- 2 files changed, 71 insertions(+), 48 deletions(-) diff --git a/ghost/admin/app/styles/components/koenig.css b/ghost/admin/app/styles/components/koenig.css index 25cc454c58..b838efbfa9 100644 --- a/ghost/admin/app/styles/components/koenig.css +++ b/ghost/admin/app/styles/components/koenig.css @@ -1745,10 +1745,6 @@ button.emoji-picker__category-button.active { padding: 20px; } -.kg-product-card-image { - border-radius: 5px 5px 0 0; -} - .kg-product-card-trash-icon svg { width: 16px; height: 16px; @@ -1764,6 +1760,10 @@ button.emoji-picker__category-button.active { margin-top: 16px; } +.kg-product-card-title-container { + width: 100%; +} + .kg-product-card-title { text-decoration: none; color: #15171A; @@ -1779,11 +1779,11 @@ button.emoji-picker__category-button.active { line-height: 1.6em; } -.kg-product-card-description { - font-size: 16px; - font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Droid Sans,Helvetica Neue,sans-serif; +.kg-product-card-description, .kg-product-card-description p { + font-size: 16px !important; + font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Droid Sans,Helvetica Neue,sans-serif !important; color: #656E7A; - margin-top: 4px; + margin-top: 4px !important; } .kg-product-card-description ::after { @@ -1797,7 +1797,20 @@ button.emoji-picker__category-button.active { margin-top: 24px; } -.kg-product-card-rating-star:hover { +.kg-product-card-rating-star span { + display: flex; + align-items: center; + justify-content: center; +} + +.kg-product-card-rating-star svg { + width: 1em; + height: 1em; + margin-right: 0.6em; + fill: #fff; +} + +.kg-product-card-rating-edit .kg-product-card-rating-star:hover { opacity: 0.7; } @@ -1806,6 +1819,10 @@ button.emoji-picker__category-button.active { display: flex; } +.kg-product-card-rating-preview { + display: flex; +} + .kg-product-card-rating-star path { fill: var(--whitegrey); } diff --git a/ghost/admin/lib/koenig-editor/addon/components/koenig-card-product.hbs b/ghost/admin/lib/koenig-editor/addon/components/koenig-card-product.hbs index 3085ab183f..7b799a0cd0 100644 --- a/ghost/admin/lib/koenig-editor/addon/components/koenig-card-product.hbs +++ b/ghost/admin/lib/koenig-editor/addon/components/koenig-card-product.hbs @@ -31,10 +31,17 @@ @onFailed={{action "resetSrcs"}} as |uploader| > -
+
{{#if (or this.previewSrc @payload.productImageSrc)}} - + {{#unless this.koenigDragDropHandler.isDragging}} +
+
+ +
+
+ {{/unless}} + {{#if this.isDraggedOver}}
@@ -83,21 +90,21 @@ @onChange={{action "setProductTitle"}} @didCreateEditor={{action "registerEditor"}} /> -
- - - - -
@@ -111,21 +118,21 @@ @didCreateEditor={{action "registerEditor"}} /> {{#if @payload.productRatingEnabled}} -
- - - - -
{{/if}} @@ -208,27 +215,28 @@ {{#if @payload.productImageSrc}} {{/if}} -
-

{{{@payload.productTitle}}}

+
+

{{{@payload.productTitle}}}

+
{{#if @payload.productStarRating}}
- {{svg-jar "koenig/kg-edit" class="w4 h4"}} - {{svg-jar "koenig/kg-edit" class="w4 h4"}} - {{svg-jar "koenig/kg-edit" class="w4 h4"}} - {{svg-jar "koenig/kg-edit" class="w4 h4"}} - {{svg-jar "koenig/kg-edit" class="w4 h4"}} + {{svg-jar "koenig/kg-star" class="w4 h4"}} + {{svg-jar "koenig/kg-star" class="w4 h4"}} + {{svg-jar "koenig/kg-star" class="w4 h4"}} + {{svg-jar "koenig/kg-star" class="w4 h4"}} + {{svg-jar "koenig/kg-star" class="w4 h4"}}
{{/if}}

{{{@payload.productDescription}}}

{{#if @payload.productRatingEnabled}} -
- {{svg-jar "koenig/kg-edit" class="w4 h4"}} - {{svg-jar "koenig/kg-edit" class="w4 h4"}} - {{svg-jar "koenig/kg-edit" class="w4 h4"}} - {{svg-jar "koenig/kg-edit" class="w4 h4"}} - {{svg-jar "koenig/kg-edit" class="w4 h4"}} +
+ {{svg-jar "koenig/kg-star" class="w4 h4"}} + {{svg-jar "koenig/kg-star" class="w4 h4"}} + {{svg-jar "koenig/kg-star" class="w4 h4"}} + {{svg-jar "koenig/kg-star" class="w4 h4"}} + {{svg-jar "koenig/kg-star" class="w4 h4"}}
{{/if}} {{#if @payload.productButtonEnabled}} @@ -242,8 +250,6 @@ {{/if}} -
-
{{/if}} \ No newline at end of file