Skip to content

Commit

Permalink
Hide newsletter form if setting is disabled in the Admin. Support for…
Browse files Browse the repository at this point in the history
… feature image caption in posts
  • Loading branch information
eddiesigner committed Oct 9, 2021
1 parent da7c113 commit d746737
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 16 deletions.
2 changes: 1 addition & 1 deletion assets/css/app.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ into the {body} of the default.hbs template --}}
<p class="m-hero-description bigger">{{@site.description}}</p>
{{/if}}
{{#if @labs.members}}
<a href="{{@site.url}}/newsletter" class="m-button filled js-newsletter">{{t "Subscribe"}}</a>
<a href="{{@site.url}}/newsletter" class="m-button filled js-newsletter">{{t "Subscribe"}}</a>
{{/if}}
</div>
</section>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@
"desktop": "assets/screenshot-desktop.jpg",
"mobile": "assets/screenshot-mobile.jpg"
},
"version": "1.0.4"
"version": "1.0.5"
}
35 changes: 22 additions & 13 deletions post.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ into the {body} of the default.hbs template --}}
{{!-- Inject styles of the hero image to make it responsive --}}
{{> hero background=feature_image}}
</section>
{{#if feature_image}}
{{#if feature_image_caption}}
<div class="l-wrapper in-caption">
<p class="m-small-text align-center">
{{feature_image_caption}}
</p>
</div>
{{/if}}
{{/if}}
{{/post}}

<article>
Expand Down Expand Up @@ -85,21 +94,21 @@ into the {body} of the default.hbs template --}}
</div>
{{!-- Email subscribe form at the bottom of the page --}}
{{#if @labs.members}}
<section class="m-subscribe-section js-newsletter">
<div class="l-wrapper in-post">
<div class="m-subscribe-section__content">
<div class="m-subscribe-section__text">
<h4 class="m-subscribe-section__title">{{t "Subscribe to our newsletter"}}</h4>
<p class="m-subscribe-section__description">
{{t "Get the latest posts delivered right to your inbox."}}
</p>
</div>
<div class="m-subscribe-section__form">
{{> "newsletter-form"}}
<section class="m-subscribe-section js-newsletter">
<div class="l-wrapper in-post">
<div class="m-subscribe-section__content">
<div class="m-subscribe-section__text">
<h4 class="m-subscribe-section__title">{{t "Subscribe to our newsletter"}}</h4>
<p class="m-subscribe-section__description">
{{t "Get the latest posts delivered right to your inbox."}}
</p>
</div>
<div class="m-subscribe-section__form">
{{> "newsletter-form"}}
</div>
</div>
</div>
</div>
</section>
</section>
{{/if}}
<section class="m-author">
<div class="m-author__content">
Expand Down
4 changes: 4 additions & 0 deletions src/sass/layouts/_wrapper.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,7 @@
padding-top: 80px;
}
}

.l-wrapper.in-caption {
padding-top: 10px;
}

0 comments on commit d746737

Please sign in to comment.