mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-25 09:03:12 +03:00
301 lines
18 KiB
Handlebars
301 lines
18 KiB
Handlebars
<section class="gh-canvas">
|
||
<GhCanvasHeader class="gh-canvas-header">
|
||
<h2 class="gh-canvas-title" data-test-screen-title>
|
||
Dashboard
|
||
</h2>
|
||
</GhCanvasHeader>
|
||
|
||
<div class="view-container gh-dashboard">
|
||
|
||
{{#if (and this.session.user.isOwner (not this.feature.launchComplete))}}
|
||
<section class="gh-dashboard-area lw-banner">
|
||
<div class="gh-lw-banner" style="background-image:url(assets/img/launch-wizard-bg.png);">
|
||
<h1>Launch your site!</h1>
|
||
<p>Customize your brand and connect to Stripe to get your membership site ready to be shown to the world.</p>
|
||
<LinkTo class="gh-btn gh-btn-green" @route="launch"><span>Start setup guide</span></LinkTo>
|
||
<div class="gh-dashboard-dismiss">
|
||
<GhDropdownButton @dropdownName="launch-wizard-dismiss"
|
||
@classNames="gh-btn gh-btn-icon only-has-icon gh-dashboard-dismissbutton dark">
|
||
<span>
|
||
{{svg-jar "dotdotdot"}}
|
||
</span>
|
||
</GhDropdownButton>
|
||
<GhDropdown @name="launch-wizard-dismiss" @classNames="gh-dashboard-dismiss-dropdown dropdown-menu dropdown-triangle-top-right">
|
||
<button class="gh-btn" {{action "dismissLaunchBanner"}}><span>Dismiss</span></button>
|
||
</GhDropdown>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
{{else}}
|
||
<section class="gh-dashboard-area charts">
|
||
<div class="gh-dashboard-box mrr">
|
||
<div class="flex items-center justify-between">
|
||
<h4 class="gh-dashboard-header">MRR</h4>
|
||
<h4 class="gh-dashboard-header secondary">30 days</h4>
|
||
</div>
|
||
<div class="gh-dashboard-chart-container">
|
||
{{#if this.mrrStatsLoading}}
|
||
Loading...
|
||
{{else}}
|
||
{{#if this.mrrStatsError}}
|
||
<p class="error">
|
||
There was an error loading MRR
|
||
<code>{{this.mrrStatsError.message}}</code>
|
||
</p>
|
||
{{else}}
|
||
<div class="gh-dashboard-summary">
|
||
<div class="data"><span class="currency">{{this.mrrStatsData.currency}}</span>{{format-number this.mrrStatsData.currentAmount}}</div>
|
||
<div class="growth {{this.mrrStatsData.percentClass}}">{{this.mrrStatsData.percentGrowth}}%</div>
|
||
</div>
|
||
{{#if this.mrrStatsData}}
|
||
<div class="gh-dashboard-chart">
|
||
<GhMembersChart @type="LineWithLine" @nightShift={{feature "nightShift"}} @showSummary={{false}} @showRange={{false}} @chartType="mrr" @chartStats={{this.mrrStatsData}} />
|
||
</div>
|
||
{{/if}}
|
||
{{/if}}
|
||
{{/if}}
|
||
</div>
|
||
</div>
|
||
<div class="gh-dashboard-box total-members">
|
||
<div class="gh-dashboard-chart-container">
|
||
{{#if this.memberCountStatsLoading}}
|
||
Loading...
|
||
{{else}}
|
||
{{#if this.memberCountStatsError}}
|
||
<p class="error">
|
||
There was an error loading total members
|
||
<code>{{this.memberCountStatsData.message}}</code>
|
||
</p>
|
||
{{else}}
|
||
<div class="gh-dashboard-summary small">
|
||
<h4 class="gh-dashboard-header">Total members</h4>
|
||
<div class="data-container">
|
||
<div class="data">{{format-number this.memberCountStatsData.all.total}}</div>
|
||
<div class="growth {{this.memberCountStatsData.all.percentClass}}">{{this.memberCountStatsData.all.percentGrowth}}%</div>
|
||
</div>
|
||
</div>
|
||
<div class="gh-dashboard-chart small">
|
||
<GhMembersChart @type="LineWithLine" @nightShift={{feature "nightShift"}} @chartSize="small" @showSummary={{false}} @chartType="all-members" @showRange={{false}} @chartStats={{this.memberCountStatsData.all}} />
|
||
</div>
|
||
{{/if}}
|
||
{{/if}}
|
||
</div>
|
||
</div>
|
||
<div class="gh-dashboard-box paid-members">
|
||
<div class="gh-dashboard-chart-container">
|
||
{{#if this.memberCountStatsLoading}}
|
||
Loading...
|
||
{{else}}
|
||
{{#if this.memberCountStatsError}}
|
||
<p class="error">
|
||
There was an error loading paid members
|
||
<code>{{this.memberCountStatsData.message}}</code>
|
||
</p>
|
||
{{else}}
|
||
<div class="gh-dashboard-summary small">
|
||
<h4 class="gh-dashboard-header">Paid members</h4>
|
||
<div class="data-container">
|
||
<div class="data">{{format-number this.memberCountStatsData.paid.total}}</div>
|
||
<div class="growth {{this.memberCountStatsData.paid.percentClass}}">{{this.memberCountStatsData.paid.percentGrowth}}%</div>
|
||
</div>
|
||
</div>
|
||
<div class="gh-dashboard-chart small">
|
||
<GhMembersChart @type="LineWithLine" @nightShift={{feature "nightShift"}} @chartSize="small" @showSummary={{false}} @chartType="paid-members" @showRange={{false}} @chartStats={{this.memberCountStatsData.paid}} />
|
||
</div>
|
||
{{/if}}
|
||
{{/if}}
|
||
</div>
|
||
</div>
|
||
<div class="gh-dashboard-box newsletter-open-rate">
|
||
<div class="gh-dashboard-chart-container">
|
||
{{#if this.newsletterOpenRatesLoading}}
|
||
Loading...
|
||
{{else}}
|
||
{{#if this.newsletterOpenRatesError}}
|
||
<p class="error">
|
||
There was an error loading newsletter open rates
|
||
<code>{{this.memberCountStatsData.message}}</code>
|
||
</p>
|
||
{{else}}
|
||
<div class="gh-dashboard-summary small">
|
||
<h4 class="gh-dashboard-header">Email open rate</h4>
|
||
|
||
<div class="data-container">
|
||
<div class="data">{{this.newsletterOpenRatesData.current}}%</div>
|
||
<div class="growth {{this.newsletterOpenRatesData.percentClass}}">{{this.newsletterOpenRatesData.percentGrowth}}%</div>
|
||
</div>
|
||
</div>
|
||
<div class="gh-dashboard-chart small">
|
||
<GhMembersChart @type="bar" @nightShift={{feature "nightShift"}} @chartSize="small" @showSummary={{false}} @chartType="open-rate" @showRange={{false}} @chartStats={{this.newsletterOpenRatesData}} />
|
||
</div>
|
||
{{/if}}
|
||
{{/if}}
|
||
</div>
|
||
</div>
|
||
</section>
|
||
{{/if}}
|
||
|
||
<section class="gh-dashboard-area mixed">
|
||
<div class="gh-dashboard-container col-2">
|
||
<div class="gh-dashboard-box">
|
||
<div class="content">
|
||
<h2>Introduction to Members</h2>
|
||
<p>The native Members feature makes it possible to launch a membership business, develop a direct relationship with your audience and generate revenue from your creative work.</p>
|
||
</div>
|
||
<div class="footer">
|
||
<a class="gh-btn gh-btn-outline" href="https://ghost.org/help/members-introduction/" target="_blank" rel="noopener"><span>Learn more about Members</span></a>
|
||
</div>
|
||
</div>
|
||
<div class="gh-dashboard-box">
|
||
<div class="content">
|
||
<h2>Customise Members experience</h2>
|
||
<p>Set membership signup details in Portal settings, remove or add your site's name and logo in newsletter emails.</p>
|
||
</div>
|
||
<div class="footer">
|
||
<LinkTo class="gh-btn gh-btn-outline" @route="settings"><span>Portal settings</span></LinkTo>
|
||
<LinkTo class="gh-btn gh-btn-outline ml2" @route="settings.members-email"><span>Email design</span></LinkTo>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<a class="gh-dashboard-container" href="https://ghost.org/blog/membership-business-small-audience/" target="_blank" rel="noopener noreferrer">
|
||
<div class="gh-dashboard-box blogpost thebrowser">
|
||
<div class="content">
|
||
<h2>How to start a successful membership business without a huge audience</h2>
|
||
<p>You can gain serious momentum with your membership business—even with a smaller audience. Find your first 100 true fans, cultivate them, and build a fulfilling and thriving premium community.</p>
|
||
<div class="read-time">8 MIN READ</div>
|
||
</div>
|
||
<div class="thumbnail" style="background-image: url(assets/img/dashboard/start-membership.jpg);"></div>
|
||
</div>
|
||
</a>
|
||
|
||
<a class="gh-dashboard-container" href="https://thebrowser.com/" target="_blank" rel="noopener noreferrer">
|
||
<div class="gh-dashboard-box blogpost thebrowser">
|
||
<div class="thumbnail" style="background-image: url(assets/img/dashboard/the-browser.png);"></div>
|
||
<div class="content">
|
||
<h2>Discover writing worth reading.</h2>
|
||
<p>Looking for inspiration to build a paid publication and newsletter with tens of thousands of subscribers?</p>
|
||
<p><strong>The Browser</strong> is one of the most successful sites running on Ghost, giving people interesting things to ponder and fascinating ideas to discuss at dinner.</p>
|
||
<span class="green">Check it out →</span>
|
||
</div>
|
||
</div>
|
||
</a>
|
||
|
||
{{!-- <div class="gh-dashboard-container">
|
||
<div class="gh-dashboard-box grey">
|
||
<div class="content">
|
||
<h2>...</h2>
|
||
<p>...</p>
|
||
</div>
|
||
</div>
|
||
</div> --}}
|
||
|
||
<a class="gh-dashboard-container" href="https://ghost.org/blog/find-your-niche-creator-economy/" target="_blank" rel="noopener noreferrer">
|
||
<div class="gh-dashboard-box blogpost thebrowser">
|
||
<div class="thumbnail" style="background-image: url(assets/img/dashboard/find-niche.jpg);"></div>
|
||
<div class="content">
|
||
<h2>The unexpected (but proven) way to find your niche in the creator economy</h2>
|
||
<p>Niche = focus. If you’re struggling to find your angle, chances are you’re closer than you think. When you do find your niche, it will practically feel like cheating.</p>
|
||
<p class="green">Here’s how to figure out yours →</p>
|
||
<div class="read-time">9 MIN READ</div>
|
||
</div>
|
||
</div>
|
||
</a>
|
||
</section>
|
||
|
||
<section class="gh-dashboard-area members-activity">
|
||
{{#if this.topMembersData}}
|
||
<div class="gh-dashboard-box grey top-members">
|
||
<div class="gh-dashboard-header-container">
|
||
<h4 class="gh-dashboard-header">Top members</h4>
|
||
{{#if this.topMembersDataHasOpenRates}}
|
||
<h4 class="gh-dashboard-header secondary">Open rate</h4>
|
||
{{else}}
|
||
<h4 class="gh-dashboard-header secondary">Member since</h4>
|
||
{{/if}}
|
||
</div>
|
||
<div class="gh-dashboard-list">
|
||
{{#if this.topMembersLoading}}
|
||
Loading...
|
||
{{else}}
|
||
{{#if this.topMembersError}}
|
||
<p class="tc">
|
||
There was an error loading member events.
|
||
<code class="hidden">{{this.events.error.message}}</code>
|
||
</p>
|
||
{{else}}
|
||
<ul class="gh-dashboard-top-members">
|
||
{{#each this.topMembersData as |member|}}
|
||
<li class="gh-dashboard-top-member">
|
||
<LinkTo class="member-details" @route="member" @model="{{member.id}}">
|
||
<GhMemberAvatar @member={{member}} @containerClass="w9 h9 mr3 flex-shrink-0" />
|
||
{{#if member.name}}
|
||
<span class="name">{{member.name}}</span>
|
||
{{else}}
|
||
<span class="email">{{member.email}}</span>
|
||
{{/if}}
|
||
</LinkTo>
|
||
{{#if member.emailOpenRate}}
|
||
<span class="open-rate">{{member.emailOpenRate}}%</span>
|
||
{{else}}
|
||
<span class="open-rate">
|
||
{{moment-format member.createdAtUTC "D MMM YYYY"}}
|
||
</span>
|
||
{{/if}}
|
||
</li>
|
||
{{/each}}
|
||
</ul>
|
||
{{/if}}
|
||
{{/if}}
|
||
<div class="gh-dashboard-top-members-footer">
|
||
<LinkTo @route="members">See all members {{svg-jar "arrow-right"}}</LinkTo>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
{{/if}}
|
||
|
||
{{#unless (and this.session.user.isOwner (not this.feature.launchComplete))}}
|
||
<div class="gh-dashboard-box grey activity-feed">
|
||
<h4 class="gh-dashboard-header">Activity feed</h4>
|
||
<div class="content">
|
||
{{#if this.eventsLoading}}
|
||
Loading...
|
||
{{else}}
|
||
{{#if this.eventsError}}
|
||
<p class="error">
|
||
There was an error loading events
|
||
<code>{{this.eventsError.message}}</code>
|
||
</p>
|
||
{{else}}
|
||
<GhEventTimeline @events={{this.eventsData}}/>
|
||
{{/if}}
|
||
{{/if}}
|
||
</div>
|
||
</div>
|
||
{{/unless}}
|
||
|
||
{{#unless (or whatsNewEntriesLoading whatsNewEntriesError)}}
|
||
<div class="gh-dashboard-box whats-new">
|
||
<div class="gh-dashboard-header-container">
|
||
<h4 class="gh-dashboard-header">What's new?</h4>
|
||
{{svg-jar "gift"}}
|
||
</div>
|
||
<div class="content">
|
||
{{#each this.whatsNewEntries as |entry|}}
|
||
<a href={{entry.url}} target="_blank" rel="noopener noreferrer">
|
||
<h2>{{entry.title}}</h2>
|
||
<span class="wn-date">{{moment-format entry.published_at "D MMM YYYY"}}</span>
|
||
{{#if entry.custom_excerpt}}
|
||
<p>{{entry.custom_excerpt}}</p>
|
||
{{/if}}
|
||
</a>
|
||
{{/each}}
|
||
</div>
|
||
<div class="footer">
|
||
<a href="https://ghost.org/changelog" target="_blank" rel="noopener noreferrer">See all updates</a>
|
||
</div>
|
||
</div>
|
||
{{/unless}}
|
||
</section>
|
||
</div>
|
||
</section> |