Skip to content

Commit eafacbd

Browse files
committed
fixed styling and img placeholder
1 parent 52bc785 commit eafacbd

5 files changed

Lines changed: 31 additions & 5 deletions

File tree

chipy_org/apps/contact/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ def form_valid(self, form):
2222
def get_context_data(self, **kwargs):
2323
""" Used to access message_as_modal in template as context """
2424
context = super(ContactView, self).get_context_data(**kwargs)
25-
context.update({'message_as_modal': self.message_as_modal})
25+
context.update({"message_as_modal": self.message_as_modal})
2626
return context

chipy_org/apps/main/views.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
class Home(TemplateView, InitialRSVPMixin):
1717
template_name = "main/homepage.html"
18-
message_as_modal = True
1918

2019
def get_meeting(self):
2120
return (
@@ -29,7 +28,6 @@ def get_context_data(self, **kwargs):
2928
context.update(kwargs)
3029
context["IS_HOMEPAGE"] = True
3130
context["featured_sponsor"] = Sponsor.featured_sponsor()
32-
context["message_as_modal"] = self.message_as_modal
3331

3432
context = self.add_extra_context(context)
3533
return context

chipy_org/static/css/shiny.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,31 @@ ul.no-bullets {
249249
top: 0;
250250
}
251251

252+
/*
253+
An id of "modal" refers only to modals created via
254+
the chipy_org/templates/_modal.html template.
255+
Using the #modal selector below, only the templated modals
256+
are affected.
257+
258+
Currently, other modals have ids such as "rsvp-modal", etc.
259+
*/
260+
#modal .modal-header {
261+
display: flex;
262+
flex-direction: column;
263+
}
264+
265+
#modal .modal-header > img {
266+
padding-top: 5%;
267+
}
268+
269+
#modal .modal-title {
270+
padding-top: 1rem;
271+
}
272+
273+
#modal .modal-body {
274+
text-align: center;
275+
}
276+
252277
/* Medium devices (tablets, less than 992px) */
253278
@media (max-width: 991.98px) {
254279
.padding-left-med-5 {

chipy_org/templates/_messages.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{% if message_as_modal %}
22
{% for message in messages %}
3-
<div>{{ message|linebreaks }}</div>
3+
<div class="modal-message">
4+
{{ message|linebreaks }}
5+
</div>
46
{% endfor %}
57

68
{% else %}

chipy_org/templates/_modal.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
{% load static %}
12
<div id="modal-show" style="display:none" data-bs-toggle="modal" data-bs-target="#modal"></div>
23

34
<div class="modal fade" id="modal" tabindex="-1" aria-labelledby="modalLabel" aria-hidden="true">
45
<div class="modal-dialog modal-dialog-centered">
56
<div class="modal-content">
67
<div class="modal-header">
7-
<img src="https://via.placeholder.com/150"></img>
8+
<img src="{% static 'img/chipy-logo.png' %}"></img>
89
<h5 class="modal-title black-text" id="modalLabel">Thank You.</h5>
910
</div>
1011
<div class="modal-body">

0 commit comments

Comments
 (0)