Ghost/ghost/admin/lib/koenig-editor/addon/templates/components/koenig-card.hbs
Kevin Ansfield 2dc916299b Koenig - Extract card caption input into component
refs https://github.com/TryGhost/Ghost/issues/9623
- add new `{{koenig-caption-input}}` component
- yield koenig-caption-input instance from the `{{koenig-card}}` component
- remove duplicated caption logic from image and embed cards
- remove placeholder when caption input has focus
2018-06-12 18:10:23 +01:00

33 lines
1.4 KiB
Handlebars

{{#if icon}}
{{#sticky-element top=iconTop bottom=36}}
{{svg-jar icon class=iconClass}}
{{/sticky-element}}
{{/if}}
{{yield (hash captionInput=(component "koenig-caption-input"
captureInput=isSelected
addParagraphAfterCard=addParagraphAfterCard
moveCursorToPrevSection=moveCursorToPrevSection
moveCursorToNextSection=moveCursorToNextSection
))}}
{{#if toolbar}}
<ul data-toolbar="true" class="kg-action-bar bg-darkgrey-d1 inline-flex pa0 ma0 pl1 pr1 nl1 list br3 shadow-2 items-center absolute white sans-serif f8 fw6 tracked-2 anim-fast-bezier z-999 {{if showToolbar "" "o-0 pop-down"}}" style={{toolbarStyle}}>
{{#each toolbar.items as |item|}}
{{#if item.divider}}
<li class="ma0 kg-action-bar-divider bg-darkgrey-d2 h5"></li>
{{else}}
<li class="ma0 lh-solid">
<button
type="button"
title={{item.title}}
class="dib dim-lite link h10 w9 nudge-top--1 justify-center {{item.buttonClass}}"
onmousedown={{action item.action}}
>
{{#if item.icon}}{{svg-jar item.icon class=(concat item.iconClass (if item.text " mr2") " w4 h4")}} {{/if}}{{item.text}}
</button>
</li>
{{/if}}
{{/each}}
</ul>
{{/if}}