0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

🎨 Improved empty state of the Members screen

No issue

- Added resources to help and inspire people get started with members, which will be hidden after 6+ members are added
This commit is contained in:
Sanne de Vries 2022-02-07 16:11:08 +01:00
parent aadbb6ea1c
commit 9234c8f695
9 changed files with 268 additions and 64 deletions

View file

@ -1,16 +1,9 @@
<div class="flex flex-column items-stretch">
{{!-- <p class="">Get started with one of the following options</p> --}}
<div class="gh-members-empty">
{{svg-jar "members-placeholder" class="gh-members-placeholder"}}
<h4>Start building your audience</h4>
<p>Use memberships to allow your readers to sign up and subscribe to your content.</p>
<button class="gh-btn gh-btn-green" type="button" {{on "click" this.addYourself}}>
<span>Add yourself as a member to test</span>
</button>
<div class="flex flex-column items-stretch mt5 pt5">
<LinkTo @route="member.new" class="gh-btn gh-btn-outline mb3">
<span>Manually add a member</span>
</LinkTo>
<LinkTo @route="members.import" class="gh-btn gh-btn-outline">
<span>Import members from CSV</span>
</LinkTo>
</div>
<p class="gh-members-empty-secondary-cta">Have members already? <LinkTo @route="member.new">Add them manually</LinkTo> or <LinkTo @route="members.import">import from CSV</LinkTo></p>
</div>

View file

@ -254,12 +254,12 @@ input:focus,
background: var(--black) !important;
}
.gh-btn:not(.gh-btn-green):not(.gh-btn-blue):not(.gh-btn-red):not(.gh-btn-primary):not(.gh-btn-black):not(.gh-btn-text):not(.gh-btn-accent) {
.gh-btn:not(.gh-btn-green):not(.gh-btn-blue):not(.gh-btn-red):not(.gh-btn-primary):not(.gh-btn-black):not(.gh-btn-text):not(.gh-btn-accent):not(.gh-btn-link) {
background: var(--lightgrey);
color: var(--black);
}
.gh-btn:not(.gh-btn-green):not(.gh-btn-blue):not(.gh-btn-red):not(.gh-btn-primary):not(.gh-btn-black):not(.gh-btn-text):not(.gh-btn-accent):hover {
.gh-btn:not(.gh-btn-green):not(.gh-btn-blue):not(.gh-btn-red):not(.gh-btn-primary):not(.gh-btn-black):not(.gh-btn-text):not(.gh-btn-accent):not(.gh-btn-link):hover {
background: var(--lightgrey-d1);
color: var(--black);
}
@ -950,6 +950,10 @@ input:focus,
background: var(--dark-main-bg-color);
}
.gh-members-empty .gh-members-placeholder {
fill: var(--midgrey-d2);
}
/* Members activity */
.gh-members-activity-icon svg path,
.gh-dashboard-activity-container svg path,
@ -957,6 +961,11 @@ input:focus,
stroke: #fff;
}
/* Offers */
.gh-offers-list-cta .discount-bubble {
color: var(--midgrey-d2);
}
/* Portal */
.gh-portal-settings-maintabs {
border: 1px solid color-mod(var(--darkgrey) l(-27%) blackness(+15%));

View file

@ -1371,7 +1371,7 @@
background: var(--whitegrey-d2);
}
.gh-main-section-content.grey .gh-btn:not(.gh-btn-white):not(.gh-btn-green):not(.gh-btn-blue):not(.gh-btn-red):not(.gh-btn-text):not(.gh-btn-outline):hover,
.gh-main-section-content.grey .gh-btn:not(.gh-btn-white):not(.gh-btn-green):not(.gh-btn-blue):not(.gh-btn-red):not(.gh-btn-text):not(.gh-btn-outline):not(.gh-btn-link):hover,
.gh-expandable-content .gh-btn:not(.gh-btn-white):not(.gh-btn-green):not(.gh-btn-blue):not(.gh-btn-red):not(.gh-btn-link):not(.gh-btn-text):not(.gh-btn-outline):hover {
background: color-mod(var(--whitegrey-d2) l(-4%));
}

View file

