add block-error and block-empty components to centralize some bulma markup

This commit is contained in:
Matthew Irish 2018-10-09 23:37:28 -05:00
parent 7e1268e3ef
commit 439287b88f
6 changed files with 33 additions and 23 deletions

View file

@ -0,0 +1,2 @@
import OuterHTML from './outer-html';
export default OuterHTML.extend();

View file

@ -0,0 +1,2 @@
import OuterHTML from './outer-html';
export default OuterHTML.extend();

View file

@ -0,0 +1,11 @@
<div class="box is-bottomless has-background-white-bis">
<div class="columns is-centered">
<div class="column is-half has-text-centered">
<div class="box is-shadowless has-background-white-bis">
<p class="has-text-grey">
{{yield}}
</p>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,3 @@
<div class="box is-sideless has-background-white-bis has-text-grey has-text-centered">
{{yield}}
</div>

View file

@ -46,11 +46,7 @@
</div>
{{/each}}
{{else}}
<div class="box is-bottomless has-background-white-bis">
<div class="columns is-centered">
<div class="column is-half has-text-centered">
<div class="box is-shadowless has-background-white-bis">
<p class="has-text-grey">
<BlockEmpty>
{{#if (eq baseKey.id '')}}
There are currently no {{pluralize options.item}} in this backend.
{{else}}
@ -62,11 +58,7 @@
{{/if}}
{{/if}}
{{/if}}
</p>
</div>
</div>
</div>
</div>
</BlockEmpty>
{{/if}}
{{/with}}
{{#if (gt model.meta.lastPage 1) }}

View file

@ -21,14 +21,14 @@
</h1>
</p.levelLeft>
</PageHeader>
<div class="box is-sideless has-background-white-bis has-text-grey has-text-centered">
<BlockError>
{{#if model.message}}
<p>{{model.message}}</p>
{{/if}}
{{#each model.errors as |error|}}
<p>{{error}}</p>
{{/each}}
</div>
</BlockError>
{{/if}}
</div>
</section>