subscribe to digest
This commit is contained in:
parent
743276298d
commit
bee761e0c4
8 changed files with 95 additions and 6 deletions
|
|
@ -39,6 +39,9 @@
|
|||
</header>
|
||||
<div class="about">
|
||||
{{ overlay.content | safe }}
|
||||
<div class="digest">
|
||||
{% include "subscribe_form.html" %}
|
||||
</div>
|
||||
</div>
|
||||
{% if now %}
|
||||
<div class="now">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
{% block head %}
|
||||
<title>Login - {{ settings.SITENAME }}</title>
|
||||
<title>Register - {{ settings.SITENAME }}</title>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="register">
|
||||
|
|
|
|||
21
app/templates/subscribe.html
Normal file
21
app/templates/subscribe.html
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{% extends "base.html" %}
|
||||
{% block head %}
|
||||
<title>Subscribe - {{ settings.SITENAME }}</title>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="subscribe">
|
||||
{% if subscribed %}
|
||||
Thank you for subscribing to our weekly email digest.
|
||||
<script>
|
||||
setTimeout(function() {
|
||||
document.location.href = '/'
|
||||
}, 3000)
|
||||
</script>
|
||||
{% else %}
|
||||
You can subscribe to a weekly email digest with all clips, edits, sirens and phantoms published in the week.
|
||||
{% include "subscribe_form.html" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
6
app/templates/subscribe_form.html
Normal file
6
app/templates/subscribe_form.html
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<form method="POST" action="{% url 'subscribe' %}">
|
||||
{% csrf_token %}
|
||||
<input name="email" type="email" placeholder="your email" required></input>
|
||||
<button id="subscribe">Subscribe to weekly digest</button>
|
||||
<div class="error">{{ error }}</div>
|
||||
</form>
|
||||
Loading…
Add table
Add a link
Reference in a new issue