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

Ethhack2019 #3974

Merged
merged 30 commits into from
Mar 15, 2019
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b4978ca
update leaderboard
deeayeen Mar 8, 2019
20575fc
update leaderboard
deeayeen Mar 8, 2019
c8a2673
fix nav
deeayeen Mar 8, 2019
90b9690
change leaderboard background
deeayeen Mar 8, 2019
49599aa
changed leaderboard podium to rounded pictures
deeayeen Mar 12, 2019
53d4598
Added hackathon landing page
iamonuwa Mar 12, 2019
229abb9
Merge pull request #1 from iamonuwa/ethhack-2019
deeayeen Mar 12, 2019
ba0675e
init ethereal 2019 page
deeayeen Mar 12, 2019
4b7c4f2
leaderboard fixes
deeayeen Mar 13, 2019
8293a9d
leaderboard fixes 2
deeayeen Mar 13, 2019
3ec4b67
need to add more responsiveness for large screens
deeayeen Mar 14, 2019
333849d
ethhack page formatting responsiveness
deeayeen Mar 14, 2019
60f3af4
rollback leaderboard changes
deeayeen Mar 15, 2019
9e670d2
rollback leaderboard changes 2
deeayeen Mar 15, 2019
7840ac8
more ethhack2019 small formatting
deeayeen Mar 15, 2019
cb544e7
Merge branch 'master' into ethhack2019
deeayeen Mar 15, 2019
2933718
Update views.py
deeayeen Mar 15, 2019
9f4ea78
ethhack fixes
deeayeen Mar 15, 2019
b759a7b
Merge branch 'ethhack2019' of https://github.com/deeayeen/web into et…
deeayeen Mar 15, 2019
a46494a
more ethhack formatting
deeayeen Mar 15, 2019
7153400
separate ethhack2019 to it's own css file
deeayeen Mar 15, 2019
ff01c59
ethhack octavio fixes
deeayeen Mar 15, 2019
636156d
more ethhack2019 fixes
deeayeen Mar 15, 2019
0b3522b
remove leaderboard changes
deeayeen Mar 15, 2019
2148e30
small change, remove leaderboard changes
deeayeen Mar 15, 2019
14ebab4
remove leaderboard changes
deeayeen Mar 15, 2019
89e0bcf
even more ethhack2019 fixes
deeayeen Mar 15, 2019
fa4e3e1
Merge branch 'ethhack2019' of https://github.com/deeayeen/web into et…
deeayeen Mar 15, 2019
b43aa48
deleted dashboard.css from ethhack2019
deeayeen Mar 15, 2019
389a355
wire up buttons ethhack2019
deeayeen Mar 15, 2019
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
1 change: 1 addition & 0 deletions app/app/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
url(r'^postcomment/', dashboard.views.post_comment, name='post_comment'),
url(r'^dashboard/?', dashboard.views.dashboard, name='dashboard'),
url(r'^explorer/?', dashboard.views.dashboard, name='explorer'),
url(r'^hackathon/ethhack2019', dashboard.views.ethhack, name='ethhack_2019'),
path('revenue/attestations/new', revenue.views.new_attestation, name='revenue_new_attestation'),

# action URLs
Expand Down
71 changes: 71 additions & 0 deletions app/assets/v2/images/hackathon/bot.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/v2/images/hackathon/consensys.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/v2/images/hackathon/ethback.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/v2/images/hackathon/ethback2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/assets/v2/images/hackathon/ethereal.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions app/assets/v2/images/hackathon/ethmain.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/v2/images/hackathon/ethtext.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/assets/v2/images/hackathon/microsoft.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions app/assets/v2/images/hackathon/plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
251 changes: 251 additions & 0 deletions app/dashboard/templates/dashboard/hackathon/ethhack_2019.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
<!DOCTYPE html>
{% load i18n static %}
<html lang="en">
<head>
{% include 'shared/head.html' %}
<link rel="stylesheet" href="{% static "v2/css/dashboard.css" %}">
<meta charset="UTF-8">
deeayeen marked this conversation as resolved.
Show resolved Hide resolved
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Eth Hackathon 2019</title>
<style>
.header{
background-image: url(/static/v2/images/hackathon/ethback2.png);
background-color: #0d023b;
background-size: cover;
background-position: 0px 0px;
background-repeat: no-repeat;
position: relative;
}

