mirror of
https://github.com/aljazceru/Journal-ghost.git
synced 2026-01-11 09:14:27 +01:00
Added members feature toggle logic
This commit is contained in:
49
default.hbs
49
default.hbs
@@ -34,46 +34,39 @@
|
||||
|
||||
<div class="gh-head-actions">
|
||||
<button class="gh-search gh-icon-btn" data-ghost-search>{{> "icons/search"}}</button>
|
||||
{{#unless @member}}
|
||||
<a class="gh-head-btn" href="#/portal/signup" data-portal="signup">
|
||||
{{> icons/email}}
|
||||
Subscribe
|
||||
</a>
|
||||
{{else}}
|
||||
<a class="gh-head-btn" href="#/portal/account" data-portal="account">Account</a>
|
||||
{{/unless}}
|
||||
{{#if @site.members_enabled}}
|
||||
{{#unless @member}}
|
||||
<a class="gh-head-btn" href="#/portal/signup" data-portal="signup">
|
||||
{{> icons/email}} Subscribe
|
||||
</a>
|
||||
{{else}}
|
||||
<a class="gh-head-btn" href="#/portal/account" data-portal="account">Account</a>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{{body}}}
|
||||
|
||||
{{^if @member.paid}}
|
||||
{{#if @site.members_enabled}}
|
||||
{{#unless @member}}
|
||||
<div class="gh-subscribe">
|
||||
<div class="gh-outer">
|
||||
<section class="gh-subscribe-inner">
|
||||
{{^if @member}}
|
||||
<h3 class="gh-subscribe-title">Subscribe to {{@site.title}}</h3>
|
||||
|
||||
<div class="gh-subscribe-description">Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.</div>
|
||||
|
||||
<a class="gh-subscribe-input" href="#/portal/signup" data-portal="signup">
|
||||
<div class="gh-subscribe-input-text">
|
||||
{{> icons/email}}
|
||||
jamie@example.com
|
||||
</div>
|
||||
<div class="gh-subscribe-input-btn">Subscribe</div>
|
||||
</a>
|
||||
{{else}}
|
||||
<h3 class="gh-subscribe-title">Ready for unlimited access?</h3>
|
||||
|
||||
<div class="gh-subscribe-description">Upgrade to a paid account to get full access.</div>
|
||||
|
||||
<a class="gh-subscribe-btn gh-btn gh-primary-btn" href="#/portal/account/plans" data-portal="account/plans">Upgrade now</a>
|
||||
{{/if}}
|
||||
<h3 class="gh-subscribe-title">Subscribe to {{@site.title}}</h3>
|
||||
<div class="gh-subscribe-description">Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.</div>
|
||||
<a class="gh-subscribe-input" href="#/portal/signup" data-portal="signup">
|
||||
<div class="gh-subscribe-input-text">
|
||||
{{> icons/email}}
|
||||
jamie@example.com
|
||||
</div>
|
||||
<div class="gh-subscribe-input-btn">Subscribe</div>
|
||||
</a>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
|
||||
<footer class="gh-foot gh-outer">
|
||||
|
||||
36
index.hbs
36
index.hbs
@@ -72,23 +72,27 @@
|
||||
</section>
|
||||
</div>
|
||||
|
||||
{{^if @member.paid}}
|
||||
<div class="gh-signup">
|
||||
{{^if @member}}
|
||||
<p class="gh-signup-description">Sign up now to get access to the library of members-only issues.</p>
|
||||
{{#if @site.members_enabled}}
|
||||
{{^if @member.paid}}
|
||||
<div class="gh-signup">
|
||||
{{^if @member}}
|
||||
<p class="gh-signup-description">Sign up now to get access to the library of members-only issues.</p>
|
||||
|
||||
<a class="gh-subscribe-input" href="#/portal/signup" data-portal="signup">
|
||||
<div class="gh-subscribe-input-text">
|
||||
{{> icons/email}}
|
||||
jamie@example.com
|
||||
</div>
|
||||
<div class="gh-subscribe-input-btn">Subscribe</div>
|
||||
</a>
|
||||
{{else}}
|
||||
<p class="gh-signup-description">Upgrade to a paid account to get full access.</p>
|
||||
<a class="gh-signup-btn gh-btn gh-primary-btn" href="#/portal/account/plans" data-portal="account/plans">Upgrade now</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
<a class="gh-subscribe-input" href="#/portal/signup" data-portal="signup">
|
||||
<div class="gh-subscribe-input-text">
|
||||
{{> icons/email}}
|
||||
jamie@example.com
|
||||
</div>
|
||||
<div class="gh-subscribe-input-btn">Subscribe</div>
|
||||
</a>
|
||||
{{else}}
|
||||
{{#if @setting.paid_members_enabled}}
|
||||
<p class="gh-signup-description">Upgrade to a paid account to get full access.</p>
|
||||
<a class="gh-signup-btn gh-btn gh-primary-btn" href="#/portal/account/plans" data-portal="account/plans">Upgrade now</a>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user