@ -77,6 +77,11 @@
top: 0;
}
.gh-list-with-helpsection {
height: unset;
margin: 0 -48px;
}
.members-header .view-actions input.gh-members-list-searchfield {
min-width: 220px;
padding-left: 32px;
@ -137,11 +142,6 @@ p.gh-members-list-email {
min-width: 220px;
}
.gh-members-placeholder {
width: 118px;
margin: -30px 0 15px;
}
.gh-member-list-avatar {
font-size: 1.65rem;
font-weight: 500;
@ -467,6 +467,176 @@ p.gh-members-list-email {
}
}
/* Members empty state
/* ----------------------------------------- */
.gh-members-empty {
display: flex;
flex-direction: column;
align-items: center;
padding: 2vw 4vw;
}
.gh-members-empty .gh-members-placeholder {
fill: var(--lightgrey);
width: 60px;
height: 60px;
margin-bottom: 20px;
}
.gh-members-empty h4 {
color: var(--black);
text-align: center;
font-weight: 600;
margin-bottom: 8px;
}
.gh-members-empty p {
max-width: 390px;
color: var(--midgrey);
text-align: center;
line-height: 1.45em;
margin: 0 0 20px;
padding: 0;
}
.gh-members-empty .gh-members-empty-secondary-cta {
margin-top: 3.2rem;
max-width: max-content;
}
.gh-members-empty-secondary-cta a {
font-weight: 500;
}
.gh-members-help {
margin-top: 8vmin;
margin-bottom: 0;
}
.gh-members-help .gh-main-section-content {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-gap: 32px;
padding: 32px;
}
@media (max-width: 1080px) {
.gh-members-help .gh-main-section-content {
grid-template-columns: 1fr;
}
}
.gh-members-help-card {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: space-between;
background: var(--white);
border-radius: 3px;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.07);
color: var(--midgrey);
font-size: 1.4rem;
padding: 32px;
transition: all 0.3s ease-in-out;
}
.gh-members-help-card p {
line-height: 1.4em;
margin-top: 12px;
}
.gh-members-help-card .thumbnail {
width: 100%;
height: 200px;
max-width: 200px;
background-size: cover;
background-position: left -80px top 0;
aspect-ratio: 1 / 1;
}
.gh-members-help-card .thumbnail.right {
background-position: left -40px top 0;
}
@media (max-width: 620px),
(min-width: 800px) and (max-width: 960px),
(min-width: 1080px) and (max-width: 1440px) {
.gh-members-help-card .thumbnail {
max-width: unset;
margin-top: 2rem;
background-position: unset;
}
.gh-members-help-card .thumbnail.right {
background-position: unset;
}
}
.gh-members-help-card:hover {
box-shadow:
0px 54px 80px rgba(0, 0, 0, 0.07),
0px 19.7109px 29.2013px rgba(0, 0, 0, 0.0482987),
0px 9.56927px 14.1767px rgba(0, 0, 0, 0.0389404),
0px 4.69103px 6.94968px rgba(0, 0, 0, 0.0310596),
0px 1.85484px 2.74791px rgba(0, 0, 0, 0.0217013);
transition: all 0.3s ease-in-out;
transform: translateY(-4px);
}
.gh-members-help-content {
display: flex;
width: 100%;
height: 100%;
}
@media (max-width: 620px),
(min-width: 800px) and (max-width: 960px),
(min-width: 1080px) and (max-width: 1440px) {
.gh-members-help-content {
flex-direction: column;
}
}
.gh-members-help-content .text {
position: relative;
margin: 2rem 0 0 3.2rem;
flex-grow: 1;
}
.gh-members-help-content .gh-btn-link {
position: absolute;
bottom: 0;
margin: 1rem 0;
}
@media (min-width: 1440px) and (max-width: 1560px) {
.gh-members-help-content .text {
margin: 0 0 0 2rem;
}
.gh-members-help-content .gh-btn-link {
margin: 0;
}
}
@media (max-width: 620px),
(min-width: 800px) and (max-width: 960px),
(min-width: 1080px) and (max-width: 1440px) {
.gh-members-help-content .text {
margin: 2rem 0 0;
}
.gh-members-help-content .text p {
margin-bottom: 2.8em;
}
.gh-members-help-content .gh-btn-link {
margin: 0;
}
}
/* Member details
/* ----------------------------------------- */

