Ghost/ghost/admin/app/components/dashboard/v5/resources/newsletter.hbs
Simon Backx fdf425d95a Added dynamic filter for resources
refs https://github.com/TryGhost/Team/issues/1572

- Depending on the state of the site, other resources are shown.
- Also cleaned up error catching.
2022-05-02 10:45:15 +02:00

26 lines
1.4 KiB
Handlebars

<section class="gh-dashboard5-resource gh-dashboard5-newsletter" {{did-insert this.load}}>
<article class="gh-dashboard5-resource-box">
<div class="gh-dashboard5-resource-title">
<h4>Latest from the newsletter</h4>
</div>
<div class="gh-dashboard5-resource-body">
{{#if (not (or this.loading this.error))}}
<div class="gh-dashboard5-resource-bigarticle">
{{#each this.newsletters as |entry|}}
<a class="gh-dashboard5-resource-smallarticle" href={{set-query-params entry.url utm_source='admin'}} target="_blank" rel="noopener noreferrer">
<div class="gh-dashboard5-resource-text">
<h3>{{entry.title}}</h3>
<p>{{entry.excerpt}}</p>
{{!-- <div class="gh-dashboard5-resource-secondary">{{moment-format entry.published_at "D MMM YYYY"}}</div> --}}
</div>
</a>
{{/each}}
</div>
{{/if}}
</div>
<div class="gh-dashboard5-resource-footer">
<a href="https://ghost.org/resources/newsletter/" target="_blank" class="gh-dashboard5-subscribe-button" rel="noopener noreferrer">Subscribe to the newsletter &rarr;</a>
</div>
</article>
</section>