From 7880782c6f2e0e0050f8927bfd7475b4d717b12c Mon Sep 17 00:00:00 2001 From: Aditya Anand Date: Tue, 21 May 2019 15:13:48 +0530 Subject: [PATCH] ftux: improvements - added login decorator for fund bounty page - refactored quickstart css + updated title --- app/assets/v2/css/quickstart.css | 22 +++------------------- app/assets/v2/js/pages/new_bounty.js | 17 +++++++++-------- app/dashboard/templates/quickstart.html | 18 +++++++++--------- app/dashboard/views.py | 1 + 4 files changed, 22 insertions(+), 36 deletions(-) diff --git a/app/assets/v2/css/quickstart.css b/app/assets/v2/css/quickstart.css index 5853b7a0170..d1663cd98f8 100644 --- a/app/assets/v2/css/quickstart.css +++ b/app/assets/v2/css/quickstart.css @@ -1,27 +1,14 @@ -body.quickstart, -.quickstart { - background: #f6f6f6; -} - .quickstart .title { color: #0d0764; letter-spacing: 0; } -.quickstart .container-fluid.content { - margin-bottom: 13rem; - text-align: left; -} - .quickstart h4.title { font-size: 2.75rem; } .quickstart .dont-show { - text-align: right; - font-style: italic; color: #4a4a4a; - width: 100%; } .quickstart .dont-show .checkbox_container .filter-label { @@ -61,7 +48,6 @@ body.quickstart, } .steps-list p { - font-size: 1.1rem; color: #4a4a4a } @@ -69,7 +55,6 @@ body.quickstart, color: #3d3d46; list-style-type: none; line-height: 2.5rem; - font-size: 1.1rem; } .steps-list .action-footer { @@ -77,11 +62,11 @@ body.quickstart, } .action-footer .video-link { - width: 30%; + width: 40%; } .action-footer .btn { - border-radius: 2px; + border-radius: 3px; background-color: #0c0763; border-color: #0c0763; } @@ -92,12 +77,11 @@ body.quickstart, } .tips-list ul li { - font-size: 0.95rem !important; line-height: 2rem !important; } .issuetypes-container { - background-color: #efefef; + background-color: #fafafa; } .issuetypes-container .subheading { diff --git a/app/assets/v2/js/pages/new_bounty.js b/app/assets/v2/js/pages/new_bounty.js index fdae9c9853e..9089833d4f3 100644 --- a/app/assets/v2/js/pages/new_bounty.js +++ b/app/assets/v2/js/pages/new_bounty.js @@ -19,19 +19,20 @@ if (localStorage['quickstart_dontshow'] !== 'true' && window.location = quickstartURL; } -function doShowQuickstart(url) { - var fundingURL = document.location.origin + '/funding/new\\?'; - var bountyURL = document.location.origin + '/bounty/new\\?'; - var blacklist = [ fundingURL, bountyURL, quickstartURL ]; +const doShowQuickstart = url => { + let blacklist = [quickstartURL]; - for (var i = 0; i < blacklist.length; i++) { - if (url.match(blacklist[i])) { + blacklist.push(document.location.origin + '/bounty/new\\?'); + blacklist.push(document.location.origin + '/funding/new\\?'); + blacklist.push(document.location.origin + '/new\\?'); + + for (let i = 0; i < blacklist.length; i++) { + if (url.match(blacklist[i])) return false; - } } return true; -} +}; var processedData; diff --git a/app/dashboard/templates/quickstart.html b/app/dashboard/templates/quickstart.html index 580bd891df2..78f78487e75 100644 --- a/app/dashboard/templates/quickstart.html +++ b/app/dashboard/templates/quickstart.html @@ -31,14 +31,14 @@ {% include 'shared/top_nav.html' with class='d-md-flex' %} {% include 'shared/nav.html' %} -
+
-

{% trans "Developer Guide" %}

+

{% trans "Funder Guide" %}

-
+
@@ -53,7 +53,7 @@

{% trans "Developer Guide" %}

-
    +
    1. {% trans "1) Create a Github Issue, you'll need the issue URL" %}
    2. {% trans "2) Select the type of issue to fund" %}
    3. {% trans '3) Complete the form and press "Fund Issue"' %}
    4. @@ -63,18 +63,18 @@

      {% trans "Developer Guide" %}

      {% trans "Once confirmed on blockchain, your bounty is posted to Gitcoin! Wait for developers across the world to discover your bounty and start working on your issue." %}

      {% trans "Tips & Tricks" %}
      -
        +
        • {% trans "Know what you're looking for." %}
        • {% trans "Set clear acceptance criteria." %}
        • {% trans "Set a reasonable timeframe." %}
        • @@ -86,7 +86,7 @@
          {% trans "Tips & Tricks" %}
          {% trans "See Developer Guide" %}
-
+

{% trans "Other Repo Maintainers are funding these types of issues" %}

@@ -128,7 +128,7 @@
{% trans "DESIGN" %}
{% trans "OTHER" %}

{% trans "Ideas, discussions, contests, consulting" %}

-
+

{% blocktrans %}In our experience, the following are not good candidates for bounties:{% endblocktrans %}

  1. diff --git a/app/dashboard/views.py b/app/dashboard/views.py index e5a824bcc5e..54f1339b069 100644 --- a/app/dashboard/views.py +++ b/app/dashboard/views.py @@ -2353,6 +2353,7 @@ def redeem_coin(request, shortcode): raise Http404 +@login_required def new_bounty(request): """Create a new bounty.""" from .utils import clean_bounty_url