mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
48 lines
1.6 KiB
Handlebars
48 lines
1.6 KiB
Handlebars
<KoenigCard
|
|
@class={{concat (kg-style "container-card") " kg-callout-card-container"}}
|
|
@headerOffset={{@headerOffset}}
|
|
@toolbar={{this.toolbar}}
|
|
@payload={{@payload}}
|
|
@isSelected={{@isSelected}}
|
|
@isEditing={{@isEditing}}
|
|
@selectCard={{@selectCard}}
|
|
@deselectCard={{@deselectCard}}
|
|
@editCard={{@editCard}}
|
|
@hasEditMode={{true}}
|
|
@saveCard={{@saveCard}}
|
|
@saveAsSnippet={{@saveAsSnippet}}
|
|
@onLeaveEdit={{this.leaveEditMode}}
|
|
@addParagraphAfterCard={{@addParagraphAfterCard}}
|
|
@moveCursorToPrevSection={{@moveCursorToPrevSection}}
|
|
@moveCursorToNextSection={{@moveCursorToNextSection}}
|
|
@editor={{@editor}}
|
|
{{did-insert this.registerElement}}
|
|
as |card|
|
|
>
|
|
{{#if @isEditing}}
|
|
|
|
<div class="kg-callout-card">
|
|
<div class="kg-callout-emoji">{{@payload.calloutEmoji}}</div>
|
|
<KoenigTextReplacementHtmlInput
|
|
@html={{@payload.calloutText}}
|
|
@placeholder="Callout text..."
|
|
@autofocus={{true}}
|
|
@class="w-100 bn bg-transparent"
|
|
@onChange={{action "setCalloutText"}}
|
|
@onFocus={{action (mut this.isFocused) true}}
|
|
@onBlur={{action (mut this.isFocused) false}}
|
|
@didCreateEditor={{action "registerEditor"}}
|
|
/>
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
<div class="kg-callout-card">
|
|
<div class="kg-callout-emoji">{{@payload.calloutEmoji}}</div>
|
|
<div>{{{@payload.calloutText}}}</div>
|
|
</div>
|
|
<div class="koenig-card-click-overlay"></div>
|
|
|
|
{{/if}}
|
|
</KoenigCard>
|