Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Small fixes #82

Merged
merged 11 commits into from Dec 6, 2012
15 changes: 9 additions & 6 deletions gameon/base/static/base/css/home.css
Expand Up @@ -175,6 +175,7 @@ div[role=main] .big-picture .busta {
border-spacing: 20px;
margin-bottom: 12em;
height: 100%;
padding: 0 70px;
}
.participate article {
width: 50%;
Expand All @@ -199,7 +200,7 @@ div[role=main] .big-picture .busta {
border-spacing: 0;
position: relative;
padding: 40px;
background: rgba(00, 40, 58, 0.8);
background: #00283A;
border-radius: 16px 16px 0 0;
color: #FFF;
-moz-box-sizing: border-box;
Expand All @@ -218,9 +219,9 @@ div[role=main] .big-picture .busta {
margin: 0;
}
.participate article footer {
padding: 30px 40px;
padding: 44px 40px 30px 40px;
border-radius: 0 0 16px 16px;
background: #00283a;
background: #000a14 url('/static/base/img/css//homepage-footer_bg.gif') repeat-x top left;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double slash.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I did this already, but then you adjusted the opacity of the main section of the box, so I didn't bother committing the fix.

Are we now going back to solid colours? 'Cause I rather liked the effect of the background image showing through!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You had done the checker-box effect? Did that ever make it into master or did I accidentally clobber it?

Yeah - back to solid colours as part of the design review notes - I likes the transparency too I must say

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'd done the ridging dividers, but never committed them, because I pulled in the transparency change before pushing it out. So no, you didn't clobber it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's something at least - was your work CSS or background image based? If it's CSS (without the background image) based then, if it's possible would rather use that...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CSS based - no images necessary. I can throw it together again if you want.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that would be cool - if you checkout this branch and send me a pull request we can bundle it all in together!

position: absolute;
top: 100%;
left: 0;
Expand All @@ -230,11 +231,12 @@ div[role=main] .big-picture .busta {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.participate .submit_now footer {
padding-left: 100px;
.participate .submit_now footer p {
padding-left: 60px;
background-image: url('/static/base/img/css/clock.png');
background-repeat: no-repeat;
background-position: 30px 30px;
background-position: 0 0;
margin: 0;
}
/* so that the bottom section merges with the footer */
#home div[role=main] {
Expand Down Expand Up @@ -309,6 +311,7 @@ div[role=main] .big-picture .busta {
.participate .wrapper {
display: block;
margin-bottom: 0;
padding: 0;
}
.participate article {
width: auto;
Expand Down
8 changes: 8 additions & 0 deletions gameon/base/static/base/css/master.css
Expand Up @@ -77,12 +77,17 @@ div[role=main] .busta {
width: 70%;
margin-right: 5%;
}
#user_profile .main-col {
margin-right: 0;
margin-left: 5%;
}
.mini-col {
float: left;
width: 25%;
overflow: hidden;
}
#judges_list .mini-col::before,
#prize_list .mini-col::before,
#resource_list .mini-col::before,
#rules_page .mini-col::before {
content: "";
Expand All @@ -98,6 +103,9 @@ div[role=main] .busta {
#judges_list .mini-col::before {
background-image: url(/static/base/img/css/find-panel.png);
}
#prize_list .mini-col::before {
background-image: url(/static/base/img/css/prize-panel.png);
}
#resource_list .mini-col::before,
#rules_page .mini-col::before {
background-image: url(/static/base/img/css/docs-panel.png);
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gameon/base/static/base/img/css/prize-panel.png
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 gameon/events/templates/events/list.html
Expand Up @@ -32,7 +32,7 @@ <h2>We currently have no Game Jams planned</h2>
<h2 class="whimper">More about Game Jams</h2>
<ul class="no-style">
<li><a href="{{ url('static_site.faqs') }}#game-jams">What exactly is a Game Jam?</a></li>
<li><a href="https://webmaker.org/en-US/events/guides/game-jam/">Game Jam event guide</a></li>
<li><a href="https://webmaker.org/events/guides/game-jam/">Game Jam event guide</a></li>
<li><a href="https://donate.mozilla.org/page/event/create/">Organise your own Game Jam</a></li>
</ul>
</aside>
Expand Down
3 changes: 3 additions & 0 deletions gameon/settings/base.py
Expand Up @@ -31,6 +31,7 @@
INSTALLED_APPS = list(INSTALLED_APPS) + [
# Django admin
'django.contrib.admin',
'django.contrib.messages',
# Application base, containing global templates.
'%s.base' % PROJECT_MODULE,
# Static website base, containing global templates.
Expand Down Expand Up @@ -68,10 +69,12 @@

TEMPLATE_CONTEXT_PROCESSORS = list(TEMPLATE_CONTEXT_PROCESSORS) + [
'django_browserid.context_processors.browserid_form',
'django.contrib.messages.context_processors.messages',
'gameon.base.context_processors.app_stage',
]

MIDDLEWARE_CLASSES = list(MIDDLEWARE_CLASSES) + [
'django.contrib.messages.middleware.MessageMiddleware',
'gameon.users.middleware.ProfileMiddleware',
'gameon.submissions.middleware.ChallengeStatusMiddleware',
]
Expand Down
6 changes: 3 additions & 3 deletions gameon/static_site/templates/static_site/landing.html
Expand Up @@ -35,7 +35,7 @@ <h2 class="exclaim">Submit your game prototype by {{ request.challenge.end_date.
<li class="make whimper">Make web-based hackable games, games for learning or cross-platform games.</li>
<li class="invent whimper"><a href="{{ url('events.list') }}">Attend a Game Jam near you</a> or host your own! Our <a href="https://webmaker.org/events/guides/game-jam/">handy Event Kits</a> make it easy.</li>
<li class="win whimper">Win a trip to the <a href="http://www.gdconf.com/">Game Developers Conference</a> to meet industry pioneers.</li>
<li class="market whimper">Have your completed game featured in the <a href="http://www.mozilla.org/en-US/apps/">Firefox Marketplace</a> and published on <a href="http://www.chillingo.com/">Chilingo</a>.</li>
<li class="market whimper">Have your completed game featured in the <a href="http://www.mozilla.org/apps/">Firefox Marketplace</a> and published on <a href="http://www.chillingo.com/">Chilingo</a>.</li>
</ul>
<section class="gameon_partners cf">
<div class="col">
Expand All @@ -46,7 +46,7 @@ <h2 class="announce">Game On is generously supported by:</h2>
</ul>
</div>
<div class="col with">
<h2 class="announce">In partnerhip with:</h2>
<h2 class="announce">In partnership with:</h2>
<ul class="partners with">
<li class="lg"><a href="http://globalgamejam.org/"><img src="{{ static('base/img/partners/ggj.png') }}" alt="Global Game Jam" /></a></li>
<li class="lg"><a href="http://www.igda.org/"><img src="{{ static('base/img/partners/igda.png') }}" alt="IDGA" /></a></li>
Expand All @@ -73,7 +73,7 @@ <h2 class="exclaim">Submit Your Game</h2>
{% include '_signup_login.html' %}
{% endif %}
<footer>
Submissions open on {{ request.challenge.start_date.strftime('%B %e, %Y') }} and close {{ request.challenge.end_date.strftime('%B %e, %Y') }}.
<p>Submissions open on {{ request.challenge.start_date.strftime('%B %e, %Y') }} and close {{ request.challenge.end_date.strftime('%B %e, %Y') }}.</p>
</footer>
{% endif %}
</div>
Expand Down
2 changes: 1 addition & 1 deletion gameon/static_site/templates/static_site/legal.html
Expand Up @@ -27,7 +27,7 @@ <h2 class="whimper">How to Enter:</h2>
<p>Without limiting any other rights, the Sponsor has the right to, in the Sponsor's sole discretion, reject or remove from the Contest any Entry that, in the Sponsor's sole discretion, violates these Rules, any applicable Sponsor policy, any applicable laws, or is in any way harmful or objectionable. Sponsor also reserves the right to disqualify any entrant or Entry at the Sponsor's sole discretion. No correspondence shall be entered into.</p>
<p>By entering you agree to be bound by these Official Rules and all decisions of the Sponsor and judges, which are final and binding. The Contest is subject to all applicable laws.</p>
<h2 class="whimper">Privacy</h2>
<p>Entrants will be asked to provide their names and an email address so they can be contacted if selected a winner. Winners will be asked to also provide a mailing address so that we can send them their prizes and for general contact purposes related to the Contest. All Entries may be made public as well as the entrants’ names. Except as otherwise stated herein or as otherwise agreed by you and the Sponsor, all other personal information you provide in connection with the Contest will be used only for purposes relating to this Contest, and will not be communicated to third-parties without prior permission or as otherwise specified in <a href="http://www.mozilla.org/en-US/privacy-policy.html">our Privacy Policy located at http://www.mozilla.org/en-US/privacy-policy.html</a>.</p>
<p>Entrants will be asked to provide their names and an email address so they can be contacted if selected a winner. Winners will be asked to also provide a mailing address so that we can send them their prizes and for general contact purposes related to the Contest. All Entries may be made public as well as the entrants’ names. Except as otherwise stated herein or as otherwise agreed by you and the Sponsor, all other personal information you provide in connection with the Contest will be used only for purposes relating to this Contest, and will not be communicated to third-parties without prior permission or as otherwise specified in <a href="http://www.mozilla.org/privacy-policy.html">our Privacy Policy located at http://www.mozilla.org/privacy-policy.html</a>.</p>
<h2 class="whimper">Contest Period</h2>
<p>The Contest begins at 00:01 Greenwich Mean Time (GMT) on {{ request.challenge.start_date.strftime('%B %e, %Y') }} and ends at 23:59 GMT on {{ request.challenge.end_date.strftime('%B %e, %Y') }} (the “Contest Period”). It is immediately followed by the Judging Period, which runs through the 28th of February, 2013. The winners will be announced on or about the 4th of March 2013.</p>
<h2 class="whimper">Work Criteria</h2>
Expand Down
13 changes: 4 additions & 9 deletions gameon/static_site/templates/static_site/prizes.html
Expand Up @@ -11,6 +11,7 @@ <h1 class="busta shout">Prizes</h1>
</header>
<div class="busta">
<div class="cf">
<div class="main-col">
<h2 class="sub-head exclaim" id="grand-prize">Grand Prize</h2>
<div class="prize">
<h3 class="exclaim">Grand Champion</h3>
Expand All @@ -21,16 +22,10 @@ <h3 class="exclaim">Grand Champion</h3>
<li><span>Dinner with EA's award-winning game developer Michael John</span></li>
<li><span>A tour of Mozilla's headquarters in Mountain View and lunch with the Mozilla games team</span></li>
</ul></li>
<li><span>The chance to be featured in the <a href="{{ url('static_site.faqs') }}#firefox-marketplace">Firefox Marketplace</a></span></li>
<li><span>The opportunity to show your game to the awesome folks at <a href="http://www.chillingo.com/">Chillingo</a> for a chance to have it published on their network</span></li>
<li><span>Promotion of your game in Game On Gallery and across Mozilla networks</span></li>
<li><span>Nvidia GeForce GTX690</span></li>
<li><span>One year membership to top industry associations <a href="http://www.igda.org/">IGDA</a> and <a href="http://ukie.info/">UKIE</a><span></li>
<li><span>Special Edition Mozilla Swag. Leave room in your luggage. Trust us.<span></li>
</ul>
</div>
<h2 class="sub-head exclaim" id="category-prizes">Category Prizes</h2>
<div class="main-col">

<div class="prize">
<h3 class="exclaim">Best Hackable Game (Non Stop Hacking)</h3>
<p>Awarded to the games with the highest "hackability" score. Games that let their players remix mechanics, fork code or use assets from the web in order for them to create their very own version of an existing game.</p>
Expand All @@ -45,8 +40,8 @@ <h3 class="exclaim">Best Multi-Device Game (Mobileet)</h3>
</div>
</div>
<div class="mini-col meta">
<h3 class="whimper">All category prizes will receive:</h3>
<ul>
<h3 class="whimper">All prizes will receive:</h3>
<ul class="checks">
<li>Nvidia GeForce GTX670</li>
<li>The chance to have your game featured in the <a href="{{ url('static_site.faqs') }}#firefox-marketplace">Firefox Marketplace</a></li>
<li>The opportunity to show your game to the awesome folks at <a href="http://www.chillingo.com/">Chillingo</a> for a chance to have it published on their network</li>
Expand Down
2 changes: 1 addition & 1 deletion gameon/static_site/templates/static_site/resources.html
Expand Up @@ -39,7 +39,7 @@ <h2 class="exclaim">Firefox OS</h2>
<img src="{{ static('base/img/resources/firefoxos-02.png') }}" alt="" />
</div>
<p>Firefox OS enables the Open Web as a platform for mobile devices. We’re making innovation possible by driving the development of new Web standards. Using HTML5 and the new Mozilla-proposed standard APIs, developers everywhere will be able to create amazing experiences and apps. Check out the Firefox OS resources and start building a game that is no longer tied to platform-specific native APIs.</p>
<p><a href="http://www.mozilla.org/en-US/firefoxos/">Read more about Firefox OS</a></p>
<p><a href="http://www.mozilla.org/firefoxos/">Read more about Firefox OS</a></p>
</div>
<aside class="meta mini-col">
<h2 class="whimper">More resources</h2>
Expand Down
2 changes: 1 addition & 1 deletion gameon/submissions/templates/submissions/create.html
Expand Up @@ -94,7 +94,7 @@ <h1 class="busta shout">{% block view_title %}Submit Your Game{% endblock %}</h1
<p class="announce">Submit to Marketplace</p>
<article class="submit_row shout-box marketplace">
<h2 class="whimper">What is Marketplace and why is it awesome?</h2>
<p class="meta">The Firefox Marketplace gives users the opportunity to find, try and buy Apps and content that matters most to them. This means exciting, useful and high-quality Apps relevant to local markets across all categories that users can use to get the most out of their daily lives. Mozilla's global reach extends to hundreds of millions of Firefox users worldwide. Through the competition Mozilla can help developers get their App featured and into the hands of their target users around the world. <a href="http://www.mozilla.org/en-US/apps/" target="_blank">Learn more about Firefox Marketplace here</a>.</p>
<p class="meta">The Firefox Marketplace gives users the opportunity to find, try and buy Apps and content that matters most to them. This means exciting, useful and high-quality Apps relevant to local markets across all categories that users can use to get the most out of their daily lives. Mozilla's global reach extends to hundreds of millions of Firefox users worldwide. Through the competition Mozilla can help developers get their App featured and into the hands of their target users around the world. <a href="http://www.mozilla.org/apps/" target="_blank">Learn more about Firefox Marketplace here</a>.</p>
</article>
{% for error in form.to_market.errors %}<em>{{ error }}</em>{% endfor %}
{{ form.to_market }}
Expand Down
7 changes: 7 additions & 0 deletions gameon/submissions/templates/submissions/single.html
Expand Up @@ -12,6 +12,13 @@ <h1 class="busta shout">{{ entry.title }}</h1>
<div class="busta">
<div class="cf">
<div class="main-col">
{% if messages %}
<div class="shout-box">
{% for m in messages %}
{{ m|safe }}
{% endfor %}
</div>
{% endif %}
{% if entry.has_entry_feature %}
<div class="frame">{{ entry.get_entry_feature()|safe }}</div>
{% endif %}
Expand Down
16 changes: 11 additions & 5 deletions gameon/submissions/views.py
@@ -1,10 +1,13 @@
from django.shortcuts import render
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.conf import settings
from django.http import HttpResponseRedirect
from django.template.defaultfilters import slugify
from django.contrib.auth.decorators import login_required

from tower import ugettext as _

from gameon.base.views import action_unavailable_response
from gameon.base.utils import get_page, get_paginator
from gameon.submissions.models import Entry, Category
Expand All @@ -25,8 +28,9 @@ def create(request, template='submissions/create.html'):
if entry.to_market == True:
return HttpResponseRedirect(settings.MARKETPLACE_URL)
else:
return HttpResponseRedirect(reverse('submissions.entry_list',
kwargs={'category': 'all'}))
messages.success(request, _('<strong>Game submitted!</strong>'))
return HttpResponseRedirect(reverse('submissions.entry_single',
kwargs={'slug': entry.slug}))
else:
data = {
'categories': Category.objects.all(),
Expand All @@ -50,13 +54,15 @@ def edit_entry(request, slug, template='submissions/edit.html'):
form = EntryForm(request.POST, instance=entry)
if form.is_valid():
entry = form.save(commit=False)
entry.slug = slugify(entry.title)
new_slug = slugify(entry.title)
entry.slug = new_slug
form.save()
if entry.to_market == True:
return HttpResponseRedirect(settings.MARKETPLACE_URL)
else:
return HttpResponseRedirect(reverse('submissions.entry_list',
kwargs={'category': 'all'}))
messages.success(request, _('<strong>Game edited!</strong>'))
return HttpResponseRedirect(reverse('submissions.entry_single',
kwargs={'slug': new_slug}))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could just have used entry.slug here, as you did on (new) line 33.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might have been me being stupid but I thought that entry.slug was still returning the OLD value (before it changed) so in the case of an edit I assigned it to a value to use. I might have been wrong so will check again...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right - I didn't need it!

else:
data = {
'categories': Category.objects.all(),
Expand Down
2 changes: 1 addition & 1 deletion gameon/users/forms.py
Expand Up @@ -34,4 +34,4 @@ def __init__(self, *args, **kwargs):
self.fields['agreement'].label = jinja2.Markup(_(
u"I'm okay with Mozilla handling this info as you explain in your "
u"<a href='{url}' target='_blank'>privacy policy</a>.")).format(
url='http://www.mozilla.org/en-US/privacy-policy.html')
url='http://www.mozilla.org/privacy-policy.html')
12 changes: 11 additions & 1 deletion gameon/users/templates/users/profile.html
Expand Up @@ -21,6 +21,13 @@ <h1 class="busta shout">{{ profile.display_name }}</h1>
{% endif %}
</aside>
<div class="main-col">
{% if messages %}
<div class="shout-box">
{% for m in messages %}
{{ m|safe }}
{% endfor %}
</div>
{% endif %}
{% if entries %}
<ol class="entries cf">
{% for sub in entries %}
Expand All @@ -35,9 +42,12 @@ <h1 class="busta shout">{{ profile.display_name }}</h1>
</li>
{% endfor %}
</ol>
{% else %}
<h2 class="announce">No entries yet</h2>
<p>Feels like now is a great time to <a class="cta" href="{{ url('submissions.create_entry') }}">submit a game</a></p>
{% endif %}
</div>
</div>
</div>
</section>
{% endif %}
{% endblock %}
4 changes: 4 additions & 0 deletions gameon/users/views.py
@@ -1,8 +1,11 @@
from django.contrib import auth
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.shortcuts import redirect, render, get_object_or_404
from django.core.urlresolvers import reverse

from tower import ugettext as _

from gameon.users.forms import ProfileForm, ProfileCreateForm
from gameon.users.models import Profile
from gameon.submissions.models import Entry
Expand Down Expand Up @@ -43,6 +46,7 @@ def edit(request, template='users/profile_edit.html'):
profile.user = request.user
profile.save()
if mode == 'edit':
messages.success(request, _('<strong>Profile edited!</strong>'))
return redirect(profile)
else:
"""
Expand Down