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

gpg/jtbd-landings #8706

Merged
merged 54 commits into from
Apr 7, 2021
Merged
Show file tree
Hide file tree
Changes from 48 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
4198c97
cache functions
chibie Mar 24, 2021
905aaf2
more cache functions
chibie Mar 25, 2021
07f0d96
write views + urls
chibie Mar 25, 2021
9123d7a
remove 'jtbd' from urls
chibie Mar 25, 2021
83a3441
remove duplicate code
chibie Mar 25, 2021
e444028
refactor leaderboard query
chibie Mar 25, 2021
a1478db
refactor queries with values
chibie Mar 25, 2021
4582b13
refactor grants query with values
chibie Mar 25, 2021
abdfa2e
more fields to featured grant
chibie Mar 25, 2021
e3d1811
use single testimonial for jtbd/earn
chibie Mar 26, 2021
df2602e
Merge pull request #8693 from gitcoinco/gpg/jtbd-backend
octavioamu Mar 26, 2021
bfdc1ff
Merge remote-tracking branch 'origin' into gpg/jtbd-landings
gdixon Mar 26, 2021
a5c9d85
add current to hackathons query jsonstore
octavioamu Mar 26, 2021
66cd7db
fix grants query duplicating values
octavioamu Mar 26, 2021
b686358
use static template tag
chibie Mar 31, 2021
d8f6eb1
Merge branch 'gpg/jtbd-landings' of github.com:gitcoinco/web into gpg…
chibie Mar 31, 2021
c7f844d
gpg/jtbd-connect (#8704)
gdixon Apr 1, 2021
b771269
gpg/jtbd-earn (#8703)
chibie Apr 1, 2021
2ed912d
gpg/jtbd-learn (#8711)
gdixon Apr 1, 2021
817f5e9
gpg/jtbd-fund (#8709)
octavioamu Apr 1, 2021
0f8f0b8
Updates hackathon section in earn and drops to_date
gdixon Apr 1, 2021
bc27cd3
Drops duplicated css rule
gdixon Apr 1, 2021
fb1b840
add flexbox helpers class
octavioamu Apr 1, 2021
170e5b6
Tidies up landings and extracts css
gdixon Apr 1, 2021
39d3a11
fix layout from landing
octavioamu Apr 1, 2021
4b5fba4
Fixes padding and accordions
gdixon Apr 1, 2021
0ba8946
fix earn ctas
octavioamu Apr 1, 2021
20235ba
Updates fonts and add page titles/descriptions
gdixon Apr 1, 2021
36eca54
remove css on html tags
octavioamu Apr 1, 2021
a7652bf
Merge branch 'gpg/jtbd-landings' of github.com:gitcoinco/web into gpg…
octavioamu Apr 1, 2021
a1b15cf
fix layout on earn grants
octavioamu Apr 1, 2021
17cb3c0
fix layout earn grants
octavioamu Apr 1, 2021
92b582c
Corrects section padding
gdixon Apr 1, 2021
c9ab503
fix cache failing login
octavioamu Apr 1, 2021
23ef78b
Reduces cta btn widths
gdixon Apr 1, 2021
0f86273
remove cache :(
octavioamu Apr 1, 2021
45d9255
Tidies up bounties and cta sections
gdixon Apr 2, 2021
79c75ac
Changes line-heights and colors, and fixes bounty section on earn
gdixon Apr 2, 2021
348007c
Allows each testimonial to be seeded from the cached data (allowing f…
gdixon Apr 2, 2021
dda1374
Makes the testimonials consistently spaced and uses handle for alt text
gdixon Apr 2, 2021
a1d6488
Fixes alignments and makes the spacing more consistent between pages
gdixon Apr 2, 2021
4f1b57f
Updates fund accordion svgs and adjusts spacing for mobile views
gdixon Apr 2, 2021
777d98c
fix hackathons on connect
octavioamu Apr 5, 2021
4e81ebf
fix hackathons on landings
octavioamu Apr 5, 2021
9ffd3a7
fix hackathon img
octavioamu Apr 5, 2021
9628662
add placeholder to grants on fund
octavioamu Apr 5, 2021
5aa8d7f
earn default grant img
octavioamu Apr 5, 2021
2e245a3
fix earn grant data
octavioamu Apr 5, 2021
fe0b4cd
Merge branch 'master' into gpg/jtbd-landings
octavioamu Apr 6, 2021
86d6d58
Fixes line heights, fonts and buttons
gdixon Apr 6, 2021
9b2adf2
move scripts to their own file and add it to cron
octavioamu Apr 6, 2021
4354182
remove unused imports
chibie Apr 6, 2021
6735db2
DRY card data
gdixon Apr 7, 2021
3d9ab17
DRY template definition
gdixon Apr 7, 2021
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
3 changes: 2 additions & 1 deletion app/app/db.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import random

from django.conf import settings

import random

class PrimaryDBRouter:
def db_for_read(self, model, **hints):
Expand Down
4 changes: 4 additions & 0 deletions app/app/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,10 @@
re_path(r'^homeold/?$', retail.views.index_old, name='homeold'),
re_path(r'^home/?$', retail.views.index, name='home'),
re_path(r'^landing/?$', retail.views.index, name='landing'),
re_path(r'^earn/?$', retail.views.jtbd_earn, name='jtbd_earn'),
re_path(r'^learn/?$', retail.views.jtbd_learn, name='jtbd_learn'),
re_path(r'^connect/?$', retail.views.jtbd_connect, name='jtbd_connect'),
re_path(r'^fund/?$', retail.views.jtbd_fund, name='jtbd_fund'),
re_path(r'^about/?', retail.views.about, name='about'),
re_path(r'^mission/?', retail.views.mission, name='mission'),
re_path(r'^jobs/?', retail.views.jobs, name='jobs'),
Expand Down
Binary file added app/assets/v2/images/jtbd/alexmasmej.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/jtbd/arya.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/jtbd/devinwalsh.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/jtbd/earn-bounties.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/assets/v2/images/jtbd/earn-grants.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/assets/v2/images/jtbd/earn-hackathons.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/jtbd/epns.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/jtbd/jtbd-10.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/assets/v2/images/jtbd/jtbd-11.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/assets/v2/images/jtbd/jtbd-12.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/assets/v2/images/jtbd/jtbd-4.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/assets/v2/images/jtbd/jtbd-5.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/assets/v2/images/jtbd/jtbd-6.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/assets/v2/images/jtbd/jtbd-7.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/assets/v2/images/jtbd/jtbd-8.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/assets/v2/images/jtbd/jtbd-9.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/jtbd/learn-kernel-core.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/jtbd/learn-kernel-iii.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/jtbd/ljxie.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/jtbd/sebnem.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/jtbd/simonapop.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/jtbd/swivel-finance.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/jtbd/valmack.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/jtbd/valsonay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions app/assets/v2/scss/gc-mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,33 @@
}
}

// define line-height (n: *em)
@mixin line-height($heights...) {
@each $i in $heights {
.line-height-#{nth($i, 1)} {
line-height: #{nth($i, 2)}em;
}
}
}

// define line-clamp (number of lines)
@mixin line-clamp($minClamp, $maxClamp) {
@for $i from $minClamp through $maxClamp {
.line-clamp-#{$i} {
display: -webkit-box;
-webkit-line-clamp: #{$i};
-webkit-box-orient: vertical;
text-overflow: ellipsis;
overflow: hidden;
}
}
}

// define gap for use with flex
@mixin gap($minGap, $maxGap) {
@for $i from $minGap through $maxGap {
.gap-#{$i} {
gap: #{$i}em;
}
}
}
123 changes: 120 additions & 3 deletions app/assets/v2/scss/gc-utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
// .border-left-[1-5]
@include border('left', 1, 5);

// .border-bottom-[1-5]
@include border('bottom', 1, 5);

// .border-right-[1-5]
@include border('right', 1, 5);

// .border-[grey, primary, secondary, danger, info, dark, light]
@include border-colors(
'grey' lightgray,
Expand All @@ -18,7 +24,53 @@
'light' $light
);

// Hover effects
// .line-height-[1-5]
@include line-height(
1 1,
2 1.4,
3 1.8,
4 2.2,
5 2.5
);

// .line-height-md-[1-5]
@media (min-width: 768px) {
@include line-height(
'md-1' 1,
'md-2' 1.4,
'md-3' 1.8,
'md-4' 2.2,
'md-5' 2.5
);
}

// .line-height-lg-[1-5]
@media (min-width: 992px) {
@include line-height(
'lg-1' 1,
'lg-2' 1.4,
'lg-3' 1.8,
'lg-4' 2.2,
'lg-5' 2.5
);
}

// .line-clamp-[1-5]
@include line-clamp(1, 5);

// .gap-[1-5]
@include gap(1, 5);

// lighter grey styling
.bg-lighter {
background-color: $gc-grey-100;
}

.text-lighter {
color: $gc-grey-100;
}

// hover effects
.hover-underline:not(:disabled):not(.disabled):not(.active):hover {
text-decoration: underline!important
}
Expand All @@ -27,7 +79,7 @@
color: $gc-violet-500!important;
}

