Skip to content

Commit

Permalink
Implement redeem page, more bufficorn goodness.
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhnchris committed Jan 6, 2019
1 parent 3d440a7 commit 57de58c
Show file tree
Hide file tree
Showing 9 changed files with 248 additions and 86 deletions.
1 change: 1 addition & 0 deletions app/app/urls.py
Expand Up @@ -428,6 +428,7 @@
url(r'^impersonate/', include('impersonate.urls')),

# event:ethdenver2019
url(r'^ethdenver/redeem', event_ethdenver2019.views.ethdenver2019_redeem),
url(r'^ethdenver/', event_ethdenver2019.views.ethdenver2019),
# /event:ethdenver2019

Expand Down
165 changes: 97 additions & 68 deletions app/assets/v2/css/event_ethdenver2019/style.css
@@ -1,68 +1,97 @@
.ethdenver2019-nli-header {
background-image: url("{% static 'v2/images/event_ethdenver2019/background.png' %}");
background-size: 100% 100%;
}
.ethdenver2019-nli-kudos {
/* background-image: url("{% static 'v2/images/event_ethdenver2019/collect_kudos.png' %}");
background-repeat: no-repeat;
background-position: center;*/
height: 30em;
}
.ethdenver2019-texts-black {
color: #000000 !important;
}
.ethdenver2019-texts-headers {
font-size: 40px;
line-height: 36px;
color: #ffffff;
font-family: canada-type-gibson, sans-serif;
font-weight: bold;
text-align: center;
}
.ethdenver2019-nli-prizes {
background-color: #281840;
}
.container {
margin-left: 0.25em;
margin-right: 0.25em;
width: 100%;
max-width: 100% !important;
}
.ethdenver2019-col-center {
color: #ffffff;
margin-left: auto;
margin-right: auto;
text-align: center;
vertical-align: middle;
}
.ethdenver2019-col-prize-img {
height: 260px;
vertical-align: text-bottom;
text-align: center;
}
.ethdenver2019-button-getstarted {
width: 200px;
height: 63px;
border-radius: 5px;
background-color: #fc5090;
float: none;
margin: 0 auto;
display: inline-grid;
}
.ethdenver2019-button-getstarted-text {
font-size: 20px;
line-height: 36px;
color: #ffffff;
align-self: center;
font-family: canada-type-gibson, sans-serif;
text-align: center;
}
.peekicorn {
position: absolute;
top: -100px;
}
.bufficorn {
position: absolute;
left: 10em;
top: -13em;
}
/* name-spaces:
.<event>-<page>-<freetext>
.ethdenver2019-nli:
- not logged in
.ethdenver2019-texts:
- page
*/

.ethdenver2019-nli-kudos {
height: 30em;
}

.ethdenver2019-texts-black {
color: #000000 !important;
}

.ethdenver2019-texts-headers {
font-size: 40px;
line-height: 36px;
color: #ffffff;
font-family: canada-type-gibson, sans-serif;
font-weight: bold;
text-align: center;
}

.ethdenver2019-nli-prizes {
background-color: #281840;
}

.container {
margin-left: 0.25em;
margin-right: 0.25em;
width: 100%;
max-width: 100% !important;
}

.ethdenver2019-col-center {
color: #ffffff;
margin-left: auto;
margin-right: auto;
text-align: center;
vertical-align: middle;
}

.ethdenver2019-col-prize-img {
height: 260px;
vertical-align: text-bottom;
text-align: center;
}

.ethdenver2019-button-getstarted {
width: 200px;
height: 63px;
border-radius: 5px;
background-color: #fc5090;
float: none;
margin: 0 auto;
display: inline-grid;
}

.ethdenver2019-button-getstarted-text {
font-size: 20px;
line-height: 36px;
color: #ffffff;
align-self: center;
font-family: canada-type-gibson, sans-serif;
text-align: center;
}

.peekicorn {
position: absolute;
top: -100px;
}

.bufficorn {
position: absolute;
left: 10em;
top: -13em;
}

.received-equals-False {
-webkit-filter: grayscale(100%); /* Safari 6.0 - 9.0 */
filter: grayscale(100%);
}

.ethdenver2019-prog-header {
background-image: url("{% static 'v2/images/event_ethdenver2019/background.png' %}");
background-size: 100% 100%;
}

.circle-cutter {
border-radius: 50%;
}

.ethdenver2019-texts-white {
color: #ffffff;
}
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/event_ethdenver2019/admin.py
@@ -1,6 +1,7 @@
from django.contrib import admin
from .models import Event_ETHDenver2019_Customizing_Kudos


