oacpl/newsletters/templates/newsletters.html

71 lines
3.1 KiB
HTML
Raw Normal View History

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">
{% 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>
{% 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-01-14 16:48:55 -05:00
<div class="p-3 newsletter-header" data-toggle="collapse"
data-target="#newsletter-body-{{ newsletter.id }}" aria-expanded="false"
aria-controls="newsletter-body-{{ newsletter.id }}">
2017-09-03 17:02:57 -04:00
<h2>{{ newsletter.subject }}</h2>
<span class="text-muted">By: {{ newsletter.creator }}</span>
<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>
2018-01-14 16:48:55 -05:00
<div id="subscribeModal" class="modal fade" tabindex="-1" role="dialog">
<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">&times;</span>
</button>
</div>
<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>
</div>
2018-01-14 16:48:55 -05:00
<input name="email" class="form-control" type="email">
</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>
</div>
</div>
</div>
</div>
2017-09-03 17:02:57 -04:00
{% endblock %}