Skip to content

Commit

Permalink
ftux: improvements
Browse files Browse the repository at this point in the history
- added login decorator for fund bounty page
- refactored quickstart css + updated title
  • Loading branch information
thelostone-mc committed May 21, 2019
1 parent 86ae6ce commit 7880782
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 36 deletions.
22 changes: 3 additions & 19 deletions app/assets/v2/css/quickstart.css
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -61,27 +48,25 @@ body.quickstart,
}

.steps-list p {
font-size: 1.1rem;
color: #4a4a4a
}

.steps-list ol li {
color: #3d3d46;
list-style-type: none;
line-height: 2.5rem;
font-size: 1.1rem;
}

.steps-list .action-footer {
justify-content: space-between;
}

.action-footer .video-link {
width: 30%;
width: 40%;
}

.action-footer .btn {
border-radius: 2px;
border-radius: 3px;
background-color: #0c0763;
border-color: #0c0763;
}
Expand All @@ -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 {
Expand Down
17 changes: 9 additions & 8 deletions app/assets/v2/js/pages/new_bounty.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
18 changes: 9 additions & 9 deletions app/dashboard/templates/quickstart.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
{% include 'shared/top_nav.html' with class='d-md-flex' %}
{% include 'shared/nav.html' %}
</div>
<div class="container-fluid content mt-3">
<div class="container-fluid content my-3 text-left">
<div class="row pb-1">
<div class="col text-center">
<h4 class="title">{% trans "Developer Guide" %}</h4>
<h4 class="title">{% trans "Funder Guide" %}</h4>
</div>
</div>
<div class="row col-12 offset-lg-1 col-lg-10">
<div class="dont-show">
<div class="dont-show text-right w-100">
<div class="checkbox_container">
<input name="dontshow" id="dontshow" type="checkbox" />
<span class="checkbox"></span>
Expand All @@ -53,7 +53,7 @@ <h4 class="title">{% trans "Developer Guide" %}</h4>
<img src="{% static 'v2/images/quickstart-box.svg' %}" />
</div>
<div class="col-md-6 col-sm-12 p-5 steps-list">
<ol>
<ol class="font-subheader">
<li>{% trans "1) Create a Github Issue, you'll need the issue URL" %}</li>
<li>{% trans "2) Select the type of issue to fund" %}</li>
<li>{% trans '3) Complete the form and press "Fund Issue"' %}</li>
Expand All @@ -63,18 +63,18 @@ <h4 class="title">{% trans "Developer Guide" %}</h4>
{% 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." %}
</p>
<div class="d-flex pt-5 action-footer">
<div class="video-link">
<div class="video-link my-auto">
<a href="#" class="show_video">
<i class="far fa-play-circle"></i>
<span >{% trans "Watch 90 second video" %}</span>
</a>
</div>
<a href="{% url 'new_funding' %}"><button class="btn btn-primary">{% trans "Ok, I'm ready" %}</button></a>
<a href="{% url 'new_funding' %}"><button class="btn btn-primary font-body shadow-none font-weight-semibold py-2">{% trans "Ok, I'm ready" %}</button></a>
</div>
</div>
<div class="col-md-3 col-sm-12 p-5 tips-list">
<h5 class="title">{% trans "Tips & Tricks" %}</h5>
<ul>
<ul class="font-body">
<li>{% trans "Know what you're looking for." %}</li>
<li>{% trans "Set clear acceptance criteria." %}</li>
<li>{% trans "Set a reasonable timeframe." %}</li>
Expand All @@ -86,7 +86,7 @@ <h5 class="title">{% trans "Tips & Tricks" %}</h5>
<a href="https://docs.google.com/document/d/1_U9IdDN8FIRMGAdLWCMl2BnqCTAv558QvyJiSWQfkbs/edit?usp=sharing" target="_blank" rel="noopener noreferrer">{% trans "See Developer Guide" %}</a>
</div>
</div>
<div class="row col-12 offset-lg-1 col-lg-10 pt-2 pb-5 issuetypes-container text-center">
<div class="row col-12 offset-lg-1 col-lg-10 pt-2 pb-5 mt-5 issuetypes-container text-center">
<h4 class="subheading">{% trans "Other Repo Maintainers are funding these types of issues" %}</h4>
<div class="col-md-3 mt-5 flex-column d-flex px-5">
<img src="{% static 'v2/images/quickstart-icons/newproduct-icon.svg' %}" />
Expand Down Expand Up @@ -128,7 +128,7 @@ <h5>{% trans "DESIGN" %}</h5>
<h5>{% trans "OTHER" %}</h5>
<p>{% trans "Ideas, discussions, contests, consulting" %}</p>
</div>
<div class="col-lg-10 col-md-12 offset-lg-1 notsuggested-container">
<div class="col-lg-10 col-md-12 offset-lg-1 mt-4 notsuggested-container">
<h4 class="subheading">{% blocktrans %}In our experience, the following are <span class="orange-text">not</span> good candidates for bounties:{% endblocktrans %}</h4>
<ol class="text-left">
<li>
Expand Down
1 change: 1 addition & 0 deletions app/dashboard/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7880782

Please sign in to comment.