0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00

Looking to improve the post list rows again for email clicks

refs https://github.com/TryGhost/Team/issues/1965
This commit is contained in:
James Morris 2022-09-26 12:13:15 +01:00
parent c92267c900
commit 7e780681d9
2 changed files with 22 additions and 62 deletions

View file

@ -122,9 +122,6 @@
{{!-- Opens column --}}
<LinkTo @route="editor.edit" @models={{array @post.displayName @post.id}} class="permalink gh-list-data gh-post-list-opens">
<div class="flex flex-column" {{on "mouseover" (fn (mut this.isOpenStatHovered) true)}} {{on "mouseleave" (fn (mut this.isOpenStatHovered) false)}}>
<span class="gh-content-email-stats">
Opened
</span>
<span class="gh-content-email-stats-value">
{{#if this.isOpenStatHovered}}
{{format-number @post.email.openedCount}}
@ -132,6 +129,9 @@
{{@post.email.openRate}}%
{{/if}}
</span>
<span class="gh-content-email-stats">
opened
</span>
</div>
</LinkTo>
{{else}}
@ -142,9 +142,6 @@
{{!-- Clicks column --}}
<LinkTo @route="editor.edit" @models={{array @post.displayName @post.id}} class="permalink gh-list-data gh-post-list-clicks">
<div class="flex flex-column" {{on "mouseover" (fn (mut this.isClickStatHovered) true)}} {{on "mouseleave" (fn (mut this.isClickStatHovered) false)}}>
<span class="gh-content-email-stats">
Clicked
</span>
<span class="gh-content-email-stats-value">
{{#if this.isClickStatHovered}}
{{format-number @post.count.clicks}}
@ -152,6 +149,9 @@
{{@post.clickRate}}%
{{/if}}
</span>
<span class="gh-content-email-stats">
clicked
</span>
</div>
</LinkTo>
{{else}}
@ -164,7 +164,7 @@
<div class="flex">
{{#if (and (not this.session.user.isContributor) (or @post.isSent @post.isPublished) (or this.settings.emailTrackClicks (feature "memberAttribution")))}}
<LinkTo @route="posts.analytics" @model={{@post}} class="gh-post-list-cta stats {{if this.isHovered "is-hovered"}}" title="View post analytics">
{{svg-jar "stats" title="View post analytics"}}&nbsp;&nbsp;Stats
{{svg-jar "stats" title="View post analytics"}}<span>Stats</span>
</LinkTo>
{{else}}
{{!-- <LinkTo @route="editor.edit" @models={{array @post.displayName @post.id}} class="gh-post-list-cta edit {{if this.isHovered "is-hovered"}}" title="Edit this post">

View file

@ -256,7 +256,7 @@ a.gh-post-list-signups.active:hover > span, a.gh-post-list-conversions.active:ho
.gh-list .gh-content-entry-title {
display: flex;
align-items: center;
margin: 0 0 3px 0;
margin: 0 0 2px;
font-size: 1.6rem;
font-weight: 600;
}
@ -266,7 +266,7 @@ a.gh-post-list-signups.active:hover > span, a.gh-post-list-conversions.active:ho
}
.gh-posts-list-item p {
margin: 0 0 3px;
margin: 0 0 2px;
font-size: 1.3rem;
overflow-wrap: break-word;
color: var(--middarkgrey);
@ -567,6 +567,11 @@ a.gh-post-list-signups.active:hover > span, a.gh-post-list-conversions.active:ho
.gh-posts-list-item.gh-posts-list-item-labs .gh-post-list-opens,
.gh-posts-list-item.gh-posts-list-item-labs .gh-post-list-clicks {
width: 0;
}
.gh-posts-list-item.gh-posts-list-item-labs .gh-post-list-opens > div,
.gh-posts-list-item.gh-posts-list-item-labs .gh-post-list-clicks > div {
display: none;
}
@ -961,7 +966,7 @@ a.gh-post-list-signups.active:hover > span, a.gh-post-list-conversions.active:ho
}
.gh-posts-list-item-labs .gh-content-entry-title {
margin: 0 0 3px;
margin: 0 0 2px;
font-size: 1.55rem;
font-weight: 600;
}
@ -1025,10 +1030,7 @@ a.gh-post-list-signups.active:hover > span, a.gh-post-list-conversions.active:ho
.gh-posts-list-item-labs .gh-post-list-clicks,
.gh-posts-list-item-labs .gh-post-list-opens {
padding-right: 24px;
}
.gh-posts-list-item-labs .gh-post-list-opens {
padding-right: 36px;
width: 120px;
}
.gh-posts-list-item-labs .gh-content-email-stats,
@ -1045,56 +1047,10 @@ a.gh-post-list-signups.active:hover > span, a.gh-post-list-conversions.active:ho
.gh-content-email-stats-value {
color: var(--black);
font-size: 1.5rem;
font-size: 1.55rem;
font-weight: 600;
margin: 0 0 3px;
}
/*
.gh-posts-list-item-labs a.gh-post-list-cta {
display: flex;
align-items: center;
color: var(--green-d1);
}
a.gh-post-list-cta.edit {
color: var(--midlightgrey-d2);
}
a.gh-post-list-cta svg {
display: block;
width: 8px;
height: 8px;
margin: 2px 6px 0;
transition: transform 0.4s cubic-bezier(0.1, 0.7, 0.1, 1);
}
a.gh-post-list-cta svg path {
stroke-width: 4;
stroke: var(--green-d1);
}
a.gh-post-list-cta.edit svg path {
stroke: var(--midlightgrey-d2);
}
a.gh-post-list-cta.is-hovered svg {
transform: translateX(2px)
}
a.gh-post-list-cta.is-hovered:hover {
color: var(--green-d2);
}
.gh-post-analytics-meta a.gh-post-list-cta {
margin-right: 0;
}
*/
a.gh-post-list-cta {
display: flex;
@ -1145,6 +1101,10 @@ a.gh-post-list-cta svg path {
stroke-width: 2;
}
a.gh-post-list-cta > span {
padding: 0 0 0 1rem;
}