subscribe to digest

This commit is contained in:
j 2025-01-23 14:03:55 +05:30
commit bee761e0c4
8 changed files with 95 additions and 6 deletions

View file

@ -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">

View file

@ -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">

View 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 %}

View 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>