From 05af5cdcd4b053cca6fde2a952ea8441ad561965 Mon Sep 17 00:00:00 2001 From: Thibaut Patel Date: Thu, 16 Dec 2021 15:10:57 +0100 Subject: [PATCH] Removed width and alignment configuration from the header card refs https://github.com/TryGhost/Team/issues/1253 - We're simplifying the header card from a design point of view to ease integration with themes --- .../addon/components/koenig-card-header.hbs | 25 +++---------------- .../addon/components/koenig-card-header.js | 14 ----------- 2 files changed, 3 insertions(+), 36 deletions(-) diff --git a/ghost/admin/lib/koenig-editor/addon/components/koenig-card-header.hbs b/ghost/admin/lib/koenig-editor/addon/components/koenig-card-header.hbs index 65053cbaa9..296920f365 100644 --- a/ghost/admin/lib/koenig-editor/addon/components/koenig-card-header.hbs +++ b/ghost/admin/lib/koenig-editor/addon/components/koenig-card-header.hbs @@ -1,6 +1,6 @@ {{#if @isEditing}} -
+
- {{!--
-
Width
-
-
- - -
-
-
-
-
Alignment
-
-
- - -
-
-
--}}
Size
@@ -95,7 +77,6 @@ @uploadUrl="/images/upload/" @accept={{this.imageMimeTypes}} @extensions={{this.imageExtensions}} - {{!-- @onStart={{this.customThumbnailUploadStarted}} --}} @onComplete={{this.backgroundImageUploadCompleted}} as |uploader| > @@ -187,7 +168,7 @@ {{else}} -
+

{{{@payload.header}}}

{{#if this.hasSubheader}}

{{{@payload.subheader}}}

diff --git a/ghost/admin/lib/koenig-editor/addon/components/koenig-card-header.js b/ghost/admin/lib/koenig-editor/addon/components/koenig-card-header.js index 4a6f8fe437..c31f84fcb7 100644 --- a/ghost/admin/lib/koenig-editor/addon/components/koenig-card-header.js +++ b/ghost/admin/lib/koenig-editor/addon/components/koenig-card-header.js @@ -68,9 +68,7 @@ export default class KoenigCardHeaderComponent extends Component { const payloadDefaults = { size: 'small', - alignment: 'center', style: 'invert', - cardWidth: 'full', buttonEnabled: false }; @@ -231,13 +229,6 @@ export default class KoenigCardHeaderComponent extends Component { } } - @action - setAlignment(alignment) { - if (['center', 'left'].includes(alignment)) { - this._updatePayloadAttr('alignment', alignment); - } - } - @action setStyle(style) { if (['invert', 'clear', 'accent', 'image'].includes(style)) { @@ -271,9 +262,4 @@ export default class KoenigCardHeaderComponent extends Component { deleteBackgroundImage() { this._updatePayloadAttr('backgroundImageSrc', null); } - - @action - setCardWidth(width) { - this._updatePayloadAttr('cardWidth', width); - } }