.centered1 {
position: absolute;
top: 20%;
left: 50%;
transform: translate(-50%, -50%);
}

.centered2 {
position: absolute;
bottom: 20%;
left: 50%;
transform: translate(-50%, -50%);
}
.centered3 {
position: absolute;
bottom: 5%;
left: 50%;
transform: translate(-50%, -50%);
}

@media screen and (min-width: 550px) {
.centered1 {
position: absolute;
top: 20%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 3rem !important;
}
.centered2 {
position: absolute;
bottom: 25%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 1rem !important;
}
.centered3 {
position: absolute;
bottom: 10%;
left: 50%;
transform: translate(-50%, -50%);
width: 12rem !important;
font-size: 1rem !important;
}
.pdesc {
font-size: 1rem !important
}
.pdesc2 {
font-size: 1rem !important
}
.topnav {
font-size: 1em !important
}
.part {
font-size: 3rem !important
}
}

@media screen and (min-width: 920px) {
.topnav {
font-size: 1em !important;
}
.ethsvg {
margin-top: 6rem !important
}
.ethtitle {
font-size: 4rem !important
}
.poweredby {
font-size: 1.5rem !important;
margin-top: 4rem !important;
}
.ethsvg2 {
margin-top: 0.7rem !important;
}
.btns{
width: 200px !important;
font-size: 1rem !important;
}
.btns-wrapper{
margin: 5rem !important
}
.centered1 {
position: absolute;
top: 20%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 3rem !important;
}
.centered2 {
position: absolute;
bottom: 25%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 1.75rem !important;
}
.centered3 {
position: absolute;
bottom: 10%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 1.75rem !important;
width: 12rem !important;
font-size: 1rem !important;
}
.part {
padding-top: 10rem !important;
font-size: 3.5rem !important;
}
.pbtn {
margin-top: 5rem !important;
margin-bottom: 7rem !important;
}
.pdesc {
font-size: 1.75rem !important;
padding-right: 10rem !important;
padding-left: 10rem !important;
padding-top: 4rem !important;
}
.pdesc2 {
font-size: 1.75rem !important;
padding-right: 10rem !important;
padding-top: 4rem !important;
}
.bottomnav {
padding: 5rem !important;
}
}
@media screen and (min-width: 1500px) {
.centered2 {
position: absolute;
bottom: 30%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 3rem !important;
}
.pdesc {
font-size: 3rem !important;
}
.pdesc2 {
font-size: 3rem !important;
}
.topnav {
font-size: 2rem !important;
}
}
</style>
</head>
<body class="text-center" style="background-color: #180944; color: white">
deeayeen marked this conversation as resolved.
Show resolved Hide resolved

<div class="text-center topnav" style="width: 100%; line-height: 2.75em; background-color: #3E00FF; font-size: 7px">
<div class="container">
<span>Join Gitcoin for a pre-Ethereal NY virtual hackathon this April!</span>
<span style="float: right;">Fund a Prize</span>
</div>
</div>
<img class="img-fluid ethsvg" style="max-width: 30%; height: auto; margin-top: 2rem" src="{% static "v2/images/hackathon/ethereal.svg" %}" />
<h1 class="font-weight-bolder mt-3 ethtitle" style="font-size: 1.25rem">Ethereal Virtual Hackathon</h1>

<h3 class="font-weight-bold poweredby" style="font-size: .6rem; margin-top: 1rem; opacity: .7">Powered by</h3>
<img class="img-fluid" style="max-width: 25%; height: auto" src="{% static "v2/images/logo.png" %}">
<img class="img-fluid ethsvg2" style="max-width: 2%; height: auto; margin-right: 1rem; margin-left: 1rem" src="{% static "v2/images/hackathon/plus.svg" %}">
<img class="img-fluid ethsvg2" style="max-width: 25%; height: auto; margin-top: 0.2rem" src="{% static "v2/images/hackathon/microsoft.svg" %}" />

