0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Koenig - Update icons, add divider support to card context toolbars

refs https://github.com/TryGhost/Ghost/issues/9505
This commit is contained in:
Kevin Ansfield 2018-04-11 16:48:01 +01:00
parent 38048e0cc3
commit dcd1cc8061
6 changed files with 54 additions and 13 deletions

View file

@ -68,6 +68,8 @@ export default Component.extend({
});
if (this.get('payload.src')) {
items.push({divider: true});
items.push({
title: 'Replace image',
icon: 'koenig/kg-replace',

View file

@ -5,16 +5,20 @@
{{#if toolbar}}
<ul data-toolbar="true" class="kg-action-bar bg-lgr-darkgrey inline-flex pa0 ma0 list br3 shadow-2 items-center absolute white sans-serif f8 fw6 tracked-2 anim-fast-bezier z-999 {{if showToolbar "" "o-0 drop-down"}}" style={{toolbarStyle}}>
{{#each toolbar.items as |item|}}
<li class="ma0">
<button
type="button"
title={{item.title}}
class="dib dim-lite pa3 pt2 pb2 link {{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 item.divider}}
<li class="ma0 kg-action-bar-divider bg-darkgrey-d2 h5"></li>
{{else}}
<li class="ma0">
<button
type="button"
title={{item.title}}
class="dib dim-lite pa3 pt2 pb2 link {{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}}

View file

@ -1 +1,9 @@
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g stroke="currentColor" fill="none" fill-rule="evenodd" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 2h4M6 14h4" opacity=".6"/><path d="M2 6h12v4.001H2z"/></g></svg>
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<title>
kg-img-full
</title>
<g stroke="#FFF" fill="none" fill-rule="evenodd">
<path d="M1 2v12M15 2v12" stroke-width="2" opacity=".6" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4 8h8M6.046 4.983L3.018 8l3.028 3.058M10.018 4.983L13.046 8l-3.028 3.058" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 257 B

After

Width:  |  Height:  |  Size: 470 B

View file

@ -1 +1,9 @@
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g stroke="currentColor" fill="none" fill-rule="evenodd" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 2h8M4 14h8" opacity=".6"/><path d="M2 6h12v4.001H2z"/></g></svg>
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<title>
kg-img-full
</title>
<g stroke="#FFF" fill="none" fill-rule="evenodd">
<path d="M6 2h4M6 14h4" stroke-width="2" opacity=".6" stroke-linecap="round" stroke-linejoin="round"/>
<path stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="M2 6h12v4.001H2z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 257 B

After

Width:  |  Height:  |  Size: 411 B

View file

@ -1 +1,11 @@
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g stroke="currentColor" fill="none" fill-rule="evenodd" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M1.583 3.333v3.5h3.5m9.334 5.834v-3.5h-3.5"/><path d="M12.952 6.25c-.644-1.82-1.907-2.943-3.79-3.37-1.883-.425-3.507.044-4.872 1.41L1.583 6.833m12.834 2.334L11.71 11.71c-1.365 1.366-2.989 1.835-4.872 1.41-1.883-.427-3.146-1.55-3.79-3.37"/></g></svg>
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<title>
kg-replace
</title>
<g stroke="#FFF" fill="none" fill-rule="evenodd">
<path stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="M2 10h5v4H2zM9 2h5v4H9z"/>
<path d="M10 14h1c.552 0 1-.448 1-1V9" stroke-linecap="round" stroke-linejoin="round"/>
<path stroke-linecap="round" stroke-linejoin="round" d="M14.034 11.054L12.002 9l-2.009 2.054M6 2H5c-.552 0-1 .448-1 1v4"/>
<path stroke-linecap="round" stroke-linejoin="round" d="M1.966 4.946L3.998 7l2.009-2.054"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 439 B

After

Width:  |  Height:  |  Size: 633 B

View file

@ -0,0 +1,9 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<title>
kg-settings
</title>
<g stroke="#FFF" fill="none" fill-rule="evenodd">
<path d="M9.75 8c0 1.167-.583 1.75-1.75 1.75S6.25 9.167 6.25 8 6.833 6.25 8 6.25 9.75 6.833 9.75 8z" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M12.317 9.75c-.176.397-.112.751.192 1.062l.035.035c.228.228.342.503.342.825 0 .323-.114.598-.342.825-.228.229-.503.343-.825.343-.323 0-.598-.114-.826-.343l-.035-.035c-.31-.303-.664-.367-1.061-.192-.388.166-.582.46-.584.88v.1c0 .778-.389 1.167-1.166 1.167-.778 0-1.167-.39-1.167-1.167v-.053c-.01-.436-.22-.73-.63-.88-.397-.176-.751-.112-1.062.192l-.035.035c-.228.228-.503.342-.825.342-.323 0-.598-.114-.825-.342-.229-.228-.343-.503-.343-.825 0-.323.114-.598.343-.826l.035-.035c.303-.31.367-.664.192-1.061-.166-.388-.46-.582-.88-.584h-.1c-.778 0-1.167-.389-1.167-1.166 0-.322.114-.597.342-.825.228-.228.503-.342.825-.342h.052c.437-.01.73-.22.881-.63.176-.397.112-.751-.192-1.062l-.035-.035c-.228-.228-.342-.503-.342-.825 0-.323.114-.598.342-.826.228-.228.503-.342.825-.342.323 0 .598.114.826.343l.035.035c.31.303.664.367 1.061.192h.047c.387-.166.582-.46.583-.88v-.1c0-.322.114-.597.342-.825.228-.228.503-.342.825-.342.778 0 1.167.39 1.167 1.167v.052c.001.422.196.715.583.881.397.176.751.112 1.062-.192l.035-.035c.228-.228.503-.342.825-.342.323 0 .598.114.825.342.229.228.343.503.343.825 0 .323-.114.598-.343.826l-.035.035c-.303.31-.367.664-.192 1.061v.047c.166.387.46.582.88.583h.1c.778 0 1.167.39 1.167 1.167 0 .778-.39 1.167-1.167 1.167h-.053c-.42.001-.714.196-.88.583z" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB