Skip to content

Commit

Permalink
feat: add beyond_blockhain hackathon page
Browse files Browse the repository at this point in the history
- update typeform link
- updated hackahton banner
- updated model to add unique identifer
- created config file to store sponsors list
- added custom styling for the page
  • Loading branch information
thelostone-mc committed Jun 20, 2019
1 parent 60ed0a0 commit 5079620
Show file tree
Hide file tree
Showing 11 changed files with 327 additions and 96 deletions.
80 changes: 80 additions & 0 deletions app/assets/v2/css/hackathons/explorer.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
.banner .img-holder {
margin: 1em;
align-items: center;
display: flex;
transition: all .2s ease-in-out;
}

.banner .img-holder--dark {
background-color:#333;
}

.banner .img-holder--light {
background-color:#eee;
}

.banner .sponsors-gold .img-holder {
width: 113px;
height: 113px;
padding: 1em;
}

.banner .sponsors-silver .img-holder {
width: 75px;
height: 75px;
padding: 0.8em;
}

.banner .img-holder:hover {
transform: scale(1.1);
}

.ui-tooltip {
padding-top: 6px;
padding-bottom: 6px;
}

.ui-tooltip-content {
font-size: 0.75rem;
font-weight: 600;
}

.banner {
background: linear-gradient(161deg, rgba(55,27,181,1) 37%, rgba(255,51,117,1) 100%);
}

.banner .hackathon-logo {
max-width: 40rem;
}

.banner .img-holder {
width: 113px;
height: 113px;
padding: 1em;
}

.banner .hackathon-name {
font-size: 3rem;
letter-spacing: 12px;
line-height: 72px;
text-transform: uppercase;
}

/* Beyond Blockchain 2019 */
#beyondblockchain_2019 {
background: #121315;
}

#beyondblockchain_2019 .hackathon-name {
font-size: 4rem;
}

#beyondblockchain_2019 .sponsors-gold img {
width: 12rem;
}