<div class="btns-wrapper" style="margin: 1rem">
<a class="btn font-weight-bold mr-2 btns" style="background-color: #f9006c; border-radius: 30px; width: 100px; font-size: .4rem">Register</a>
<a class="btn font-weight-bold ml-2 btns" style="background-color: #3e00ff; border-radius: 30px; width: 100px; font-size: .4rem">Fund a Prize</a>
</div>

<div class="text-center" style="position: relative">
<h2 class="centered1 font-weight-bolder" style="font-size: 1rem">April 1st &#8212; 30th</h2>
<h2 class="centered2" style="font-size: .5rem; width: 70%">
Hackathon challenges will be posted as bounties, with the best hacks receiving prizes in ETH & ERC-20 tokens. Main track winners will receive free tickets to Ethereal NY to present their project live on stage.
</h2>
<img style="width: 100%; z-index: -1" src="{% static "v2/images/hackathon/ethback.jpg" %}">
</div>

<section style="background: white">
deeayeen marked this conversation as resolved.
Show resolved Hide resolved
<h2 class="font-weight-bolder part" style="color: black; padding-top: 3rem; font-size: 1.2rem; text-decoration: underline; text-underline-position: under">Participate</h2>
<h2 class="pdesc" style="color: black; padding-top: 1.25rem; padding-right: 3rem; padding-left: 3rem; font-size: 0.6rem">Register by April 1st for updates on key dates, prizes, teams, and instructions on how to start bounty hunting.</h2>
<a class="btn font-weight-bold pbtn" style="background-color: #f9006c; border-radius: 30px; width: 12rem; font-size: 1rem; margin-top: 2rem; margin-bottom: 3rem">Register</a>
</section>

<!--<div style="position: relative">
<h2 class="centered1 font-weight-bolder" style="font-size: 1rem; text-decoration: underline; text-underline-position: under">Fund a Prize Bounty</h2>
<h2 class="centered2" style="font-size: .5rem; width: 70%">
Have an epic challenge you want to see the community tackle? Want to see how bounty hunters from around the world use your tools? Reach out to us to sponsor and post a prize bounty!
</h2>
<a class="btn font-weight-bold centered3" style="background-color: #00A55E; border-radius: 30px; width: 100px; font-size: .5rem;">Fund a Prize</a>
<img style="width: 100%; z-index: -1;" src="{% static "v2/images/hackathon/ethback2.png" %}">
</div>-->

<section class="container-fluid header" style="overflow: visible; background-position: -11.9783px -17.7394px;">
<h2 class="font-weight-bolder part" style="color: white; padding-top: 3rem; font-size: 1.2rem; text-decoration: underline; text-underline-position: under;">Fund a Prize Bounty</h2>
<div class="container">
<div class="row align-items-center">
<div class="col-8 text-left">
<h2 class="pdesc2" style="color: white; padding-top: 1.25rem; padding-right: 3rem; font-size: 0.6rem">Have an epic challenge you want to see the community tackle? Want to see how bounty hunters from around the world use your tools? Reach out to us to sponsor and post a prize bounty!</h2>
<a class="btn font-weight-bold pbtn" style="background-color: #f9006c; border-radius: 30px; width: 12rem; font-size: 1rem; margin-top: 2rem; margin-bottom: 3rem">Fund a Prize</a>
</div>
<div class="col-4">
<img class="img-fluid bot" style="width: 100%; padding-bottom: 5rem" src="{% static "v2/images/hackathon/bot.svg" %}" />
</div>
</div>
</section>

<section style="background: white">
<h2 class="font-weight-bolder part" style="color: black; padding-top: 3rem; font-size: 1.2rem; text-decoration: underline; text-underline-position: under">Join the Commmunity</h2>
<h2 class="pdesc" style="color: black; padding-top: 1.25rem; padding-right: 3rem; padding-left: 3rem; font-size: 0.6rem">Register by April 1st for updates on key dates, prizes, teams, and instructions on how to start bounty hunting.</h2>
<a class="btn font-weight-bold pbtn" style="background-color: #f9006c; border-radius: 30px; width: 12rem; font-size: 1rem; margin-top: 2rem; margin-bottom: 3rem">Join</a>
</section>

