2020-01-16 18:14:03 +03:00
|
|
|
{{#if this.icon}}
|
2020-10-01 10:36:55 +03:00
|
|
|
<div class="sticky" style="top: {{this.iconTop}}px; margin-bottom: {{this.iconTop}}px">
|
2020-01-16 18:14:03 +03:00
|
|
|
{{svg-jar this.icon class=this.iconClass}}
|
2020-10-01 10:36:55 +03:00
|
|
|
</div>
|
|
|
|
<div style="margin-top: -{{this.iconTop}}px"></div>
|
2018-05-01 17:55:51 +03:00
|
|
|
{{/if}}
|
2018-02-20 18:02:47 +03:00
|
|
|
|
2019-07-23 20:13:41 +03:00
|
|
|
{{yield (hash
|
2020-01-16 18:14:03 +03:00
|
|
|
CaptionInput=(component "koenig-caption-input"
|
|
|
|
captureInput=this.isSelected
|
|
|
|
addParagraphAfterCard=this.addParagraphAfterCard
|
|
|
|
moveCursorToPrevSection=this.moveCursorToPrevSection
|
|
|
|
moveCursorToNextSection=this.moveCursorToNextSection
|
2019-07-23 20:13:41 +03:00
|
|
|
)
|
2020-01-16 18:14:03 +03:00
|
|
|
AltInput=(component "koenig-alt-input"
|
|
|
|
addParagraphAfterCard=this.addParagraphAfterCard
|
|
|
|
moveCursorToPrevSection=this.moveCursorToPrevSection
|
|
|
|
moveCursorToNextSection=this.moveCursorToNextSection
|
2019-07-23 20:13:41 +03:00
|
|
|
)
|
|
|
|
)}}
|
2018-02-13 21:00:54 +03:00
|
|
|
|
2020-11-03 16:57:11 +03:00
|
|
|
{{#let (and this.saveAsSnippet (not this.isEditing)) as |showSnippetIcon|}}
|
|
|
|
{{#if (or this.toolbar showSnippetIcon)}}
|
|
|
|
<KgActionBar @class="absolute" @style={{this.toolbarStyle}} @isVisible={{this.shouldShowToolbar}} @instantClose={{this.koenigUi.inputHasFocus}}>
|
|
|
|
{{#each this.toolbar.items as |item|}}
|
|
|
|
{{#if item.divider}}
|
2021-02-16 22:21:33 +03:00
|
|
|
<li class="ma0 kg-action-bar-divider bg-darkgrey-l2 h5" role="separator"></li>
|
2020-11-03 16:57:11 +03:00
|
|
|
{{else}}
|
|
|
|
<li class="ma0 lh-solid">
|
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
title={{item.title}}
|
|
|
|
class="dib dim-lite link h9 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}}
|
|
|
|
|
|
|
|
{{#if showSnippetIcon}}
|
|
|
|
{{#if this.toolbar.items}}
|
|
|
|
<li class="ma0 lh-solid kg-action-bar-divider bg-darkgrey-l2 h5" role="separator"></li>
|
|
|
|
{{/if}}
|
2018-04-24 12:15:54 +03:00
|
|
|
<li class="ma0 lh-solid">
|
2018-04-11 18:48:01 +03:00
|
|
|
<button
|
|
|
|
type="button"
|
2020-11-03 16:57:11 +03:00
|
|
|
title="Create snippet"
|
|
|
|
class="dib dim-lite link h9 w9 nudge-top--1"
|
|
|
|
{{on "click" this.saveAsSnippet}}
|
2018-04-11 18:48:01 +03:00
|
|
|
>
|
2020-11-03 16:57:11 +03:00
|
|
|
{{svg-jar "koenig/kg-snippet" class="w4 h4"}}
|
2018-04-11 18:48:01 +03:00
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
{{/if}}
|
2020-11-03 16:57:11 +03:00
|
|
|
</KgActionBar>
|
|
|
|
{{/if}}
|
|
|
|
{{/let}}
|