2017-09-03 17:02:57 -04:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
|
|
|
|
{% block body %}
|
|
|
|
<style>
|
|
|
|
.newsletter-header {
|
|
|
|
cursor: pointer;
|
2017-09-03 17:04:34 -04:00
|
|
|
user-select: none;
|
2017-09-03 17:02:57 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
.newsletter-header:hover {
|
|
|
|
background-color: rgba(0, 0, 0, 0.1)
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<div class="container-fluid bg-dark-primary">
|
|
|
|
<div class="container py-3">
|
2017-09-04 01:16:49 -04:00
|
|
|
{% if request.user.is_anonymous %}
|
2018-01-14 16:48:55 -05:00
|
|
|
<button class="btn btn-secondary mx-auto d-block mb-3" data-toggle="modal"
|
|
|
|
data-target="#subscribeModal">Subscribe To The Newsletter
|
|
|
|
</button>
|
2017-09-04 01:16:49 -04:00
|
|
|
{% endif %}
|
2017-09-03 17:02:57 -04:00
|
|
|
{% for newsletter in newsletters %}
|
|
|
|
<div class="col-12 p-0 mb-3 bg-white newsletter">
|
2018-02-26 17:36:41 -05:00
|
|
|
<div class="p-3 newsletter-header" style="overflow:hidden" data-toggle="collapse"
|
2018-01-14 16:48:55 -05:00
|
|
|
data-target="#newsletter-body-{{ newsletter.id }}" aria-expanded="false"
|
|
|
|
aria-controls="newsletter-body-{{ newsletter.id }}">
|
2018-02-26 17:36:41 -05:00
|
|
|
<h2 class="float-left">{{ newsletter.subject }}</h2>
|
2017-09-03 17:02:57 -04:00
|
|
|
<span class="text-muted float-right">{{ newsletter.publish }}</span>
|
|
|
|
</div>
|
2018-01-14 16:48:55 -05:00
|
|
|
<div id="newsletter-body-{{ newsletter.id }}" class="bg-light-blue collapse">
|
2017-09-15 16:02:21 -04:00
|
|
|
<div class="p-3" style="overflow:hidden;">
|
2017-09-04 02:30:16 -04:00
|
|
|
{{ newsletter.body | safe }}
|
2017-09-03 17:37:39 -04:00
|
|
|
</div>
|
2017-09-03 17:02:57 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-09-04 01:16:49 -04:00
|
|
|
|
2018-01-14 16:48:55 -05:00
|
|
|
<div id="subscribeModal" class="modal fade" tabindex="-1" role="dialog">
|
2017-09-04 01:16:49 -04:00
|
|
|
<div class="modal-dialog" role="document">
|
|
|
|
<div class="modal-content">
|
2018-01-14 16:48:55 -05:00
|
|
|
<div class="modal-header">
|
|
|
|
<h5 class="modal-title text-dark-primary">Newsletter Sign Up</h5>
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
2017-09-04 01:16:49 -04:00
|
|
|
<div class="modal-body">
|
2018-01-14 16:48:55 -05:00
|
|
|
Want to keep up to date with all our latest news?
|
|
|
|
<br>
|
|
|
|
Enter your email below to be added to our mailing list.
|
|
|
|
<form id="subscribeForm" method="post">
|
|
|
|
{% csrf_token %}
|
|
|
|
<div class="input-group pt-2">
|
|
|
|
<div class="input-group-prepend">
|
|
|
|
<span class="input-group-text"><i class="fa fa-envelope-o"></i></span>
|
2017-09-04 01:16:49 -04:00
|
|
|
</div>
|
2018-01-14 16:48:55 -05:00
|
|
|
<input name="email" class="form-control" type="email">
|
2017-09-04 01:16:49 -04:00
|
|
|
</div>
|
2018-01-14 16:48:55 -05:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button id="subscribe" type="submit" form="subscribeForm" class="btn btn-primary">Subscribe</button>
|
|
|
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
2017-09-04 01:16:49 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-09-03 17:02:57 -04:00
|
|
|
{% endblock %}
|