class ETHDenver2019_CustomizingAdmin(admin.ModelAdmin):
ordering = ['-id']

Expand Down
1 change: 1 addition & 0 deletions app/event_ethdenver2019/models.py
@@ -1,6 +1,7 @@
from django.db import models
from economy.models import SuperModel


# Create your models here.
class Event_ETHDenver2019_Customizing_Kudos(SuperModel):
# kudos that is required
Expand Down
18 changes: 7 additions & 11 deletions app/event_ethdenver2019/templates/ethdenver2019/kudosprogress.html
Expand Up @@ -19,14 +19,10 @@
{% include "ethdenver2019/base.html" %}
{% block style %}
<style type="text/css">
.received-equals-False {
-webkit-filter: grayscale(100%); /* Safari 6.0 - 9.0 */
filter: grayscale(100%);
}
.ethdenver2019-prog-header {
background-image: url("{% static 'v2/images/event_ethdenver2019/background.png' %}");
background-size: 100% 100%;
}
.ethdenver2019-prog-header {
background-image: url("{% static 'v2/images/event_ethdenver2019/background.png' %}");
background-size: 100% 100%;
}
</style>
{% endblock %}
{% block content %}
Expand All @@ -48,9 +44,9 @@
</div>
<div class="row mt-5 mb-5">
<div class="col-12">
<img src="{% avatar_url profile %}">
<img src="{% avatar_url profile %}" width="100px" height="100px" class="circle-cutter">
</div>
<div class="col-12">
<div class="col-12 ethdenver2019-texts-white">
{{ profile.handle }}
</div>
</div>
Expand All @@ -71,7 +67,7 @@
{% for kudos in kudos_rows %}
<div class="col-3 ">
<div class="row"><div class="col-12"><img src="{% static kudos.kudos.image %}" width="200px" height="200px" class="mb-2 received-equals-{{ kudos.received }}"></div></div>
<div class="row"><div class="col-12">{{ kudos.kudos.name }}</div></div>
<div class="row"><div class="col-12">{{ kudos.kudos.humanized_name }}</div></div>

</div>
{% endfor %}
Expand Down
94 changes: 94 additions & 0 deletions app/event_ethdenver2019/templates/ethdenver2019/redeem.html
@@ -0,0 +1,94 @@
{% comment %}
Copyright (C) 2018 Gitcoin Core

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see
<http://www.gnu.org/licenses/>.
{% endcomment %}
{% load static avatar_tags %}
{% include "ethdenver2019/base.html" %}
{% block style %}
<style type="text/css">
.ethdenver2019-prog-header {
background-image: url("{% static 'v2/images/event_ethdenver2019/background.png' %}");
background-size: 100% 100%;
}
.sadsmiley {
font-size: 140px;
transform: rotate(90deg);
}
</style>
{% endblock %}
{% block content %}
<div class="container">
<div class="row text-center">
<div class="ethdenver2019-prog-header col-12">
<div class="container">
<div class="row mt-4">
<div class="col-12">
<img src="{% static 'v2/images/event_ethdenver2019/ethdenver_logo.png' %}" class="rounded mx-auto d-block">
</div>
</div>
<div class="row mt-5 mb-5">
<div class="col-12">
<div class="ethdenver2019-texts-headers">
SET CHALLENGES
</div>
</div>
</div>
<div class="row mt-5 mb-5">
<div class="col-12">
<img src="{% avatar_url profile %}" width="100px" height="100px" class="circle-cutter">
</div>
<div class="col-12 ethdenver2019-texts-white">
{{ profile.handle }}
</div>
</div>
</div>
</div>
</div>
<div class="ethdenver2019-kudos mt-4 mb-4 align-middle text-center">
{% if success %}
<div class="row">
<div class="col-12">
<img src="{% static 'v2/images/event_ethdenver2019/bufficorn-joy.png' %}">
</div>
</div>
<div class="row">
<div class="col-12">
<div class="ethdenver2019-texts-headers ethdenver2019-texts-black mb-2 mt-2">
Horray!
</div>
<div class="ethdenver2019-texts-black">
You completed the ETHDenver2019 challenge!
</div>
<div>
Go to the front desk and show them that you received this kudos:
</div>
</div>
</div>
{% else %}
<div class="row">
<div class="col-12 sadsmiley">
:-(
</div>
</div>
<div class="row mt-5">
<div class="col-12">
You did not collect all challenge kudos yet. Try again later.
</div>
</div>
{% endif %}
</div>
</div>
{% endblock %}

0 comments on commit 57de58c

Please sign in to comment.