Skip to content

Commit

Permalink
Add newsletter form
Browse files Browse the repository at this point in the history
  • Loading branch information
themkat committed Nov 3, 2024
1 parent ed946ac commit fb4cdd9
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 3 deletions.
8 changes: 5 additions & 3 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@
class="active"
{% endif %}
href="{{"tags/emacs.html" | relative_url }}">Emacs</a>
<a {% if page.url == "/tags/books.html" %}
<a {% if page.tab == "newsletter" %}
class="active"
{% endif %}
href="{{"tags/books.html" | relative_url }}">Book club</a>
href="{{"newsletter.html" | relative_url }}">Newsletter</a>
<a {% if page.tab == "about" %}
class="active"
{% endif %}
Expand All @@ -137,7 +137,9 @@
</div>

<div class="content">
{% include searchbox.html %}
{% if page.tab != "newsletter" %}
{% include searchbox.html %}
{% endif %}
{{ content}}
</div>

Expand Down
20 changes: 20 additions & 0 deletions _sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,26 @@ body {
}
}

.newsletter-form {
width: 60%;
margin: auto;
padding-top: 5vh;
padding-bottom: 5vh;

input {
font-size: 1.2em;
width: 70%;
border-radius: 5px;
}

button {
font-size: 1.2em;
font-weight: bold;
background-color: var(--menu-main-color);
border-radius: 5px;
}
}

// Experimental printing support
@media print {
.menu, .footer, .color-mode-toggle, .sharebuttons, .printbutton, .related_posts, #commento, .search-box {
Expand Down
24 changes: 24 additions & 0 deletions org/newsletter.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#+OPTIONS: toc:nil num:nil
#+STARTUP: showall indent
#+STARTUP: hidestars
#+BEGIN_EXPORT html
---
layout: default
tab: newsletter
title: Newsletter
---
#+END_EXPORT

* Subscribe to newsletter

Enjoy my blog? Bad at checking in regurarly? Want email updates? Then you should subscribe to my newsletter :) It's sent automatically every Saturday when there is new content.

#+BEGIN_EXPORT html
<form action="https://rssfeedpulse.com/campaign/716ded84-d049-4f07-a92b-bc7d84d7f17c/subscribe" method="get" class="newsletter-form">
<input name="email" autocomplete="email" type="email" placeholder="Your email" required>
<button>
Subscribe
</button>
</form>
<br />
#+END_EXPORT

0 comments on commit fb4cdd9

Please sign in to comment.