// Invalid form state
// invalid form state
.invalid {

input.invalid, input:invalid, .form__checkbox input:invalid + .form__label::before,
Expand All @@ -48,11 +100,76 @@
}
}

// Helpers to fix top and bottom positions
// helpers to fix top and bottom positions
.bottom-0 {
bottom: 0px;
}

.top-0 {
top: 0px;
}

// background-image helpers
.bg-img-cover {
background-repeat: no-repeat;
background-size: cover;
}

.bg-img-contain {
background-repeat: no-repeat;
background-size: contain;
}

// flex rules (columns at break-points)
.flex-basis-auto {
flex-basis: auto;
}
.flex-basis-25 {
flex-basis: 25%;
}
.flex-basis-33 {
flex-basis: 33%;
}
.flex-basis-50 {
flex-basis: 50%;
}
.flex-basis-100 {
flex-basis: 100%;
}

@media (min-width: 768px) {
.flex-basis-md-auto {
flex-basis: auto;
}
.flex-basis-md-25 {
flex-basis: 25%;
}
.flex-basis-md-33 {
flex-basis: 33%;
}
.flex-basis-md-50 {
flex-basis: 50%;
}
.flex-basis-md-100 {
flex-basis: 100%;
}
}

@media (min-width: 992px) {
.flex-basis-lg-auto {
flex-basis: auto;
}
.flex-basis-lg-25 {
flex-basis: 25%;
}
.flex-basis-lg-33 {
flex-basis: 33%;
}
.flex-basis-lg-50 {
flex-basis: 50%;
}
.flex-basis-lg-100 {
flex-basis: 100%;
}
}

