Ghost/ghost/admin/app/components/dashboard/v5/resources/staff-picks.hbs
Simon Backx 43679ae4b7 Added staff picks component to dashboard 5.0
refs https://github.com/TryGhost/Team/issues/1487

- Fetches the staff picks from the RSS feed
- Shows the first 5 staff picks (amount is adjustable)
- Adds utm_source=ghost to external links
- Includes a temporary CSS class to keep it a bit orderly
2022-04-07 15:24:50 +02:00

26 lines
1.1 KiB
Handlebars

<div class="gh-dashboard5-list" {{did-insert this.load}}>
{{#if (not (or this.loading this.error))}}
<div class="gh-dashboard5-list-header">
<Dashboard::v5::parts::ChartMetric @label="Staff picks" />
</div>
<div class="gh-dashboard5-list-body">
{{#each this.staffPicks as |entry|}}
<div class="gh-dashboard5-list-item">
<a class="gh-dashboard5-list-post permalink" href={{set-query-params entry.link utm_source='ghost'}} target="_blank" rel="noopener noreferrer">
<span>{{entry.title}}</span><br>
<span class="dashboard-prototype-staff-picks-author">{{entry.creator}}</span>
</a>
</div>
{{else}}
<div class="gh-dashboard5-list-empty">
{{svg-jar "no-data-list"}}
<p>No staff picks yet.</p>
</div>
{{/each}}
</div>
<div class="gh-dashboard5-list-footer">
<a href="https://twitter.com/ghoststaffpicks" target="_blank" rel="noopener noreferrer">Follow →</a>
</div>
{{/if}}
</div>