Ghost/ghost/admin/app/components/dashboard/v5/resources/latest-newsletters.hbs
Simon Backx 7833da8365 Added latest newsletters to dashboard 5.0
refs https://github.com/TryGhost/Team/issues/1488

- Includes a new component that fetches the latest X newsletters.
- Displays these newsletters using design from old dashboard.
- Currently shows 10 newsletters, but we'll want to change that later.
- Temporary CSS class added.
2022-04-07 13:02:58 +02:00

26 lines
1.1 KiB
Handlebars

<div
class="dashboard-prototype-newsletters"
{{did-insert this.load}}
>
{{#if (not (or this.loading this.error))}}
{{#each this.newsletters as |entry|}}
<a class="gh-dashboard-container reverse" href={{set-query-params entry.url utm_source='admin'}} target="_blank" rel="noopener noreferrer">
<div class="gh-dashboard-box blogpost">
{{#if entry.feature_image}}
<div class="thumbnail" style={{background-image-style entry.feature_image}}></div>
{{/if}}
<div class="content">
<h2>{{entry.title}}</h2>
{{#if entry.custom_excerpt}}
<p>{{entry.custom_excerpt}}</p>
{{else if entry.excerpt}}
<p>{{entry.excerpt}}</p>
{{/if}}
<div class="read-time">{{entry.reading_time}} MIN READ</div>
</div>
</div>
</a>
{{/each}}
{{/if}}
</div>