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

Changes on hackathon onboarding #7149

Merged
merged 2 commits into from
Jul 27, 2020
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
19 changes: 19 additions & 0 deletions app/dashboard/migrations/0130_auto_20200727_0628.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 2.2.4 on 2020-07-27 06:28

import datetime
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('dashboard', '0129_tribessubscription'),
]

operations = [
migrations.AddField(
model_name='hackathonevent',
name='border_color',
field=models.CharField(blank=True, help_text='hexcode for the border, default to none', max_length=255, null=True),
),
]
1 change: 1 addition & 0 deletions app/dashboard/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4696,6 +4696,7 @@ class HackathonEvent(SuperModel):
banner = models.ImageField(null=True, blank=True)
background_color = models.CharField(max_length=255, null=True, blank=True, help_text='hexcode for the banner, default to white')
text_color = models.CharField(max_length=255, null=True, blank=True, help_text='hexcode for the text, default to black')
border_color = models.CharField(max_length=255, null=True, blank=True, help_text='hexcode for the border, default to none')
identifier = models.CharField(max_length=255, default='', help_text='used for custom styling for the banner')
sponsors = models.ManyToManyField(Sponsor, through='HackathonSponsor')
sponsor_profiles = models.ManyToManyField('dashboard.Profile', blank=True, limit_choices_to={'data__type': 'Organization'})
Expand Down
152 changes: 90 additions & 62 deletions app/dashboard/templates/dashboard/hackathon/onboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
position: relative;
background: {% firstof hackathon.background_color or 'white' %};
color: {% firstof hackathon.text_color or 'black' %};
{% if hackathon.border_color %}
border-left: {% firstof hackathon.border_color or 'black' %} 2px solid;
border-bottom: {% firstof hackathon.border_color or 'black' %} 2px solid;
border-right: {% firstof hackathon.border_color or 'black' %} 2px solid;
{% endif %}
{% if hackathon.banner %}
background: url('{{MEDIA_URL}}{{hackathon.banner}}') 0 / cover;
{% endif %}
Expand Down Expand Up @@ -82,6 +87,7 @@
top: -55px;
max-height: 160px;
}

.overflow-show {
overflow: visible !important;
}
Expand Down Expand Up @@ -174,13 +180,13 @@ <h4 id="countdown" class="font-weight-bolder pt-4 mt-0">



<div id="sponsors" class="container bg-white my-4 pt-3 pb-4 rounded">
<div class="row mb-5">
<div id="sponsors" class="container bg-white my-4 {% if sponsors.sponsors_gold|length == 1 %}pb-1{% else %}pt-3 pb-4{% endif %} rounded">
<div class="row {% if sponsors.sponsors_gold|length == 1 %}mb-2{% else %}mb-5{% endif %}">
{% if sponsors %}
<div class="col-12 sponsors mb-3">
<p class="font-weight-bold px-5 mx-3 h4 text-left mb-3 uppercase">Key Sponsors</p>
{% if sponsors.sponsors_gold %}
<div class="d-flex flex-wrap mb-4">
<div class="d-flex flex-wrap {% if sponsors.sponsors_gold|length == 1 %}justify-content-center{% else %}mb-4{% endif %}">
{% for sponsor in sponsors.sponsors_gold %}
<a href="{% url 'profile' sponsor.handle %}" class="col-6 col-md-3 col-sm-3 sponsors-gold mt-3 mb-3 text-center">
<img src="{{sponsor.logo}}" height="114" alt="{{sponsor.name}}" class="{{sponsor.name}}">
Expand Down Expand Up @@ -239,75 +245,80 @@ <h4 class="font-header font-weight-bolder p-0 mt-2 mb-0">{{sponsor.name}}</h4>
</div>
</div>

<div class="container bg-white mt-4 rounded">
<div class="container bg-white mt-4 rounded pb-4">
<div class="row px-5">
<div class="col-12">
<h4 class="text-uppercase font-weight-bolder text-left">How does the Hackathon work?</h4>

<button class="btn btn-link text-black w-100 text-decoration-none" type="button" data-toggle="collapse" data-target="#collapse-info" aria-expanded="false" aria-controls="collapse-info">
<h4 class="text-uppercase font-weight-bolder text-left">How does the Hackathon work? <i id="collapse-icon" class="fas fa-angle-up float-right"></i></h4>
</button>
</div>
</div>
<div class="row px-5 my-5">
<div class="col-12 col-md-5">
<img src="{% static "v2/images/how-it-works/hackathon/pic1.jpg" %}" class="mw-100" alt="bounty explorer" />
</div>
<div class="col-12 col-md-6 d-flex flex-column justify-content-center pt-4 pt-md-0">
<b class="counter">{% trans "Check out the Prizes" %}</b>
<div class="collapse" id="collapse-info">
<div class="row px-5 my-5" >
<div class="col-12 col-md-5">
<img src="{% static "v2/images/how-it-works/hackathon/pic1.jpg" %}" class="mw-100" alt="bounty explorer" />
</div>
<div class="col-12 col-md-6 d-flex flex-column justify-content-center pt-4 pt-md-0">
<b class="counter">{% trans "Check out the Prizes" %}</b>

<p class="">
Visit the <a target="_blank" href="{% url 'hackathon' hackathon.slug %}">Prize Explorer</a> to check out the prizes posted by our hackathon sponsors. Click each prize to show important details, including the submission requirements, submission deadline, etc.
</p>
<p class="">
Visit the <a target="_blank" href="{% url 'hackathon' hackathon.slug %}">Prize Explorer</a> to check out the prizes posted by our hackathon sponsors. Click each prize to show important details, including the submission requirements, submission deadline, etc.
</p>

