mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
09435ecf76
no issue Keeps component JS backing files and template files in the same directory which avoids hunting across directories when working with components. Also lets you see all components when looking at one directory, whereas previously template-only or js-only components may not have been obvious without looking at both directories. - ran [codemod](https://github.com/ember-codemods/ember-component-template-colocation-migrator/) for app-level components - manually moved in-repo-addon component templates in `lib/koenig-editor` - removed all explicit `layout` imports as JS/template associations are now made at build-time removing the need for them - updated `.embercli` to default to new flat component structure
27 lines
958 B
Handlebars
27 lines
958 B
Handlebars
<KoenigCard
|
|
@icon="koenig/card-indicator-html"
|
|
@class={{concat (kg-style "container-card") " mih10 miw-100 relative"}}
|
|
@headerOffset={{this.headerOffset}}
|
|
@toolbar={{this.toolbar}}
|
|
@payload={{this.payload}}
|
|
@isSelected={{this.isSelected}}
|
|
@isEditing={{this.isEditing}}
|
|
@selectCard={{action this.selectCard}}
|
|
@deselectCard={{action this.deselectCard}}
|
|
@editCard={{action this.editCard}}
|
|
@saveCard={{action this.saveCard}}
|
|
@onLeaveEdit={{action "leaveEditMode"}}
|
|
@editor={{this.editor}}
|
|
>
|
|
{{#if this.isEditing}}
|
|
<GhCmEditor @value={{this.payload.html}}
|
|
@class="koenig-card-html--editor"
|
|
@autofocus=true
|
|
@lineWrapping=true
|
|
@update={{action "updateHtml"}}
|
|
/>
|
|
{{else}}
|
|
<div class="koenig-card-html-rendered">{{{sanitize-html this.payload.html}}}</div>
|
|
<div class="koenig-card-click-overlay"></div>
|
|
{{/if}}
|
|
</KoenigCard> |