Hide newsletter form if setting is disabled in the Admin. Support for feature image caption in posts

This commit is contained in:
Eduardo Gomez 2021-10-09 15:58:02 +02:00
parent da7c113ef9
commit d746737ce1
5 changed files with 29 additions and 16 deletions

File diff suppressed because one or more lines are too long

View File

@ -32,7 +32,7 @@ into the {body} of the default.hbs template --}}
<p class="m-hero-description bigger">{{@site.description}}</p> <p class="m-hero-description bigger">{{@site.description}}</p>
{{/if}} {{/if}}
{{#if @labs.members}} {{#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}} {{/if}}
</div> </div>
</section> </section>

View File

@ -54,5 +54,5 @@
"desktop": "assets/screenshot-desktop.jpg", "desktop": "assets/screenshot-desktop.jpg",
"mobile": "assets/screenshot-mobile.jpg" "mobile": "assets/screenshot-mobile.jpg"
}, },
"version": "1.0.4" "version": "1.0.5"
} }

View File

@ -27,6 +27,15 @@ into the {body} of the default.hbs template --}}
{{!-- Inject styles of the hero image to make it responsive --}} {{!-- Inject styles of the hero image to make it responsive --}}
{{> hero background=feature_image}} {{> hero background=feature_image}}
</section> </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}} {{/post}}
<article> <article>
@ -85,21 +94,21 @@ into the {body} of the default.hbs template --}}
</div> </div>
{{!-- Email subscribe form at the bottom of the page --}} {{!-- Email subscribe form at the bottom of the page --}}
{{#if @labs.members}} {{#if @labs.members}}
<section class="m-subscribe-section js-newsletter"> <section class="m-subscribe-section js-newsletter">
<div class="l-wrapper in-post"> <div class="l-wrapper in-post">
<div class="m-subscribe-section__content"> <div class="m-subscribe-section__content">
<div class="m-subscribe-section__text"> <div class="m-subscribe-section__text">
<h4 class="m-subscribe-section__title">{{t "Subscribe to our newsletter"}}</h4> <h4 class="m-subscribe-section__title">{{t "Subscribe to our newsletter"}}</h4>
<p class="m-subscribe-section__description"> <p class="m-subscribe-section__description">
{{t "Get the latest posts delivered right to your inbox."}} {{t "Get the latest posts delivered right to your inbox."}}
</p> </p>
</div> </div>
<div class="m-subscribe-section__form"> <div class="m-subscribe-section__form">
{{> "newsletter-form"}} {{> "newsletter-form"}}
</div>
</div> </div>
</div> </div>
</div> </section>
</section>
{{/if}} {{/if}}
<section class="m-author"> <section class="m-author">
<div class="m-author__content"> <div class="m-author__content">

View File

@ -55,3 +55,7 @@
padding-top: 80px; padding-top: 80px;
} }
} }
.l-wrapper.in-caption {
padding-top: 10px;
}