</div>
</div>
</div>
<div class="row px-5 my-5">
<div class="col-12 col-md-5">
<img src="{% static "v2/images/how-it-works/hackathon/pic2.jpg" %}" class="mw-100" alt="express interest" />
</div>
<div class="col-12 col-md-6 d-flex flex-column justify-content-center pt-4 pt-md-0">
<b class="counter">{% trans " Join the Hackathons Chat Workspace" %}</b>
{% blocktrans %}
<p class="">
Chat with other hackers, ask sponsors and the Gitcoin team questions, find or create a team, and communicate real-time. <a target="_blank" href="https://chat.gitcoin.co/hackathons">Click here to join the party!</a>.
</p>
{% endblocktrans %}
</div>
</div>
<div class="row px-5 my-5">
<div class="col-12 col-md-5">
<img src="{% static "v2/images/how-it-works/hackathon/pic3.jpg" %}" class="mw-100" alt="bounty explorer" />
</div>
<div class="col-12 col-md-6 d-flex flex-column justify-content-center pt-4 pt-md-0">
<b class="counter">{% trans "Start Work via Gitcoin" %}</b>
{% blocktrans %}
<p class="">
When your team is formed please have one of your teammates navigate to each prize page you plan to compete for and click the “Start Work” button.
</p>
{% endblocktrans %}
</div>
</div>
<div class="row px-5 my-5">
<div class="col-12 col-md-5">
<img src="{% static "v2/images/how-it-works/hackathon/pic4.jpg" %}" class="mw-100" alt="express interest" />
<div class="row px-5 my-5">
<div class="col-12 col-md-5">
<img src="{% static "v2/images/how-it-works/hackathon/pic2.jpg" %}" class="mw-100" alt="express interest" />
</div>
<div class="col-12 col-md-6 d-flex flex-column justify-content-center pt-4 pt-md-0">
<b class="counter">{% trans " Join the Hackathons Chat Workspace" %}</b>
{% blocktrans %}
<p class="">
Chat with other hackers, ask sponsors and the Gitcoin team questions, find or create a team, and communicate real-time. <a target="_blank" href="https://chat.gitcoin.co/hackathons">Click here to join the party!</a>.
</p>
{% endblocktrans %}
</div>
</div>
<div class="col-12 col-md-6 d-flex flex-column justify-content-center pt-4 pt-md-0">
<b class="counter">{% trans "BUIDL!" %}</b>
{% blocktrans %}
<p class="">
Build your cool ideas and make your vision come true with your team!
</p>
{% endblocktrans %}
<div class="row px-5 my-5">
<div class="col-12 col-md-5">
<img src="{% static "v2/images/how-it-works/hackathon/pic3.jpg" %}" class="mw-100" alt="bounty explorer" />
</div>
<div class="col-12 col-md-6 d-flex flex-column justify-content-center pt-4 pt-md-0">
<b class="counter">{% trans "Start Work via Gitcoin" %}</b>
{% blocktrans %}
<p class="">
When your team is formed please have one of your teammates navigate to each prize page you plan to compete for and click the “Start Work” button.
</p>
{% endblocktrans %}
</div>
</div>
</div>
<div class="row my-4 px-5 pb-5">
<div class="col-12 col-md-5">
<img src="{% static "v2/images/how-it-works/hackathon/pic5.jpg" %}" class="mw-100" alt="bounty explorer" />
<div class="row px-5 my-5">
<div class="col-12 col-md-5">
<img src="{% static "v2/images/how-it-works/hackathon/pic4.jpg" %}" class="mw-100" alt="express interest" />
</div>
<div class="col-12 col-md-6 d-flex flex-column justify-content-center pt-4 pt-md-0">
<b class="counter">{% trans "BUIDL!" %}</b>
{% blocktrans %}
<p class="">
Build your cool ideas and make your vision come true with your team!
</p>
{% endblocktrans %}
</div>
</div>
<div class="col-12 col-md-6 d-flex flex-column justify-content-center pt-4 pt-md-0">
<b class="counter">{% trans "Submit Work via Gitcoin" %}</b>
{% blocktrans %}
<p class="">
When your project is completed, submit your work by clicking the “Submit Work” button on the prize page/
</p>
{% endblocktrans %}
<div class="row my-4 px-5 pb-5">
<div class="col-12 col-md-5">
<img src="{% static "v2/images/how-it-works/hackathon/pic5.jpg" %}" class="mw-100" alt="bounty explorer" />
</div>
<div class="col-12 col-md-6 d-flex flex-column justify-content-center pt-4 pt-md-0">
<b class="counter">{% trans "Submit Work via Gitcoin" %}</b>
{% blocktrans %}
<p class="">
When your project is completed, submit your work by clicking the “Submit Work” button on the prize page/
</p>
{% endblocktrans %}
</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -510,6 +521,23 @@ <h4 class="font-header font-weight-bold pt-0 mb-5">{{ question.text }}</h4>
$(`#header-${fieldset.prev().data('question')}`).removeClass('d-none')
poll_manager.carousel('prev');
})

const collapseInfo = $('#collapse-info')

collapseInfo.on('show.bs.collapse', function () {
const collapseIcon = $('#collapse-icon')

collapseIcon.removeClass('fa-angle-up')
collapseIcon.addClass('fa-angle-down')
})

collapseInfo.on('hidden.bs.collapse', function () {
const collapseIcon = $('#collapse-icon')

collapseIcon.addClass('fa-angle-up')
collapseIcon.removeClass('fa-angle-down')

})
</script>
<script src="{% static 'v2/js/pages/hackathon-onboard.js' %}"></script>

Expand Down