diff --git a/ghost/admin/app/components/gh-tenor.hbs b/ghost/admin/app/components/gh-tenor.hbs index 5c9e636e09..ed87487e53 100644 --- a/ghost/admin/app/components/gh-tenor.hbs +++ b/ghost/admin/app/components/gh-tenor.hbs @@ -12,8 +12,8 @@ {{!-- static header --}}

- - {{svg-jar "powered-by-tenor"}} +

diff --git a/ghost/admin/app/components/gh-tenor.js b/ghost/admin/app/components/gh-tenor.js index 8b4283c6e4..5b14a55c22 100644 --- a/ghost/admin/app/components/gh-tenor.js +++ b/ghost/admin/app/components/gh-tenor.js @@ -56,7 +56,8 @@ export default class GhTenorComponent extends Component { src: media.url, width: media.dims[0], height: media.dims[1], - caption: '(Via Tenor)' + caption: '(Via Tenor)', + type: 'gif' }; this.args.select(selectParams); diff --git a/ghost/admin/app/styles/components/unsplash.css b/ghost/admin/app/styles/components/unsplash.css index 020cf08830..022990351f 100644 --- a/ghost/admin/app/styles/components/unsplash.css +++ b/ghost/admin/app/styles/components/unsplash.css @@ -293,3 +293,9 @@ color: #fff; cursor: pointer; } + +.gh-tenor-logo { + display: inline-block; + width: 100px; + margin-right: 20px; +} \ No newline at end of file diff --git a/ghost/admin/lib/koenig-editor/addon/components/koenig-card-image.js b/ghost/admin/lib/koenig-editor/addon/components/koenig-card-image.js index 6f7220dea5..21b6a66059 100644 --- a/ghost/admin/lib/koenig-editor/addon/components/koenig-card-image.js +++ b/ghost/admin/lib/koenig-editor/addon/components/koenig-card-image.js @@ -88,9 +88,17 @@ export default Component.extend({ } let cardWidth = this.payload.cardWidth; + let toolbarItems; - return { - items: [{ + if (this.payload.type === 'gif') { + toolbarItems = [{ + title: 'Link', + icon: 'koenig/kg-link', + iconClass: this.payload.href ? 'fill-green-l2' : 'fill-white', + action: run.bind(this, this._editLink) + }]; + } else { + toolbarItems = [{ title: 'Regular', icon: 'koenig/kg-img-regular', iconClass: !cardWidth ? 'fill-green-l2' : 'fill-white', @@ -117,8 +125,10 @@ export default Component.extend({ icon: 'koenig/kg-replace', iconClass: 'fill-white', action: run.bind(this, this._triggerFileDialog) - }] - }; + }]; + } + + return {items: toolbarItems}; }), init() { @@ -223,11 +233,11 @@ export default Component.extend({ }); }, - selectFromImageSelector({src, width, height, caption, alt}) { + selectFromImageSelector({src, width, height, caption, alt, type}) { let {payload, saveCard} = this; let searchTerm; - setProperties(payload, {src, width, height, caption, alt, searchTerm}); + setProperties(payload, {src, width, height, caption, alt, type, searchTerm}); this.send('closeImageSelector'); diff --git a/ghost/admin/lib/koenig-editor/addon/options/cards.js b/ghost/admin/lib/koenig-editor/addon/options/cards.js index dabc62705f..6c6ef9ddaf 100644 --- a/ghost/admin/lib/koenig-editor/addon/options/cards.js +++ b/ghost/admin/lib/koenig-editor/addon/options/cards.js @@ -214,7 +214,7 @@ export const CARD_MENU = [ }, { label: 'GIF', - icon: 'koenig/kg-card-type-unsplash', + icon: 'koenig/kg-card-type-tenor', desc: '/gif [search-term or url]', iconClass: 'kg-card-type-unsplash', matches: ['gif', 'giphy', 'tenor'], diff --git a/ghost/admin/lib/koenig-editor/public/icons/koenig/kg-card-type-tenor.svg b/ghost/admin/lib/koenig-editor/public/icons/koenig/kg-card-type-tenor.svg new file mode 100644 index 0000000000..95eb25a9bb --- /dev/null +++ b/ghost/admin/lib/koenig-editor/public/icons/koenig/kg-card-type-tenor.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/ghost/admin/public/assets/icons/tenor.svg b/ghost/admin/public/assets/icons/tenor.svg new file mode 100644 index 0000000000..ececa47ee0 --- /dev/null +++ b/ghost/admin/public/assets/icons/tenor.svg @@ -0,0 +1,7 @@ + + + + + + +