From d08b929429ad3fbaaf53d79930e09c25700b18f3 Mon Sep 17 00:00:00 2001 From: AtmegaBuzz Date: Sun, 20 Nov 2022 13:16:45 +0530 Subject: [PATCH] implemented new figma design of Start bughunt| new fields added --- website/templates/hunt.html | 206 ++++++++++++++++++++++++++++-------- website/views.py | 2 +- 2 files changed, 161 insertions(+), 47 deletions(-) diff --git a/website/templates/hunt.html b/website/templates/hunt.html index 9ee8d5d9a9..acaef72c38 100644 --- a/website/templates/hunt.html +++ b/website/templates/hunt.html @@ -54,8 +54,95 @@ } .hunt-form .form-group { - margin-top: 30px; + margin-top: 10px; + align-items: center !important; } + #start-hunt-root{ + width: 100%; + display: flex; + justify-content: center; align-items: center; + padding: 30px; + + } + .main{ + width: 60%; + height: max-content; + padding: 20px; + background-color: white; + box-shadow: 0px 0px 10px rgb(174, 174, 174); + } + .title{ + display: flex; + width: 100%; + justify-content: center; + align-items: center; + } + .title p{ + font-size: 5rem; + font-weight:900; + margin: 10px; + } + + .input-container { + display: flex; + width: 100%; + margin-bottom: 15px; + } + + /* Style the form icons */ + .icon { + padding: 10px; + background: rgb(255, 30, 30); + color: white; + min-width: 50px; + text-align: center; + } + + /* Style the input fields */ + .input-field { + width: 100%; + padding: 10px; + outline: none; + } + + .input-field:focus { + border: 1px solid rgb(255, 30, 30); + } + + #bughunt-submit{ + display: flex; + width: 100%; + justify-content: flex-end; + align-items: center; + margin-top: 10px; + } + #bughunt-submit button { + background-color: rgb(255, 30, 30); + color: white; + padding: 10px 10px; + border: none; + cursor: pointer; + width: 200px; + opacity: 0.9; + font-size: 1.5rem; + font-weight: bold; + } + + #bughunt-submit button:hover { + background-color: rgb(203, 0, 0); + } + + #bughunt-select-plan{ + padding: 10px 10px 10px 10px; + width: 100%; + border-radius: 0; + border: none; + background-color: rgba(255, 0, 0, 0.784); + color: white; + font-size: 1.4rem; + font-weight: bold; + } + {% endblock %} @@ -64,57 +151,84 @@
{% csrf_token %} -
-
-
-

Start a bug hunt!

- All paid plans are currently featured on the homepage under the sponsored bug hunt area. -
-
-
-
- {% csrf_token %} - - -
- Website to test: (required) -
- - - - +
+
+
+
+
+

START A

+

BUGHUNT

+
+

Enter URL, APP name or GPS location of issue

+
- {% if form.url.errors %} - - {% endif %}
-
- Your Logo: (required) + {% csrf_token %} +
+ +
+ + +
+ {% if form.url.errors %} + + {% endif %} +
+
+ +
+ + +
+ {% if form.url.errors %} + + {% endif %} +
+
+
+ + +
+ {% if form.logo.errors %} + + {% endif %} +
- - - - +
+ + +
+
+
+ +
+
+ Grand Prize: +

Max amout awarded to winner

+
+ +
+ {{ form.prize.errors }}
- {% if form.logo.errors %} - - {% endif %} -
-
- Grand Prize: -

What is the maximum payment amount that you will give to bug hunters?

-
- + {% if not user.is_authenticated %} +
*Login required + {% else %} +
+
- {{ form.prize.errors }} -
- {% if not user.is_authenticated %} -
*Login required - {% endif %} + {% endif %}
diff --git a/website/views.py b/website/views.py index fc9fcb96e8..538c09e33c 100644 --- a/website/views.py +++ b/website/views.py @@ -1433,7 +1433,7 @@ def search_issues(request, template="search.html"): class HuntCreate(CreateView): model = Hunt - fields = ["url", "logo", "prize", "plan"] + fields = ["url", "logo", "name", "description","prize", "plan"] template_name = "hunt.html" def form_valid(self, form):