Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ftux: improvements #4449

Merged
merged 4 commits into from
May 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
22 changes: 11 additions & 11 deletions app/assets/v2/js/pages/new_bounty.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ load_tokens();

var localStorage = window.localStorage ? window.localStorage : {};

const quickstartURL = document.location.origin + '/bounty/quickstart';

const FEE_PERCENTAGE = document.FEE_PERCENTAGE / 100.0;

var new_bounty = {
Expand All @@ -16,22 +14,24 @@ var new_bounty = {
if (localStorage['quickstart_dontshow'] !== 'true' &&
doShowQuickstart(document.referrer) &&
doShowQuickstart(document.URL)) {
window.location = quickstartURL;
window.location = document.location.origin + '/bounty/quickstart';
}

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 = [];

blacklist.push(document.location.origin + '/bounty/quickstart');
blacklist.push(document.location.origin + '/bounty/new\\?');
blacklist.push(document.location.origin + '/funding/new\\?');
blacklist.push(document.location.origin + '/new\\?');

for (var i = 0; i < blacklist.length; i++) {
if (url.match(blacklist[i])) {
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
4 changes: 4 additions & 0 deletions app/dashboard/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,7 @@ def dashboard(request):
}
return TemplateResponse(request, 'dashboard/index.html', params)


def ethhack(request):
"""Handle displaying ethhack landing page."""

Expand All @@ -923,6 +924,7 @@ def ethhack(request):
}
return TemplateResponse(request, 'dashboard/hackathon/ethhack_2019.html', params)


def accept_bounty(request):
"""Process the bounty.

Expand Down Expand Up @@ -1074,6 +1076,7 @@ def social_contribution_modal(request):
params['promo_text'] = promo_text
return TemplateResponse(request, 'social_contribution_modal.html', params)


@csrf_exempt
@require_POST
def social_contribution_email(request):
Expand Down Expand Up @@ -2368,6 +2371,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
21 changes: 14 additions & 7 deletions app/retail/templates/home/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,30 @@
<h1>{% trans "Crowdfunding and freelance developers for your software projects" %}</h1>
<p>
{% blocktrans %}
<b>Builders/Project Managers: </b><br>
Leverage our global, on-demand workforce. Find expert freelance developers to design, test, code, and build your project teams today. Save time via direct Github integration. Crowdfund for your open source startup or project to increase your budget and bring in more developers.
<b>Builders/Project Managers: </b><br>
Leverage our global, on-demand workforce. Find expert freelance developers to design,\
test, code, and build your project teams today. Save time via direct Github integration.
Crowdfund for your open source startup or project to increase your budget and bring in
more developers.
{% endblocktrans %}
<span class="d-flex mt-3 content-links">
<a href="https://gitcoin.co/bounties/funder" class="mr-3">Fund an Issue/Project</a>
<a href="https://gitcoin.co/grants/">Grants</a>
<a href="{% url "funder_bounties" %}" class="mr-3">Fund an Issue/Project</a>
<a href="{% url "grants:grants" %}">Grants</a>
</span>
{% endblocktrans %}
</p>
<p>
{% blocktrans %}
<b>Coders/Software Developers: </b><br>
Get paid in crypto for freelance jobs, building features, and solving bug bounties! Work with top open source projects and get paid out fast.
{% endblocktrans %}<br>
<span class="d-flex mt-3 content-links"><a href="https://gitcoin.co/onboard/contributor/">{% trans "Bug Bounties" %}</a></span>
<span class="d-flex mt-3 content-links"><a href="/onboard/contributor/">{% trans "Bug Bounties" %}</a></span>
</p>
<div class="buttons">
<a class="btn btn-gc-green mr-2" href="{% url "new_bounty" %}">{% trans "Fund an Issue" %}</a>
{% if is_new_funder %}
<a class="btn btn-gc-green mr-2" href="/onboard/funder/">{% trans "Become a Funder" %}</a>
{% else %}
<a class="btn btn-gc-green mr-2" href="{% url "quickstart" %}">{% trans "Fund an Issue" %}</a>
{% endif %}
<a class="btn btn-outline-white ml-2" href="{% url "products" %}">{% trans "See Our Products" %}</a>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/retail/templates/shared/top_nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<img src="{% static "v2/images/top-bar/kudos-logo.svg" %}" height="22" alt="" class="d-md-block d-none">
<img src="{% static "v2/images/top-bar/kudos-symbol.svg" %}" height="22" alt="" class="d-md-none">
</a>
<a class="{% if request.path|matches:'^\/((grants.*))$' %}selected{% endif %}" href="/grants">
<a class="{% if request.path|matches:'^\/((grants.*))$' %}selected{% endif %}" href="{% url "grants:grants" %}">
<img src="{% static "v2/images/top-bar/grants-logo.svg" %}" height="22" alt="" class="d-md-block d-none">
<img src="{% static "v2/images/top-bar/grants-symbol.svg" %}" height="22" alt="" class="d-md-none">
</a>
Expand Down
17 changes: 15 additions & 2 deletions app/retail/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

from app.utils import get_default_network
from cacheops import cached_as, cached_view, cached_view_as
from dashboard.models import Activity, Profile
from dashboard.models import Activity, Bounty, Profile
from dashboard.notifications import amount_usdt_open_work, open_bounties
from economy.models import Token
from marketing.mails import new_funding_limit_increase_request, new_token_request
Expand Down Expand Up @@ -64,7 +64,15 @@ def get_activities(tech_stack=None, num_activities=15):
activities = activities[0:num_activities]
return [a.view_props for a in activities]


def index(request):

user = request.user.profile if request.user.is_authenticated else None
is_new_funder = True

if user and Bounty.objects.filter(bounty_owner_github_username=user).count() > 0:
is_new_funder = False

products = [
{
'group' : 'grow_oss',
Expand Down Expand Up @@ -198,6 +206,7 @@ def index(request):
]

context = {
'is_new_funder': is_new_funder,
'products': products,
'know_us': know_us,
'press': press,
Expand Down Expand Up @@ -326,6 +335,7 @@ def subscribe(request):
}
return TemplateResponse(request, 'pricing/subscribe.html', context)


def funder_bounties_redirect(request):
return redirect(funder_bounties)

Expand Down Expand Up @@ -554,7 +564,7 @@ def contributor_bounties(request, tech_stack):
{ 'link': "/design", 'text': "Design"},
{ 'link': "/html", 'text': "HTML"},
{ 'link': "/ruby", 'text': "Ruby"},
{ 'link': "/css", 'text': "CSS"},
{ 'link': "/css", 'text': "CSS"},
]
}

Expand Down Expand Up @@ -1343,6 +1353,7 @@ def help(request):
}
return TemplateResponse(request, 'help.html', context)


def verified(request):
user = request.user if request.user.is_authenticated else None
profile = request.user.profile if user and hasattr(request.user, 'profile') else None
Expand All @@ -1354,6 +1365,7 @@ def verified(request):
}
return TemplateResponse(request, 'verified.html', context)


def presskit(request):

brand_colors = [
Expand Down Expand Up @@ -1518,6 +1530,7 @@ def slack(request):

return TemplateResponse(request, 'slack.html', context)


@csrf_exempt
def newtoken(request):
context = {
Expand Down