Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Koenig - Made full width images work with closed sidebar (#1014)
Browse files Browse the repository at this point in the history
refs TryGhost/Ghost#9505
- use `ui` service to adjust full-width image styles then the side nav is open
  • Loading branch information
peterzimon authored and kevinansfield committed May 8, 2018
1 parent 50bf7b2 commit d7b096b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/koenig-editor/addon/components/koenig-card-image.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ import {
import {computed} from '@ember/object';
import {htmlSafe} from '@ember/string';
import {run} from '@ember/runloop';
import {inject as service} from '@ember/service';
import {set} from '@ember/object';

export default Component.extend({
ui: service(),
layout,

// attrs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}}
<div class="relative">
{{#if (or previewSrc payload.src)}}
<img src={{or previewSrc payload.src}} class={{kg-style kgImgStyle}} alt={{payload.alt}}>
<img src={{or previewSrc payload.src}} class="{{kg-style kgImgStyle sidebar=ui.hasSideNav}}" alt={{payload.alt}}>
{{/if}}

{{#if (or uploader.errors uploader.isUploading (not payload.src))}}
Expand Down

0 comments on commit d7b096b

Please sign in to comment.