Skip to content

Commit

Permalink
Add newsletter form in bottom of posts (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
diogodanielsoaresferreira authored Jul 28, 2024
1 parent 8bfd51b commit 053ce94
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ sass:
style: compressed

# Comments
disqus_shortname: diogo-ferreira-webpage
#disqus_shortname: diogo-ferreira-webpage

# Social
# if you don't have any of social below, comment the line.
Expand Down
1 change: 0 additions & 1 deletion _includes/meta.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<br>
<hr>
<span class="entry-tags">{% for tag in page.tags %}<a href="{{ site.url }}/tags/#{{ tag }}" title="Pages tagged {{ tag }}" class="tag"><span class="term">{{ tag }}</span></a>{% unless forloop.last %}{% endunless %}{% endfor %}</span>
<span class="social-share">
<a href="https://www.facebook.com/sharer/sharer.php?u={{ site.url }}{{ page.url }}" title="Share on Facebook" class="tag">
Expand Down
29 changes: 29 additions & 0 deletions _includes/newsletter_subscription.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<hr>
<section id="newsletter" class="animated fadeInUp">
<div id="mc_embed_shell">
<link href="//cdn-images.mailchimp.com/embedcode/classic-061523.css" rel="stylesheet" type="text/css">
<div id="mc_embed_signup" style="text-align: center;">
<form action="https://github.us21.list-manage.com/subscribe/post?u=be74f5f2756c9c87d99733d03&amp;id=5ce36dd830&amp;f_id=00cd9ee6f0" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_self" novalidate="">
<div id="mc_embed_signup_scroll"><h2>Subscribe to receive the latest blog posts</h2>
<div class="mc-field-group"><label for="mce-EMAIL">E-mail address <span class="asterisk">* </span></label><input type="email" name="EMAIL" class="required email" id="mce-EMAIL" required="" value=""></div>
<div id="mce-responses" class="clear foot">
<div class="response" id="mce-error-response" style="display: none;"></div>
<div class="response" id="mce-success-response" style="display: none;"></div>
</div>
<div style="position: absolute; left: -5000px;" aria-hidden="true">
/* real people should not fill this in and expect good things - do not remove this or risk form bot signups */
<input type="text" name="b_be74f5f2756c9c87d99733d03_5ce36dd830" tabindex="-1" value="">
</div>
<br>
<div class="optionalParent">
<div class="clear foot">
<input type="submit" name="subscribe" id="mc-embedded-subscribe" class="button" value="Subscribe">
<p style="margin: 0px auto;"><a href="http://eepurl.com/iURlnI" title="Mailchimp"><span style="display: inline-block; background-color: transparent; border-radius: 4px;"></span></a></p>
</div>
</div>
</div>
</form>
</div>
</div>

</section><!-- Newsletter Subscription -->
3 changes: 3 additions & 0 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,14 @@ <h4>{{ page.date | date_to_string }}</h4>
</a>
</div>
{{ content }}

{% include newsletter_subscription.html %}
<div class="entry-meta">
{% include meta.html %}
</div>
</div>
</div>

{% if page.comments and site.disqus_shortname %}<section id="disqus_thread" class="animated fadeInUp"></section><!-- /#disqus_thread -->{% endif %}
</header>
{% include scripts.html %}
Expand Down
15 changes: 15 additions & 0 deletions _sass/elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,18 @@ kbd {
font-weight: 300;
margin-bottom: 10px;
}

#mc-embedded-subscribe {
background-color: #28a745; /* Green background */
color: white; /* White text */
border: none; /* No border */
padding: 10px 20px; /* Padding for size */
font-size: 16px; /* Font size */
border-radius: 5px; /* Rounded corners */
cursor: pointer; /* Pointer cursor on hover */
transition: background-color 0.3s ease; /* Smooth transition */
}

#mc-embedded-subscribe:hover {
background-color: #218838; /* Darker green on hover */
}

0 comments on commit 053ce94

Please sign in to comment.