diff --git a/project/pages/views.py b/project/pages/views.py index 9c65540..f9bbb88 100644 --- a/project/pages/views.py +++ b/project/pages/views.py @@ -36,6 +36,11 @@ class AboutIndexView(CustomFormTemplate): success_url = '/about/?sent' form_class = ContactForm + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context['sent'] = 'sent' not in self.request.GET + return context + def form_valid(self, form): form.send_email() return super().form_valid(form) diff --git a/static/src/less/style.less b/static/src/less/style.less index bfd7448..ab39fe1 100644 --- a/static/src/less/style.less +++ b/static/src/less/style.less @@ -174,7 +174,6 @@ footer { /* @end content base */ .panel { - .box-shadow(0px 4px 4px 3px rgba(0,0,0,0.6)); margin-bottom: 40px; } diff --git a/templates/about/index.html b/templates/about/index.html index f1e0037..7f69c17 100644 --- a/templates/about/index.html +++ b/templates/about/index.html @@ -46,14 +46,16 @@
+

Contact Me

+

Send me a message using the form below, please don't spam! Simply click the button below to see the form.

-
+
-
+
@@ -61,9 +63,13 @@
{% csrf_token %} - {{ form|bootstrap }} + {{ form | bootstrap }}
- + {% if sent %} + + {% else %} + + {% endif %}