6 changes: 6 additions & 0 deletions app/assets/v2/scss/gc-variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ $gc-purple: #0D0764;
$gc-grey: #EEEEEE;

// GC colors and shades
$gc-gray-500: #0E0333;
$gc-gray-400: #757087;
$gc-gray-300: #A7A2B6;
$gc-gray-200: #C4C1CF;
$gc-grey-100: #F8F8F8;

$gc-violet-500: #5932C4;
$gc-violet-400: #6F3FF5;
$gc-violet-300: #8C65F7;
Expand Down
19 changes: 14 additions & 5 deletions app/assets/v2/scss/gitcoin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -487,16 +487,14 @@
}

.gc-accordion {
margin-left: -38px;


&:after {
content: "";
display: block;
border-bottom: 1px solid #eee;
position: relative;
left: 26px;
width: calc(100% - 16px);
width: calc(100% - 26px);
}

.accordion {
Expand All @@ -506,6 +504,12 @@
border-left: 4px solid transparent;
}

&.gc-accordion-border {
.accordion, .accordion-panel {
border-left: 4px solid #DDDDDD
}
}

.accordion-title {
display: inline-block;
width: calc(100% - 50px);
Expand All @@ -519,8 +523,13 @@
}
}

.accordion-panel {
.accordion-panel {
padding-left: 28px;

p {
margin-bottom: 0;
padding-bottom: 1rem;
}
}

.accordion:after {
Expand All @@ -535,7 +544,7 @@
content: "";
display: block;
min-height: 4px;
width: calc(100% + 10px);
width: 100%;
position: relative;
top: -22px;
border-top: 1px solid #eee;
Expand Down
15 changes: 15 additions & 0 deletions app/assets/v2/scss/jtbd.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// JTBD specific stylings
.img-accordion .collapsing {
transition: none !important;
}

.accordion:not(.collapsed) {
pointer-events: none;
}

@media screen and (min-width: 768px) {
.btn-cta {
width: 13rem;
max-width: 100%;
}
}
3 changes: 2 additions & 1 deletion app/dashboard/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ def get_poap_earliest_owned_token_timestamp(network, address):
poap_contract = get_poap_contract(network)
from_block = 7844308
if network == "ropsten":
from_block = 5592255
from_block = 5592255
# Filter the contract events by owner address
transfer_filter = poap_contract.events.Transfer.createFilter(argument_filters={'to': address}, fromBlock=from_block, toBlock='latest')
log_entries = transfer_filter.get_all_entries()
Expand Down Expand Up @@ -1194,6 +1194,7 @@ def set_hackathon_event(type, event):
{
'absolute_url': sponsor.absolute_url,
'avatar_url': sponsor.avatar_url,
'handle': sponsor.handle,
}
for sponsor in event.sponsor_profiles.all()
],
Expand Down
3 changes: 2 additions & 1 deletion app/grants/management/commands/update_contributor_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"""

from django.core.management.base import BaseCommand

import requests
from dashboard.utils import get_web3
from grants.models import Subscription
Expand Down Expand Up @@ -89,4 +90,4 @@ def handle(self, *args, **options):
except Exception as e:
print(f'Skipping: Error when fetching from_address for transaction hash {subscription.split_tx_id}')
print(e)
print("\n")
print("\n")
1 change: 0 additions & 1 deletion app/grants/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,4 +390,3 @@ def save_contribution(self, contrib_id):
from grants.models import Contribution
contrib = Contribution.objects.get(pk=contrib_id)
contrib.save()

Loading