#beyondblockchain_2019 .img-holder {
width: auto;
height: auto;
padding: 0;
}
3 changes: 0 additions & 3 deletions app/assets/v2/css/hackathons/static.css
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,6 @@ h4 {

.bb-banner-bg {
background-color: #121315;
background-image: url('/static/v2/images/hackathon/beyond_block/logo.png');
background-size: cover;
height: 24rem;
}

.bb-green-bg {
Expand Down
Binary file removed app/assets/v2/images/hackathon/beyond_block/logo.png
Binary file not shown.
53 changes: 53 additions & 0 deletions app/assets/v2/images/hackathon/beyond_block/logo.svg
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/dashboard/context/hackathon.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@
'bg' : 'hk-black-bg',
'banner_text' : 'hk-white-f',
'logo_bg' : 'bb-banner-bg',
'logo' : static('/v2/images/hackathon/beyond_block/logo.svg'),
'title' : 'BEYOND BLOCKCHAIN',
'title_banner' : 'BEYOND BLOCKCHAIN',
'caption' : '''A three-week virtual hackathon <br> where global developers and
Expand Down
95 changes: 95 additions & 0 deletions app/dashboard/context/hackathon_explorer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# -*- coding: utf-8 -*-
'''
Copyright (C) 2019 Gitcoin Core
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
'''

from django.templatetags.static import static
from django.utils.translation import gettext_lazy as _

eth_hack = {
'hackathon_id' : 'eth_hack',
'sponsors_gold' : [
{
'name' : 'Quorum',
'logo' : static('v2/images/hackathon/ethhack/sponsors/big/quorum.svg')
},
{
'name' : 'Consensys Labs',
'logo' : static('v2/images/hackathon/ethhack/sponsors/big/labs-logo-blue.svg')
},
{
'name' : 'MythX',
'logo' : static('v2/images/hackathon/ethhack/sponsors/big/mythx-light.png')
},
{
'name' : 'Pegasys',
'logo' : static('v2/images/hackathon/ethhack/sponsors/big/pegasys-logo.svg')
},
{
'name' : 'Microsoft',
'logo' : static('v2/images/hackathon/ethhack/sponsors/big/microsoft.svg')
},
{
'name' : 'Adex',
'logo' : static('v2/images/hackathon/ethhack/sponsors/big/adex-vector-logo.svg')
}
],
'sponsors_silver' : [
{
'name' : 'Chainlink',
'logo' : static('v2/images/hackathon/ethhack/sponsors/small/chainlink-hexagon.svg')
},
{
'name' : 'Kauri',
'logo' : static('v2/images/hackathon/ethhack/sponsors/small/kauri_logo_vertical.svg')
},
{
'name' : 'LeapDAO',
'logo' : static('v2/images/hackathon/ethhack/sponsors/small/leapdao.svg')
},
{
'name' : 'Kleros',
'logo' : static('v2/images/hackathon/ethhack/sponsors/small/kleros-logo-vertical.svg')
},
{
'name' : 'Alethio',
'logo' : static('v2/images/hackathon/ethhack/sponsors/small/alethio-no-bg.svg')
},
{
'name' : 'Coinmark',
'logo' : static('v2/images/hackathon/ethhack/sponsors/small/coinmark_blue_lg.svg')
},
{
'name' : 'Autom(8)',
'logo' : static('v2/images/hackathon/ethhack/sponsors/small/autom8.svg')
},
{
'name' : 'POA',
'logo' : static('v2/images/hackathon/ethhack/sponsors/small/logo_poa.svg')
}
]
}

beyondblockchain_2019 = {
'sponsor_bg' : 'none',
'sponsors_gold' : [
{
'name' : 'Consensys Labs',
'logo' : static('v2/images/hackathon/ethhack/sponsors/big/labs-logo-blue.svg')
}
]
}
18 changes: 18 additions & 0 deletions app/dashboard/migrations/0034_hackathonevent_identifier.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 2.1.7 on 2019-06-19 18:21

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('dashboard', '0033_bounty_bounty_categories'),
]

operations = [
migrations.AddField(
model_name='hackathonevent',
name='identifier',
field=models.CharField(default='', max_length=255),
),
]
1 change: 1 addition & 0 deletions app/dashboard/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3113,6 +3113,7 @@ class HackathonEvent(SuperModel):
logo_svg = models.FileField(blank=True)
start_date = models.DateTimeField()
end_date = models.DateTimeField()
identifier = models.CharField(max_length=255, default='')

def __str__(self):
"""String representation for HackathonEvent.
Expand Down
13 changes: 6 additions & 7 deletions app/dashboard/templates/dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,16 @@
{% include 'shared/nav.html' %}
</div>
{% if hackathon %}
<div class="row pt-5 pb-5 text-center" style="
background: linear-gradient(161deg, rgba(55,27,181,1) 37%, rgba(255,51,117,1) 100%);
">
<link rel="stylesheet" href={% static "v2/css/hackathons/explorer.css" %}>
<div id="{{ hackathon.identifier }}" class="row pt-5 pb-5 text-center banner">
<div class="col g-font-muli">
<span class="d-block font-title-xl text-white font-weight-bold">{{ hackathon.name }}</span>
<span class="hackathon-name d-block mt-5 text-white font-weight-semibold">{{ hackathon.name }}</span>
{% if hackathon.logo_svg %}
<img class="d-block mx-auto my-4" max-width="364" src="{{ hackathon.logo_svg.url }}"/>
<img class="d-block mx-auto my-4 hackathon-logo" src="{{ hackathon.logo_svg.url }}"/>
{% elif hackathon.logo %}
<img class="d-block mx-auto my-4" max-width="364" src="{{ hackathon.logo.url }}"/>
<img class="d-block mx-auto my-4 hackathon-logo" src="{{ hackathon.logo.url }}"/>
{% endif %}
<span class="d-block font-title-lg text-white font-weight-semibold" style="white-space: nowrap;">
<span class="d-block font-title-lg text-white">
{{ hackathon.start_date|date:"M j, Y" }} - {{ hackathon.end_date|date:"M j, Y" }}
</span>
</div>
Expand Down
Loading

0 comments on commit 5079620

Please sign in to comment.