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

stable -> master #5360

Merged
merged 30 commits into from
Oct 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b8443a7
clr: update iterations to 200
thelostone-mc Oct 21, 2019
be425f0
fix tags
octavioamu Oct 21, 2019
79dafb5
fixes active bounties link
owocki Oct 21, 2019
febbbad
Merge branch 'stable' of github.com:gitcoinco/web into stable
owocki Oct 21, 2019
39dea16
only save earning for tip if it was actually sent :)
owocki Oct 21, 2019
c0f2071
make fix + adds quests/grants to sitemap
owocki Oct 21, 2019
a2392aa
fixes negative quest point awards + also caches the sitemap so its no…
owocki Oct 21, 2019
c1aa1c9
a few cached sitemap fixes
owocki Oct 21, 2019
7ef08ee
adds grants created to grants tab
owocki Oct 21, 2019
47b9d9e
testing a new analytics tool: orbi
owocki Oct 21, 2019
da012ba
fixes kudos on /results page
owocki Oct 21, 2019
5f4b9dc
fix for https://github.com/gitcoinco/web/issues/5298#issuecomment-544…
owocki Oct 21, 2019
18cdae5
Merge pull request #5345 from thelostone-mc/g
thelostone-mc Oct 22, 2019
80a8ad0
fixes the issue where buttons dont show up after quests
owocki Oct 22, 2019
6112048
https://github.com/gitcoinco/web/issues/5350
owocki Oct 22, 2019
4d1c9ad
fixes score screen
owocki Oct 22, 2019
5a91be2
adds round 2 to quests
owocki Oct 22, 2019
92bb722
a small bugfix + a frontend thing
owocki Oct 22, 2019
6cef949
one final thing
owocki Oct 22, 2019
250e0bc
quest leaderboard is now more consise
owocki Oct 22, 2019
e1bffdf
https://sentry.io/organizations/gitcoin/issues/1239374124/events/cb2f…
owocki Oct 22, 2019
5a32b5b
fixes point history
owocki Oct 22, 2019
acea572
reviews tab fix
owocki Oct 22, 2019
eda16db
quest points fix
owocki Oct 22, 2019
b218d77
allows true kudos lookup on quests/new
owocki Oct 23, 2019
fdac118
a bunch of new quest scenes
owocki Oct 23, 2019
4d8d8c6
background override
owocki Oct 23, 2019
cfc1c88
one last thing
owocki Oct 23, 2019
3077360
one more tiny change
owocki Oct 23, 2019
8cf0c8c
resolve conflicts
thelostone-mc Oct 23, 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
34 changes: 33 additions & 1 deletion app/app/sitemaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
from django.urls import reverse

from dashboard.models import Bounty, Profile
from grants.models import Grant
from kudos.models import Token
from quests.models import Quest


class StaticViewSitemap(sitemaps.Sitemap):
Expand All @@ -15,7 +17,7 @@ def items(self):
return [
'dashboard', 'new_funding', 'tip', 'terms', 'privacy', 'cookie', 'prirp', 'apitos', 'about', 'index',
'help', 'whitepaper', 'whitepaper_access', '_leaderboard', 'faucet', 'mission', 'slack', 'labs', 'results',
'activity', 'kudos_main', 'kudos_marketplace', 'grants', 'funder_bounties'
'activity', 'kudos_main', 'kudos_marketplace', 'grants', 'funder_bounties', 'quests_index', 'newquest'
]

def location(self, item):
Expand Down Expand Up @@ -100,11 +102,41 @@ def location(self, item):
return f'/results/{item}'


class GrantsSitemap(Sitemap):
changefreq = "weekly"
priority = 0.6

def items(self):
return Grant.objects.filter(hidden=False).cache()

def lastmod(self, obj):
return obj.modified_on

def location(self, item):
return item.url


class QuestsSitemap(Sitemap):
changefreq = "weekly"
priority = 0.6

def items(self):
return Quest.objects.filter(visible=True).cache()

def lastmod(self, obj):
return obj.modified_on

def location(self, item):
return item.url


sitemaps = {
'landers': ContributorLandingPageSitemap,
'results': ResultsSitemap,
'static': StaticViewSitemap,
'issues': IssueSitemap,
'orgs': ProfileSitemap,
'kudos': KudosSitemap,
'quests': QuestsSitemap,
'grants': GrantsSitemap,
}
3 changes: 2 additions & 1 deletion app/app/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import linkshortener.views
import marketing.views
import marketing.webhookviews
import perftools.views
import quests.views
import retail.emails
import retail.views
Expand Down Expand Up @@ -542,7 +543,7 @@

# for robots
url(r'^robots.txt/?', retail.views.robotstxt, name='robotstxt'),
url(r'^sitemap\.xml$', sitemap, {'sitemaps': sitemaps}, name='django.contrib.sitemaps.views.sitemap'),
url(r'^sitemap.xml/?', perftools.views.sitemap, name='django.contrib.sitemaps.views.sitemap'),
# Interests
path('interest/modal', dashboard.views.get_interest_modal, name='get_interest_modal'),
path('actions/bounty/<int:bounty_id>/interest/new/', dashboard.views.new_interest, name='express-interest'),
Expand Down
127 changes: 124 additions & 3 deletions app/assets/v2/css/quests.css
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
}
.demo {
max-width: 100%;
cursor: pointer;
border: 1px solid #0b57a6;
}
.difficulty_tab{
display: block;
Expand Down Expand Up @@ -278,7 +278,7 @@ body.quest_battle div,
body.quest_battle p{
color: white;
}
._hj_poll_container{
#_hj_poll_container{
display: none;
}
.character .info p{
Expand Down Expand Up @@ -443,6 +443,10 @@ body.quest_battle p{
#cta_button a{
margin-top: 10%;
text-transform: uppercase;
line-height: 66px;
}
a.button{
line-height: 66px;
}
body.stage_1 #cta_button{
margin-top: 25%;
Expand Down Expand Up @@ -481,6 +485,9 @@ body.stage_4 #header{
body.stage_4 #cta_button{
margin-top: 25%;
}
body.winner #cta_button{
margin-top: 5%;
}
body.stage_4 #desc{
margin-top: -2%;
}
Expand Down Expand Up @@ -602,6 +609,22 @@ body.back5.quest_battle{
background: url('/static/v2/images/quests/backs/back5.png') repeat;
background-size: 160%;
}
body.back6.quest_battle{
background: url('/static/v2/images/quests/backs/back6.jpg') repeat;
background-size: 110%;
}
body.back7.quest_battle{
background: url('/static/v2/images/quests/backs/back7.png') repeat;
background-size: 110%;
}
body.back8.quest_battle{
background: url('/static/v2/images/quests/backs/back8.png') repeat;
background-size: 120%;
}
body.back9.quest_battle{
background: url('/static/v2/images/quests/backs/back9.png') repeat;
background-size: 120%;
}
#background {
position: absolute;
z-index: -999999;
Expand Down Expand Up @@ -736,6 +759,36 @@ body.back5.quest_battle{
#desc li:hover {
background-color: #0c0861;
}
body.back1 #desc li:hover {
background-color: #102945;
}
body.back2 #desc li:hover {
background-color: #102945;
}
body.back3 #desc li:hover {
background-color: #f6126e;
}
body.back4 #desc li:hover {
background-color: #17366d;
}
body.back5 #desc li:hover {
background-color: #101061;
}
body.back6 #desc li:hover {
background-color: #8ab2b2;
}
body.back7 #desc li:hover {
background-color: #0e151e;
}
body.back8 #desc li:hover {
background-color: #0a061e;
}
body.back9 #desc li:hover {
background-color: #1c1135;
}
body.stage_1 #desc li:hover {
background-color: #102945;
}
#desc li.selected{
background-color: #3E00FF !important;
}
Expand Down Expand Up @@ -770,11 +823,45 @@ body.back3 .br,
body.back3 .tl{
background-color:rgb(239,72,134, 0.6);
}
body.back6 #header,
body.back6 #desc,
body.back6 .br,
body.back6 .tl{
background-color:rgb(129, 166, 178, 0.6);
}
body.back7 #header,
body.back7 #desc,
body.back7 .br,
body.back7 .tl{
background-color:rgb(14, 21, 30, 0.6);
}
body.back8 #header,
body.back8 #desc,
body.back8 .br,
body.back8 .tl{
background-color:rgb(10, 6, 30, 0.6);
}
body.back9 #header,
body.back9 #desc,
body.back9 .br,
body.back9 .tl{
background-color:rgb(28, 17, 53, 0.6);
}

@media (max-width: 1110px) {
body.quest_battle{
background-size: 250% !important;
}
body.back6.quest_battle,
body.back7.quest_battle,
body.back8.quest_battle,
body.back9.quest_battle{
background-size: 120% !important;
}
#cta_button a, a.button{
line-height: 46px;
padding: 10px;
}
.refer_friend .top_img{
margin-top: -230px;
}
Expand All @@ -799,7 +886,11 @@ body.back3 .tl{
margin-top: 20%;
}
#enemy img{
max-width: 130px;
margin-top: 40px;
margin-right: 50px;
max-height: 150px;
max-width: 150px;
border-radius: 30px;
}
#enemy.character .info{
left: 0px;
Expand Down Expand Up @@ -827,6 +918,9 @@ body.back3 .tl{
body.stage_4 #cta_button{
margin-top: 38%;
}
body.winner #cta_button{
margin-top: 10%;
}
body.stage_4 #desc{
margin-top: 5%;
font-size: 12px;
Expand All @@ -850,6 +944,12 @@ body.back3 .tl{
body.quest_battle{
background-size: 250% !important;
}
body.back6.quest_battle,
body.back7.quest_battle,
body.back8.quest_battle,
body.back9.quest_battle{
background-size: 120% !important;
}
#leaderboard_hero{
background-size: 130%;
}
Expand All @@ -862,6 +962,12 @@ body.back3 .tl{
body.quest_battle{
background-size: 250% !important;
}
body.back6.quest_battle,
body.back7.quest_battle,
body.back8.quest_battle,
body.back9.quest_battle{
background-size: 140% !important;
}
#leaderboard_hero .inner_row {
width: 32%;
height: 350px;
Expand Down Expand Up @@ -906,6 +1012,12 @@ body.back3 .tl{
body.quest_battle{
background-size: 350% !important;
}
body.back6.quest_battle,
body.back7.quest_battle,
body.back8.quest_battle,
body.back9.quest_battle{
background-size: 200% !important;
}
.hide_on_mobile{
display: none;
}
Expand Down Expand Up @@ -974,6 +1086,15 @@ body.back3 .tl{
body.quest_battle{
background-size: 400% !important;
}
body.back6.quest_battle,
body.back7.quest_battle,
body.back8.quest_battle,
body.back9.quest_battle{
background-size: 250% !important;
}
.quest-card{
margin-left: 20% !important;
}
.back_gradient {
background-size: 100% 600px !important;
}
Expand Down
Binary file added app/assets/v2/images/quests/backs/back6.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/quests/backs/back7.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/quests/backs/back8.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/quests/backs/back9.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/quests/hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/assets/v2/js/kudos-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ $('document').ready(function() {
$('body').on('click', '.kudos_autocomplete', function(e) {
var search_term = $(this).text();

select2Search($('.kudos-search'), search_term);
select2Search($(this).parents('.kudos-module').find('.kudos-search'), search_term);
e.preventDefault();
});

Expand Down
9 changes: 6 additions & 3 deletions app/assets/v2/js/pages/quests.helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,13 @@ $(document).ready(function() {
});

$('#cta_button a').on('click', function(e) {
e.preventDefault();
$('#cta_button').addClass('hidden');
advance_to_state(document.quest_state + 1);
var target = $(this).attr('href');

if (target == '#') {
e.preventDefault();
$('#cta_button').addClass('hidden');
advance_to_state(document.quest_state + 1);
}
});

$('.music_toggle').on('click', function(e) {
Expand Down
15 changes: 15 additions & 0 deletions app/assets/v2/js/pages/quests.index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ $(document).ready(function() {
$('.demo').attr('src', src);
});
});

var random_attn_effect = function(ele) {
if (ele.data('effect')) {
return;
Expand Down Expand Up @@ -53,6 +54,20 @@ $(document).ready(function() {
});
});

$('#leaderboard_tabs a').click(function(e) {
e.preventDefault();
var target = $(this).data('href');

$('.leaderboard_tab').addClass('hidden');
$('.nav-link').removeClass('active');
$(this).addClass('active');
$('.' + target).removeClass('hidden');

$('html,body').animate({
scrollTop: '+=1px'
});
});

$('.quest-card.available').click(function(e) {
e.preventDefault();
document.location.href = $(this).find('a').attr('href');
Expand Down
11 changes: 10 additions & 1 deletion app/assets/v2/js/pages/quests.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,20 @@ $(document).ready(function() {

ele.remove();
});
$(document).on('click', '.remove', function(e) {
e.preventDefault();
$(this).parents('.form-group').find('.hidden').removeClass('hidden');
$(this).parents('.form-group').find('.default_kudos').remove();
$(this).parents('.form-group').find('input[name=enemy]').remove();
$(this).parents('.form-group').find('[name=enemy2]').attr('name', 'enemy');
$(this).parents('.form-group').find('[name=reward2]').attr('name', 'reward');
$(this).remove();
});


$(document).on('click', '.close_question', function(e) {
e.preventDefault();
if ($(this).parents('div.question').length <= 1) {
if ($('div.question').length <= 1) {
alert('you cannot have 0 questsions');
return;
}
Expand Down
Loading