View file

@ -35,14 +35,14 @@
.gh-offers-list-cta .discount-bubble {
color: var(--lightgrey);
width: 72px;
height: 72px;
margin-bottom: 16px;
width: 68px;
height: 68px;
margin-bottom: 20px;
}
.gh-offers-list-cta .discount-bubble path,
.gh-offers-list-cta .discount-bubble circle {
stroke-width: 0.8px;
stroke-width: 1px;
}
.gh-offers-list-cta button {

View file

@ -2,7 +2,7 @@
<GhCanvasHeader class="gh-canvas-header break tablet members-header">
<h2 class="gh-canvas-title" data-test-screen-title>Members</h2>
<section class="view-actions">
<div class="view-actions-bottom-row">
<div class="view-actions-bottom-row {{if this.members.length "" "hidden"}}">
<div class="relative gh-members-header-search">
{{svg-jar "search" class="gh-input-search-icon"}}
<GhTextInput
@ -94,45 +94,73 @@
{{#unless this.members.loading}}
<section class="view-container">
{{#if this.members}}
<div class="gh-list-scrolling">
<table class="gh-list">
<thead>
<tr>
<th>{{this.listHeader}}</th>
{{#if (not-eq this.settings.editorDefaultEmailRecipients "disabled")}}
<th>Open rate</th>
{{/if}}
<th>Location</th>
<th>Created</th>
{{#each this.filterColumnLabels as |filterColumn|}}
<th>{{filterColumn}}</th>
{{/each}}
</tr>
</thead>
<VerticalCollection @tagName="tbody" @items={{this.members}} @key="id" @containerSelector=".gh-list-scrolling" @estimateHeight={{69}} @staticHeight={{true}} @bufferSize={{20}} as |member|>
<GhMembersListItem @newsletterEnabled={{not-eq this.settings.editorDefaultEmailRecipients "disabled"}}
@member={{member}}
@filterColumns={{this.filterColumns}}
data-test-member={{member.id}}
/>
</VerticalCollection>
</table>
</div>
{{else}}
<div class="no-posts-box">
<div class="no-posts">
{{svg-jar "members-placeholder" class="gh-members-placeholder"}}
{{#if this.showingAll}}
<h3>No members yet</h3>
<GhMembersNoMembers @afterCreate={{this.refreshData}} />
{{else}}
<h3>No members match the current filter</h3>
<LinkTo @route="members" @query={{hash filter=null}} class="gh-btn gh-btn-lg">
<span>Show all members</span>
</LinkTo>
{{/if}}
<div class="gh-list-scrolling {{if (lt this.members.length 6) "gh-list-with-helpsection"}}">
<table class="gh-list">
<thead>
<tr>
<th>{{this.listHeader}}</th>
{{#if (not-eq this.settings.editorDefaultEmailRecipients "disabled")}}
<th>Open rate</th>
{{/if}}
<th>Location</th>
<th>Created</th>
{{#each this.filterColumnLabels as |filterColumn|}}
<th>{{filterColumn}}</th>
{{/each}}
</tr>
</thead>
<VerticalCollection @tagName="tbody" @items={{this.members}} @key="id" @containerSelector=".gh-list-scrolling" @estimateHeight={{69}} @staticHeight={{true}} @bufferSize={{20}} as |member|>
<GhMembersListItem @newsletterEnabled={{not-eq this.settings.editorDefaultEmailRecipients "disabled"}}
@member={{member}}
@filterColumns={{this.filterColumns}}
data-test-member={{member.id}}
/>
</VerticalCollection>
</table>
</div>
{{else}}
{{#if this.showingAll}}
<GhMembersNoMembers @afterCreate={{this.refreshData}} @members={{this.members}} />
{{else}}
<div class="gh-members-empty">
{{svg-jar "members-placeholder" class="gh-members-placeholder"}}
<h4>No members match the current filter</h4>
<LinkTo @route="members" @query={{hash filter=null}} class="gh-btn mt4">
<span>Show all members</span>
</LinkTo>
</div>
{{/if}}
{{/if}}
{{#if (lt this.members.length 6)}}
<div class="gh-main-section gh-members-help">
<h2 class="gh-main-section-header small bn">Get the most out of offers</h2>
<div class="gh-main-section-block">
<div class="gh-main-section-content grey">
<a href="https://ghost.org/resources/build-audience-subscriber-signups/" target="_blank" class="gh-members-help-card" rel="noopener noreferrer">
<div class="gh-members-help-content">
<div class="thumbnail" style="background-image: url(assets/img/marketing/members-1.jpg);"></div>
<div class="text">
<h3>Building your audience with subscriber signups</h3>
<p>Learn how to turn anonymous visitors into logged-in members with memberships in Ghost.</p>
<div class="gh-btn gh-btn-link">Start building &rarr;</div>
</div>
</div>
</a>
<a href="https://ghost.org/resources/first-100-email-subscribers/" target="_blank" class="gh-members-help-card" rel="noopener noreferrer">
<div class="gh-members-help-content">
<div class="thumbnail right" style="background-image: url(assets/img/marketing/members-2.jpg);"></div>
<div class="text">
<h3>Get your first 100 email subscribers</h3>
<p>Starting from zero? Use this guide to find your founding audience members.</p>
<div class="gh-btn gh-btn-link">Become an expert &rarr;</div>
</div>
</div>
</a>
</div>
</div>
</div>
</div>
{{/if}}
</section>
{{else}}

View file

@ -1 +1,5 @@
<svg width="138" height="138" viewBox="0 0 138 138" xmlns="http://www.w3.org/2000/svg"><title>Combined Shape</title><g fill="none" fill-rule="evenodd"><path d="M69 .5c37.832 0 68.5 30.668 68.5 68.5s-30.668 68.5-68.5 68.5S.5 106.832.5 69 31.168.5 69 .5zM24.82 98.183h50.347C75.025 88.69 70.84 81.579 62.58 76.79c-8.404-4.871-16.772-4.871-25.175 0-8.26 4.788-12.445 11.899-12.586 21.392zm50.347 0h.503l-.5.5c0-.168 0-.335-.003-.5zm-.663-21.045c5.182 5.666 8.348 12.685 9.498 21.044h28.848c-.14-9.492-4.325-16.603-12.585-21.391-8.404-4.871-16.772-4.871-25.176 0-.198.115-.393.23-.585.347zM49.994 37.58c-4.173 0-7.72 1.475-10.67 4.437s-4.42 6.525-4.42 10.714c0 4.19 1.47 7.752 4.42 10.714 2.95 2.962 6.497 4.437 10.67 4.437 4.171 0 7.718-1.475 10.669-4.437 2.95-2.962 4.42-6.524 4.42-10.714s-1.47-7.752-4.42-10.714c-2.95-2.962-6.498-4.437-10.67-4.437zm37.683 0c-4.172 0-7.719 1.475-10.67 4.437-2.95 2.962-4.42 6.525-4.42 10.714 0 4.19 1.47 7.752 4.42 10.714 2.951 2.962 6.498 4.437 10.67 4.437s7.72-1.475 10.67-4.437 4.42-6.524 4.42-10.714-1.47-7.752-4.42-10.714c-2.95-2.962-6.498-4.437-10.67-4.437z" stroke="#9BAEB8" fill-opacity=".1" fill="#9BAEB8" stroke-linecap="square"/><path stroke-opacity=".012" stroke="#000" stroke-width="0" d="M25 25h88v88H25z"/><path d="M62.832 76.358C71.39 81.32 75.67 88.761 75.67 98.683H24.316c0-9.922 4.28-17.364 12.839-22.325 8.559-4.96 17.118-4.96 25.677 0zm37.684 0c8.559 4.961 12.838 12.403 12.838 22.325l-29.79-.001c-1.114-8.672-4.394-15.888-9.84-21.648.363-.23.734-.455 1.115-.676 8.559-4.96 17.118-4.96 25.677 0zM49.993 37.08c4.305 0 7.98 1.528 11.024 4.584 3.044 3.056 4.566 6.745 4.566 11.067s-1.522 8.01-4.566 11.067c-3.044 3.056-6.719 4.584-11.024 4.584-4.305 0-7.98-1.528-11.023-4.584-3.044-3.056-4.566-6.745-4.566-11.067s1.522-8.01 4.566-11.067c3.044-3.056 6.718-4.584 11.023-4.584zm37.684 0c4.305 0 7.98 1.528 11.024 4.584 3.044 3.056 4.566 6.745 4.566 11.067s-1.522 8.01-4.566 11.067c-3.044 3.056-6.719 4.584-11.024 4.584-4.305 0-7.98-1.528-11.023-4.584-3.045-3.056-4.567-6.745-4.567-11.067s1.522-8.01 4.567-11.067c3.044-3.056 6.718-4.584 11.023-4.584z" stroke="#9BAEB8" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></g></svg>
<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.525 1.275a3.5 3.5 0 1 1 4.95 4.95 3.5 3.5 0 0 1-4.95-4.95ZM12 1.25a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.995 8.995A4.25 4.25 0 0 1 16.25 12v2.25a.5.5 0 0 1-.5.5h-1.059l-.695 5.562a.5.5 0 0 1-.496.438h-3a.5.5 0 0 1-.496-.438l-.695-5.562H8.25a.5.5 0 0 1-.5-.5V12a4.25 4.25 0 0 1 1.245-3.005ZM12 8.75A3.25 3.25 0 0 0 8.75 12v1.75h1a.5.5 0 0 1 .496.438l.695 5.562h2.118l.695-5.562a.5.5 0 0 1 .496-.438h1V12A3.25 3.25 0 0 0 12 8.75ZM2.555 4.055a2.75 2.75 0 1 1 3.89 3.89 2.75 2.75 0 0 1-3.89-3.89ZM4.5 4.25a1.75 1.75 0 1 0 0 3.5 1.75 1.75 0 0 0 0-3.5ZM3.872 9.298c.667-.1 1.348-.04 1.987.175a.5.5 0 0 1-.318.948A3.252 3.252 0 0 0 1.25 13.5v.249h1a.5.5 0 0 1 .493.418l.68 4.082h2.153l.307-1.838a.5.5 0 1 1 .986.164l-.376 2.256A.5.5 0 0 1 6 19.25H3a.5.5 0 0 1-.493-.418l-.68-4.082H.75a.5.5 0 0 1-.5-.5v-.75a4.255 4.255 0 0 1 3.622-4.202ZM17.555 4.055a2.75 2.75 0 1 1 3.89 3.89 2.75 2.75 0 0 1-3.89-3.89Zm1.945.195a1.75 1.75 0 1 0 0 3.5 1.75 1.75 0 0 0 0-3.5ZM19.979 10.287a3.252 3.252 0 0 0-1.52.134.5.5 0 0 1-.32-.948 4.253 4.253 0 0 1 5.61 4.026v.751a.5.5 0 0 1-.5.5h-1.076l-.68 4.082a.5.5 0 0 1-.494.418h-3a.5.5 0 0 1-.493-.418l-.376-2.256a.5.5 0 1 1 .986-.164l.307 1.838h2.153l.68-4.082a.5.5 0 0 1 .493-.418h1v-.25a3.253 3.253 0 0 0-2.77-3.213Z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.249 20.99v.003-.002Zm.001.005a.5.5 0 0 0-1 .005c0 .337.173.61.38.811.204.2.48.37.79.517.623.294 1.493.547 2.527.753 2.077.416 4.924.669 8.053.669 3.13 0 5.976-.253 8.053-.669 1.034-.206 1.904-.459 2.527-.753.31-.147.586-.316.79-.517.207-.201.38-.474.38-.811a.5.5 0 0 0-1-.006m0 0a.05.05 0 0 0 0 .006v-.006a.303.303 0 0 1-.078.102c-.095.092-.26.205-.52.328-.515.244-1.294.477-2.295.677-1.995.399-4.773.649-7.857.649-3.084 0-5.862-.25-7.857-.65-1.001-.2-1.78-.432-2.295-.676-.26-.123-.425-.236-.52-.328a.304.304 0 0 1-.078-.102m21.5-.003v.002-.002Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB