From 36b420f846e05d78407149aca4f5c5bbb89adc6e Mon Sep 17 00:00:00 2001 From: Miguel Angel G Date: Mon, 27 Jul 2020 02:19:03 -0500 Subject: [PATCH] Changes on hackathon onboarding --- .../migrations/0130_auto_20200727_0628.py | 19 +++ app/dashboard/models.py | 1 + .../dashboard/hackathon/onboard.html | 152 +++++++++++------- 3 files changed, 110 insertions(+), 62 deletions(-) create mode 100644 app/dashboard/migrations/0130_auto_20200727_0628.py diff --git a/app/dashboard/migrations/0130_auto_20200727_0628.py b/app/dashboard/migrations/0130_auto_20200727_0628.py new file mode 100644 index 00000000000..7604daacf47 --- /dev/null +++ b/app/dashboard/migrations/0130_auto_20200727_0628.py @@ -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), + ), + ] diff --git a/app/dashboard/models.py b/app/dashboard/models.py index 228ee4c295d..cebb0ef1e98 100644 --- a/app/dashboard/models.py +++ b/app/dashboard/models.py @@ -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'}) diff --git a/app/dashboard/templates/dashboard/hackathon/onboard.html b/app/dashboard/templates/dashboard/hackathon/onboard.html index 447f6d653ce..fc2e37271ca 100644 --- a/app/dashboard/templates/dashboard/hackathon/onboard.html +++ b/app/dashboard/templates/dashboard/hackathon/onboard.html @@ -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 %} @@ -82,6 +87,7 @@ top: -55px; max-height: 160px; } + .overflow-show { overflow: visible !important; } @@ -174,13 +180,13 @@

-
-
+
+
{% if sponsors %}

Key Sponsors

{% if sponsors.sponsors_gold %} -
+
{% for sponsor in sponsors.sponsors_gold %} {{sponsor.name}} @@ -239,75 +245,80 @@

{{sponsor.name}}

-
+
-

How does the Hackathon work?

+ +
-
-
- bounty explorer -
-
- {% trans "Check out the Prizes" %} + -
-
- express interest -
-
- {% trans " Join the Hackathons Chat Workspace" %} - {% blocktrans %} -

- Chat with other hackers, ask sponsors and the Gitcoin team questions, find or create a team, and communicate real-time. Click here to join the party!. -

- {% endblocktrans %} -
-
-
-
- bounty explorer -
-
- {% trans "Start Work via Gitcoin" %} - {% blocktrans %} -

- 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. -

- {% endblocktrans %} -
-
-
-
- express interest +
+
+ express interest +
+
+ {% trans " Join the Hackathons Chat Workspace" %} + {% blocktrans %} +

+ Chat with other hackers, ask sponsors and the Gitcoin team questions, find or create a team, and communicate real-time. Click here to join the party!. +

+ {% endblocktrans %} +
-
- {% trans "BUIDL!" %} - {% blocktrans %} -

- Build your cool ideas and make your vision come true with your team! -

- {% endblocktrans %} +
+
+ bounty explorer +
+
+ {% trans "Start Work via Gitcoin" %} + {% blocktrans %} +

+ 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. +

+ {% endblocktrans %} +
-
-
-
- bounty explorer +
+
+ express interest +
+
+ {% trans "BUIDL!" %} + {% blocktrans %} +

+ Build your cool ideas and make your vision come true with your team! +

+ {% endblocktrans %} +
-
- {% trans "Submit Work via Gitcoin" %} - {% blocktrans %} -

- When your project is completed, submit your work by clicking the “Submit Work” button on the prize page/ -

- {% endblocktrans %} +
+
+ bounty explorer +
+
+ {% trans "Submit Work via Gitcoin" %} + {% blocktrans %} +

+ When your project is completed, submit your work by clicking the “Submit Work” button on the prize page/ +

+ {% endblocktrans %} +
@@ -510,6 +521,23 @@

{{ question.text }}

$(`#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') + + })