Ghost/ghost/admin/app/components/dashboard/v5/parts/metric.hbs
James Morris a06003e7b5 Introduced new layout to bring new Dashboard closer to release (#2342)
refs: https://github.com/TryGhost/Team/issues/1531

- broke apart the combined chart
- added back in the paid mix chart
- separated out the mini charts into separate components
- made top chart work with total, paid and free
- added in an overview section back at the top for total, paid, free
- made metric labels and values larger and easier to parse

Co-authored-by: Simon Backx <simon@ghost.org>
2022-04-20 14:43:11 +02:00

48 lines
1.7 KiB
Handlebars

<div class="gh-dashboard5-metric {{if @center "is-center"}} {{if @reverse "is-reverse"}} {{if @large "is-large"}}">
<div class="gh-dashboard5-metric-data">
{{#if @secondary}}
{{#if @value}}
<div class="gh-dashboard5-metric-value {{if @secondary 'is-secondary'}}">
{{@value}}
{{#if @trends}}
<Dashboard::v5::Parts::Percentage @percentage={{@percentage}}/>
{{/if}}
</div>
{{/if}}
<h5 class="gh-dashboard5-metric-label {{if @secondary 'is-secondary'}}">
{{@label}}
</h5>
{{else}}
{{#if @reverse}}
{{#if @value}}
<div class="gh-dashboard5-metric-value">
{{@value}}
{{#if @trends}}
<Dashboard::v5::Parts::Percentage @percentage={{@percentage}}/>
{{/if}}
</div>
{{/if}}
<h5 class="gh-dashboard5-metric-label">
{{@label}}
</h5>
{{else}}
<h5 class="gh-dashboard5-metric-label">
{{@label}}
</h5>
{{#if @value}}
<div class="gh-dashboard5-metric-value">
{{@value}}
{{#if @trends}}
<Dashboard::v5::Parts::Percentage @percentage={{@percentage}}/>
{{/if}}
</div>
{{/if}}
{{/if}}
{{/if}}
</div>
{{#if @extra}}
<div class="gh-dashboard5-metric-extra">
{{@extra}}
</div>
{{/if}}
</div>