<section style="background: black">
<div class="row align-items-center bottomnav" style="padding: 1rem">
<div class="col-3">
<img class="img-fluid" style="width: 100%" src="{% static "v2/images/logo.png" %}" />
</div>
<div class="col-3">
<img class="img-fluid" style="width: 100%" src="{% static "v2/images/hackathon/microsoft.svg" %}" />
</div>
<div class="col-3">
<img class="img-fluid align-middle" style="width: 100%" src="{% static "v2/images/hackathon/consensys.png" %}" />
</div>
<div class="col-3">
<img class="img-fluid" style="width: 100%" src="{% static "v2/images/hackathon/ethmain.svg" %}" />
</div>
</div>
</section>

<script src="{% static "v2/js/bootstrap.min.js" %}"></script>
deeayeen marked this conversation as resolved.
Show resolved Hide resolved
</body>
</html>
16 changes: 12 additions & 4 deletions app/dashboard/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,14 @@ def dashboard(request):
}
return TemplateResponse(request, 'dashboard/index.html', params)

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

title = str(_(" Eth Hackathon 2019"))
params = {
'title': title
}
return TemplateResponse(request, 'dashboard/hackathon/ethhack_2019.html', params)

def accept_bounty(request):
"""Process the bounty.
Expand Down Expand Up @@ -800,8 +808,8 @@ def social_contribution_email(request):
JsonResponse: Success in sending email.
"""
from marketing.mails import share_bounty

emails = []
emails = []
user_ids = request.POST.getlist('usersId[]', [])
url = request.POST.get('url', '')
inviter = request.user if request.user.is_authenticated else None
Expand Down Expand Up @@ -1114,7 +1122,7 @@ def bounty_invite_url(request, invitecode):

Args:
invitecode (str): Unique invite code with bounty details and handle

Returns:
django.template.response.TemplateResponse: The Bounty details template response.
"""
Expand All @@ -1137,7 +1145,7 @@ def bounty_invite_url(request, invitecode):
bounty_invite.inviter.add(inviter)
bounty_invite.invitee.add(request.user)
return redirect('/funding/details/?url=' + bounty.github_url)



def bounty_details(request, ghuser='', ghrepo='', ghissue=0, stdbounties_id=None):
Expand Down
9 changes: 5 additions & 4 deletions app/marketing/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ def leaderboard(request, key=''):

if amount:
amount_max = amount[0][0]
top_earners = ranks.order_by('-amount')[0:3].values_list('github_username', flat=True)
top_earners = ranks.order_by('-amount')[0:5].values_list('github_username', flat=True)
deeayeen marked this conversation as resolved.
Show resolved Hide resolved
top_earners = ['@' + username for username in top_earners]
top_earners = f'The top earners of this period are {", ".join(top_earners)}'
else:
Expand All @@ -743,10 +743,11 @@ def leaderboard(request, key=''):
'card_desc': f'See the most valued members in the Gitcoin community recently . {top_earners}',
'action_past_tense': 'Transacted' if 'submitted' in key else 'bountied',
'amount_max': amount_max,
'podium_items': items[:3] if items else [],
'technologies': technologies
'podium_items': items[:5] if items else [],
'technologies': technologies,
'active': 'leaderboard'
}

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

@staff_member_required
Expand Down
5 changes: 0 additions & 5 deletions app/retail/templates/leaderboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,26 +131,21 @@ <h3>{{title}} <span id="alpha">Alpha</span></h3>
</div>
</div>
</div>

{% include 'shared/bottom_notification.html' %}
{% include 'shared/analytics.html' %}
{% include 'shared/footer_scripts.html' %}
{% include 'shared/footer.html' %}
{% include 'shared/messages.html' %}

</body>

<script>
var technologies = []
{% for tech in technologies %}
technologies.push('{{tech}}')
{% endfor %}
</script>

<!-- jQuery -->
<script src="{% static "v2/js/abi.js" %}"></script>
<script src="/dynamic/js/tokens_dynamic.js"></script>
<script src="{% static "v2/js/tokens.js" %}"></script>
<script src="{% static "v2/js/pages/leaderboard.js" %}"></script>

</html>