Skip to content

stable -> master #5324

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

Merged
merged 46 commits into from
Oct 16, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
22640e1
profile: fix leaderboard link
thelostone-mc Oct 4, 2019
62f2a90
a lot of new background/musiccs
owocki Oct 6, 2019
d383d24
Merge branch 'stable' of github.com:gitcoinco/web into stable
owocki Oct 6, 2019
875658c
newsletter 2019-10-12
ryan-shea Oct 11, 2019
ed94ab4
fix newsletter typo
danlipert Oct 11, 2019
dcfd929
a few small updates to gitcoin quests; since ppl are starting to play…
owocki Oct 11, 2019
6e3b6b0
announce web3 world
owocki Oct 11, 2019
f6ea443
makes leaderboard on quests purdy-er before launch monday
owocki Oct 13, 2019
65c10f9
one small change
owocki Oct 13, 2019
4633bc6
point awards
owocki Oct 13, 2019
1174e7b
adds point history
owocki Oct 13, 2019
ae6df38
messed up link
owocki Oct 13, 2019
4987296
fix for https://sentry.io/organizations/gitcoin/issues/1126203495
owocki Oct 14, 2019
9c6cf93
fixes https://sentry.io/organizations/gitcoin/issues/1239290401/
owocki Oct 14, 2019
ee0fb60
fix for https://gitcoincore.slack.com/archives/CAXQ7PT60/p15708247520…
owocki Oct 14, 2019
ba1411b
kudos transactions were duplicated
owocki Oct 14, 2019
c4cbf61
fix for https://github.com/gitcoinco/web/issues/5280
owocki Oct 14, 2019
9a3a64c
top bar fixes
owocki Oct 14, 2019
4cf4029
adds hackathons to nav/products page
owocki Oct 14, 2019
718403e
leaderboard now has a podium on it; and a few other fixes
owocki Oct 14, 2019
74f5536
moves email preferred address thing to bottom bc ppl were complaining…
owocki Oct 14, 2019
011cd23
always scroll all the way to the right of the heatmap
owocki Oct 14, 2019
ca65379
refactor of quests such that individual quest types are now possible
owocki Oct 15, 2019
752a6c6
fizz buzz (just kidding; updating the products page
owocki Oct 15, 2019
e75f68d
fizz buzz (just kidding; updating the products page
owocki Oct 15, 2019
fee1bc3
rezied logos in nav
thelostone-mc Oct 15, 2019
7e72213
compressing svgs
thelostone-mc Oct 15, 2019
fd651cc
remove humanize
thelostone-mc Oct 15, 2019
88f4bc0
Merge pull request #5320 from gitcoinco/kevin/hackathosn-nav
thelostone-mc Oct 15, 2019
c07af81
fixes bad 'earnings' value
owocki Oct 15, 2019
5d951a1
migrates existing quiz to its on encapsulated style
owocki Oct 15, 2019
abf354d
factors away commonalities between helpers in example/base quests
owocki Oct 15, 2019
ef9dfea
enables new quest_type for gitcoin quests
owocki Oct 15, 2019
73690c3
make fix
owocki Oct 15, 2019
0b81f02
several performance fixes for gitcoin quests
owocki Oct 15, 2019
30d9581
2nd times a charm
owocki Oct 15, 2019
e2f58c4
small cleanup fix
owocki Oct 15, 2019
371eb11
fixes kudos uploader https://gitcoincore.slack.com/archives/CAXCZR8K0…
owocki Oct 15, 2019
e74085a
adds the ability for ANYONE to submit a quest
owocki Oct 16, 2019
9afa741
a few small profile fixes
owocki Oct 16, 2019
5325632
a few more profile usefulness tweaks
owocki Oct 16, 2019
b95fb5e
dont show star ratings for orgs
owocki Oct 16, 2019
ab710fa
index page fix
owocki Oct 16, 2019
5c2b0e8
fixes art URL
owocki Oct 16, 2019
7dc6d4c
fixes kudos for alex so he can mint/sync kudos without engineering
owocki Oct 16, 2019
fce8e6c
resolve conflicts + create migrations
thelostone-mc Oct 16, 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
Prev Previous commit
Next Next commit
a lot of new background/musiccs
  • Loading branch information
owocki committed Oct 6, 2019
commit 62f2a904527328a3c072bb78f0fe9dbe243bd1eb
Binary file added app/assets/v2/audio/boss-battle1.mid
Binary file not shown.
Binary file added app/assets/v2/audio/boss-battle2.mid
Binary file not shown.
Binary file added app/assets/v2/audio/boss-battle3.mid
Binary file not shown.
Binary file added app/assets/v2/audio/boss-battle4.mid
Binary file not shown.
64 changes: 56 additions & 8 deletions app/assets/v2/css/quests.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
margin-left: 0px;
padding-left: 0px;
}
#you,
.tags li{
background-color: #e7f0fa;
color: var(--gc-blue);
Expand Down Expand Up @@ -319,13 +320,13 @@ body.stage_3 #cta_button{
body.stage_3 #header{
margin-top: -5%;
}
body.stage_4{
body.back0.stage_4{
background: url('/static/v2/images/quests/backs/1.gif') repeat !important;
}
body.stage_4.question_number_1{
body.back0.stage_4.question_number_1{
background: url('/static/v2/images/quests/backs/2.gif') repeat !important;
}
body.stage_4.question_number_2{
body.back0.stage_4.question_number_2{
background: url('/static/v2/images/quests/backs/3.gif') repeat !important;
}

Expand Down Expand Up @@ -425,9 +426,32 @@ body.quest_battle .bottom_notification{
}
body.quest_battle{
font-family: 'Press Start 2P', cursive !important;
font-size: 0.7em;
}

body.back0.quest_battle{
background: url('/static/v2/images/quests/backs/0.gif') repeat;
background-size: 150%;
font-size: 0.7em;
}
body.back1.quest_battle{
background: url('/static/v2/images/quests/backs/back1.png') repeat;
background-size: 100%;
}
body.back2.quest_battle{
background: url('/static/v2/images/quests/backs/back2.png') repeat;
background-size: 170%;
}
body.back3.quest_battle{
background: url('/static/v2/images/quests/backs/back3.png') repeat;
background-size: 160%;
}
body.back4.quest_battle{
background: url('/static/v2/images/quests/backs/back4.png') repeat;
background-size: 160%;
}
body.back5.quest_battle{
background: url('/static/v2/images/quests/backs/back5.png') repeat;
background-size: 160%;
}
#background {
position: absolute;
Expand Down Expand Up @@ -460,7 +484,7 @@ body.quest_battle{
background-color: #0c0861;
}
#desc li.selected{
background-color: #3E00FF;
background-color: #3E00FF !important;
}

#breadcrumbs, #breadcrumbs a{
Expand All @@ -485,7 +509,7 @@ body.quest_battle{
margin-top: -230px;
}
.demo{
width: 400px;
max-width: 400px;
}
.tr{
position: absolute;
Expand Down Expand Up @@ -583,7 +607,7 @@ body.quest_battle{
font-size: 12px;
}
.demo{
width: 300px;
max-width: 300px;
}
.back_gradient {
background-size: 100% 400px !important;
Expand All @@ -606,11 +630,14 @@ body.quest_battle{
left: 80px;
}
.demo{
width: 500px;
max-width: 500px;
}
.row.indent_on_mobile{
margin-left: 5%;
}
.quests-hero .hero-p-mobile{
margin-left: 20px;
}
.button{
padding: 10px;
font-size: 5px;
Expand All @@ -633,4 +660,25 @@ body.quest_battle{
}

}
@media (max-width: 550px) {
.back_gradient {
background-size: 100% 600px !important;
}
.demo{
max-width: 90%;
margin-left: 5%;
}
#desc{
height: 100px;
}
#announce{
margin-top: 150px;
}
#announce img{
margin-bottom: 30px;
}
#leaderboard .inner_row {
height: 130px;
}
}

Binary file added app/assets/v2/images/quests/backs/back1.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/back2.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/back3.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/back4.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/back5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 10 additions & 7 deletions app/assets/v2/js/pages/quests.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var start_quiz = async function() {
var question_number = 0;
var should_continue = true;

start_music_midi('boss-battle');
start_music_midi(document.music);
await sleep(1500);

while (should_continue) {
Expand Down Expand Up @@ -150,15 +150,17 @@ var advance_to_state = async function(new_state) {
}
$('body').addClass('stage_' + new_state);

// force login
if (!document.contxt['github_handle']) {
document.location.href = document.location.href.replace('#', '') + '?login=1';
}


// -- individual transitions callbacks --

// 0 to 1
if (old_state == 0 && new_state == 1) {
await sleep(1000);
if (!document.contxt['github_handle']) {
document.location.href = document.location.href.replace('#', '') + '?login=1';
}
await $('#header').html('Quest Intro');
await $('#header').fadeIn();
await sleep(1000);
Expand Down Expand Up @@ -303,8 +305,8 @@ $(document).ready(function() {
// force the music to load
setTimeout(function() {
if (document.quest) {
start_music_midi('boss-battle');
pause_music_midi('boss-battle');
start_music_midi(document.music);
pause_music_midi(document.music);
}
}, 100);

Expand Down Expand Up @@ -380,7 +382,7 @@ $(document).ready(function() {
}
};

preload_backgrounds();
preload_assets();
}

$('#protagonist h3').html(trim_dots($('#protagonist h3').text(), 8));
Expand All @@ -389,6 +391,7 @@ $(document).ready(function() {
e.preventDefault();
$(this).toggleClass('selected');
});

if (document.quest) {
start_quest();
}
Expand Down
20 changes: 16 additions & 4 deletions app/quests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,26 @@ def enemy_img_name(self):
@property
def background(self):
backgrounds = [
'camping',
'back_city',
'city',
'night',
'back0',
'back1',
'back2',
'back3',
]
which_back = self.pk % len(backgrounds)
return backgrounds[which_back]

@property
def music(self):
musics = [
'boss-battle',
'boss-battle1',
'boss-battle2',
'boss-battle3',
'boss-battle4',
]
idx = self.pk % len(musics)
return musics[idx]

@property
def success_count(self):
return self.attempts.filter(success=True).count()
Expand Down
2 changes: 1 addition & 1 deletion app/quests/templates/quests/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<link rel="stylesheet" href="{% static "v2/css/quests.css" %}" />
{% include 'shared/cards_pic.html' %}
</head>
<body class="g-font-muli {{body_class}}">
<body class="g-font-muli {{body_class}} {{quest.background}}">
{% include 'shared/tag_manager_2.html' %}
{% include 'shared/top_nav.html' with class='d-md-flex' %}
<div class="container-fluid header dash">
Expand Down
11 changes: 7 additions & 4 deletions app/quests/templates/quests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
<img class="mr-1 demo" src="{% static "v2/images/quests/demo.gif" %}">
</div>
<div class="m-auto col-12 col-md-6 offset-lg-1 col-lg-5">
<h1 class="font-title-xl font-weight-semibold">A New Way to Explore the Web3 Ecosystem</h1>
<p class="my-4 pt-1 font-header">
<h1 class="font-title-xl font-weight-semibold hero-p-mobile">A New Way to Explore the Web3 Ecosystem</h1>
<p class="hero-p-mobile my-4 pt-1 font-header">
Gitcoin Quests is a fun, gamified way to learn about the web3 ecosystem, compete with your friends, earn rewards, and level up your decentralization-fu!
</p>
<a id=explore_quests class="btn btn-gc-blue" href="#available_quests">
<a id=explore_quests class="hero-p-mobile btn btn-gc-blue" href="#available_quests">
<img class="mr-1 white-icon" src="{% static "v2/images/products/quests-symbol.svg" %}">
Explore Quests
</a>
Expand Down Expand Up @@ -208,9 +208,12 @@ <h4><strong>The Devcon 5 Challenge is Live!</strong></h4>
<div class="row indent_on_mobile">
<div id=leaderboard>
{% for item in leaderboard %}
<div class="inner_row" style="{% cycle 'background-color: #fafafa;' '' %}";>
<div class="inner_row" style="{% if item.0 == github_handle %}background-color: #edf5fc;{%else%}{% cycle 'background-color: #fafafa;' '' %}{%endif%}";>
<div class="float-left mr-2 ml-2">{{ forloop.counter }}</div>
<div class="float-left mr-2 ml-2"><img src="/dynamic/avatar/{{item.0}}"><a style="margin-left: 10px; width: 120px;" href="/profile/{{item.0}}">@{{item.0}}</a></div>
{% if item.0 == github_handle %}
<div id=you style="margin-top: 10px;" class="float-left mr-4 ml-2">You</div>
{% endif %}
<div style="float: right; width: 500px; text-align: right;">
{% for btr in item.2%}
<img src="{{btr.0}}" title="{{btr.1}}" style="height: 50px; width: 50px; border-radius: 0px;">
Expand Down
2 changes: 2 additions & 0 deletions app/quests/templates/quests/quest.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ <h3>@{% if user and user.username %}{{ user.username }}{% else %}me{% endif %}</
'name': '{{quest.kudos_reward.ui_name}}',
'img': '{{quest.kudos_reward.preview_img_url}}'
};

document.music = '{{quest.music}}';
document.quest = {{quest_json|safe}};
document.attempts = {
'success_count': parseInt('{{success_count}}'),
Expand Down