mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 16:42:17 +03:00
5e3553e039
refs https://github.com/TryGhost/Ghost/issues/9623 - adds `toggleHeaderSection` action to have a central place for logic - adds `_performEdit()` so that we can avoid nested runloops in actions - update text expansion and toolbar to use the new `toggleHeaderSection` action
66 lines
2.5 KiB
Handlebars
66 lines
2.5 KiB
Handlebars
<ul class="kg-action-bar bg-darkgrey-d1 inline-flex pa0 ma0 pl1 pr1 nl1 list br3 shadow-2 items-center relative white f8 fw6 tracked-2 {{if showToolbar "anim-fast-bezier" "o-0 pop-down"}}">
|
|
<li class="ma0 lh-solid">
|
|
<button
|
|
type="button"
|
|
title="Bold"
|
|
class="dib dim-lite link h10 w9 nudge-top--1"
|
|
{{action "toggleMarkup" "strong"}}
|
|
>
|
|
{{svg-jar "koenig/kg-bold" class=(concat (if activeMarkupTagNames.isStrong "stroke-blue-l2" "stroke-white") " w4 h4")}}
|
|
</button>
|
|
</li>
|
|
<li class="ma0 lh-solid">
|
|
<button
|
|
type="button"
|
|
title="Italic"
|
|
class="dib dim-lite link h10 w9 nudge-top--1"
|
|
{{action "toggleMarkup" "em"}}
|
|
>
|
|
{{svg-jar "koenig/kg-italic" class=(concat (if (or activeMarkupTagNames.isEm activeMarkupTagNames.isI) "stroke-blue-l2" "stroke-white") " w4 h4")}}
|
|
</button>
|
|
</li>
|
|
<li class="ma0 lh-solid">
|
|
<button
|
|
type="button"
|
|
title="Heading One"
|
|
class="dib dim-lite link h10 w9 nudge-top--1"
|
|
{{action "toggleHeaderSection" "h1"}}
|
|
>
|
|
{{svg-jar "koenig/kg-heading-1" class=(concat (if activeSectionTagNames.isH1 "stroke-blue-l2" "stroke-white") " w4 h4")}}
|
|
</button>
|
|
</li>
|
|
<li class="ma0 lh-solid">
|
|
<button
|
|
type="button"
|
|
title="Heading Two"
|
|
class="dib dim-lite link h10 w9 nudge-top--1"
|
|
{{action "toggleHeaderSection" "h2"}}
|
|
>
|
|
{{svg-jar "koenig/kg-heading-2" class=(concat (if activeSectionTagNames.isH2 "stroke-blue-l2" "stroke-white") " w4 h4")}}
|
|
</button>
|
|
</li>
|
|
|
|
<li class="ma0 lh-solid kg-action-bar-divider bg-darkgrey-l2 h5"></li>
|
|
|
|
<li class="ma0 lh-solid">
|
|
<button
|
|
type="button"
|
|
title="Quote"
|
|
class="dib dim-lite link h10 w9 nudge-top--1"
|
|
{{action "toggleSection" "blockquote"}}
|
|
>
|
|
{{svg-jar "koenig/kg-quote" class=(concat (if activeSectionTagNames.isBlockquote "stroke-blue-l2" "stroke-white") " w4 h4")}}
|
|
</button>
|
|
</li>
|
|
<li class="ma0 lh-solid">
|
|
<button
|
|
type="button"
|
|
title="Link"
|
|
class="dib dim-lite link h10 w9 nudge-top--1"
|
|
{{action "editLink"}}
|
|
>
|
|
{{svg-jar "koenig/kg-link" class=(concat (if activeMarkupTagNames.isA "stroke-blue-l2" "stroke-white") " w4 h4")}}
|
|
</button>
|
|
</li>
|
|
</ul>
|