Ghost/ghost/admin/app/components/dashboard/v5/charts/recent-posts.hbs
James Morris 58daafdef4 Further layout tweaks for new Dashboard (#2345)
* Subtle tweaks to the recent posts

refs: https://github.com/TryGhost/Team/issues/1531

* Combining Recent Posts and Members Activity together and other layout tweaks

refs: https://github.com/TryGhost/Team/issues/1531

- attempting to combine recent posts and members activity together
- various layout tweaks to make this work better
- tons of tiny style tweaks
2022-04-22 11:42:51 +01:00

34 lines
1.7 KiB
Handlebars

<section class="gh-dashboard5-section gh-dashboard5-recent-posts" {{did-insert this.loadPosts}}>
<article class="gh-dashboard5-box">
<Dashboard::v5::Parts::Metric @label="Recent posts" />
<div class="gh-dashboard5-list">
<div class="gh-dashboard5-list-header">
<div class="gh-dashboard5-list-title">Title</div>
<div class="gh-dashboard5-list-title">Sends</div>
<div class="gh-dashboard5-list-title">Open rate</div>
</div>
<div class="gh-dashboard5-list-body">
{{#each this.posts as |post|}}
<div class="gh-dashboard5-list-item">
<LinkTo class="gh-dashboard5-list-post permalink" @route="editor.edit" @models={{array post.displayName post.id}}>
{{post.title}}
</LinkTo>
<span>{{format-number post.email.emailCount}}</span>
<span class="with-percentage-bar">
<span>{{post.email.openRate}}%</span>
<span class="prototype-bar"><span style={{html-safe (concat "width: " post.email.openRate "%;")}}/></span>
</span>
</div>
{{else}}
<div class="gh-dashboard5-list-empty">
<p>No published posts yet.</p>
</div>
{{/each}}
</div>
<div class="gh-dashboard5-list-footer">
<LinkTo @route="posts" @query={{reset-query-params "posts"}}>See all posts &rarr;</LinkTo>
</div>
</div>
</article>
</section>