Add members support

Closes #2
This commit is contained in:
John O'Nolan 2019-10-20 15:51:00 +07:00
parent 9e8c52b84f
commit 51eb8a3ea5
2 changed files with 27 additions and 10 deletions

View File

@ -0,0 +1,19 @@
<section class="subscribe-form">
<h3 class="subscribe-form-title">Subscribe to {{@site.title}}</h3>
<p class="subscribe-form-description">Get the latest posts delivered right to your inbox</p>
<form data-members-form="subscribe">
<div class="form-group">
<input class="subscribe-email" data-members-email placeholder="youremail@example.com" autocomplete="false" />
<button class="button primary" type="submit">
<span class="button-content">Subscribe</span>
<span class="button-loader">{{> "icons/loader"}}</span>
</button>
</div>
<div class="message-success">
<strong>Great!</strong> Check your inbox and click the link to confirm your subscription.
</div>
<div class="message-error">
Please enter a valid email address!
</div>
</form>
</section>

View File

@ -22,20 +22,18 @@
</div>
{{!-- Email subscribe form at the bottom of the page --}}
{{#if @labs.subscribers}}
<section class="subscribe-form">
<h3 class="subscribe-form-title">Subscribe to {{@site.title}}</h3>
<p>Get the latest posts delivered right to your inbox</p>
{{subscribe_form placeholder="youremail@example.com"}}
</section>
{{#if @labs.members}}
{{> subscribe-form}}
{{/if}}
<footer class="post-content-footer">
{{!-- There are two options for how we display the byline/author-info.
If the post has more than one author, we load a specific template
from includes/byline-multiple.hbs, otherwise, we just use the
default byline. --}}
<div class="post-authors">
Written by
{{#foreach authors}}
<a href="{{url}}">{{name}}</a>
{{/foreach}}
</div>
</footer>