Koenig - Made full width images work with closed sidebar (#1014)

refs https://github.com/TryGhost/Ghost/issues/9505
- use `ui` service to adjust full-width image styles then the side nav is open
This commit is contained in:
Peter Zimon 2018-05-08 11:26:46 +02:00 committed by Kevin Ansfield
parent 011b016582
commit 26aa2770ed
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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))}}