mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 18:31:57 +03:00
2e4990093f
refs https://github.com/TryGhost/Ghost/issues/9311 - initial CSS for container card outline, selection state, toolbar, etc - adds `{{#koenig-card}}` component to be used inside of component card templates to handle the default card container HTML, mouse interactions, etc - update `{{koenig-card-markdown}}` to use the new `{{koenig-card}}` component - add render/edit mode views - focus the textarea when entering edit mode - updated `{{koenig-editor}}` - add <kbd>Cmd+Enter</kbd> command to put a selected card into edit mode - when inserting new cards put them into edit mode immediately - move edit/select methods out of actions and into normal methods so that timing is easier to reason about - skip `cursorDidChange` process when cursor changes as a result of a card selection, fixes issues with `selectCard` being triggered multiple times unexpectedly
15 lines
509 B
Handlebars
15 lines
509 B
Handlebars
<div class="koenig-card-icon">{{inline-svg icon}}</div>
|
|
<div class="koenig-card-content">
|
|
{{yield}}
|
|
</div>
|
|
|
|
{{#if toolbar}}
|
|
<div class="koenig-card-toolbar koenig-toolbar {{if showToolbar "koenig-toolbar--visible"}}" style={{toolbarStyle}}>
|
|
{{#each toolbar.items as |item|}}
|
|
<button type="button" title={{item.title}} class="koenig-toolbar-btn" onmousedown={{action item.action}}>
|
|
{{inline-svg item.icon}}
|
|
</button>
|
|
{{/each}}
|
|
</div>
|
|
{{/if}}
|