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

Commit

Permalink
Very basic skeleton site, ready for design/content/apps. Pretty much …
Browse files Browse the repository at this point in the history
…everything
  • Loading branch information
rossbruniges committed Oct 3, 2012
1 parent ce7e578 commit 1ed759e
Show file tree
Hide file tree
Showing 16 changed files with 196 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,6 +2,7 @@ settings_local.py
settings/local.py
*/settings/local.py
*.py[co]
*.orig
*.sw[po]
.coverage
pip-log.txt
Expand Down
13 changes: 11 additions & 2 deletions README.md
@@ -1,6 +1,15 @@
playdoh
=======
===========
gameon 2012
===========
gameon was first run in 2010 by Mozilla Labs. In 2012 Mozilla hope to run the
challenge again, and this site will contain the details when we have them.


[gameon-2012]: https://gaming.mozillalabs.com/


Built using playdoh
-------------------
Mozilla's Playdoh is a web application template based on [Django][django].

Patches are welcome! Feel free to fork and contribute to this project on
Expand Down
46 changes: 46 additions & 0 deletions gameon/base/templates/base.html
@@ -0,0 +1,46 @@
<!DOCTYPE html{% block schema_org %}{% endblock %}>
<!--[if (lt IE 9)]><html class="no-js bad-ie" lang="{{ LANG }}" dir="{{ DIR }}"><![endif]-->
<!--[if (gt IE 8)|!(IE)]><!--><html class="no-js" lang="{{ LANG }}" dir="{{ DIR }}"><!--<![endif]-->
<head>
<title>{% block page_title %}{% endblock %} | Mozilla Gameon</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta name="viewport" content="initial-scale=1.0, width=device-width">
<link rel="stylesheet" href="//www.mozilla.org/tabzilla/media/css/tabzilla.css">
{% block site_css %}{% endblock %}
<!--[if lt IE 9]>
<script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link rel="icon" href="{{ MEDIA_URL }}img/favicon.ico" />
{% block social_meta %}{% endblock %}
</head>
<body id="{% block page_id %}{% endblock %}" class="{% block section_class %}{% endblock %}">
<script type="text/javascript">
document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/, '');
</script>
{% block header %}
<header>
<p>I am a header</p>
<nav>
<ul>
<li><a href="{{ url('static_site.home') }}">Home</a></li>
<li><a href="{{ url('static_site.rules') }}">Rules</a></li>
<li><a href="{{ url('static_site.prizes') }}">Prizes</a></li>
<li><a href="{{ url('static_site.resources') }}">Resources</a></li>
<li><a href="{{ url('static_site.previous') }}">Previous winners</a></li>
<li><a href="{{ url('static_site.categories') }}">Categories</a></li>
</ul>
</nav>
</header>
{% endblock %}
{% block content %}
{% endblock %}
{% block footer %}
<footer>
<p>I am a footer</p>
</footer>
{% endblock %}
{% block site_js %}{% endblock %}
{% block page_js %}{% endblock %}
<script src="//www.mozilla.org/tabzilla/media/js/tabzilla.js"></script>
</body>
</html>
7 changes: 4 additions & 3 deletions gameon/settings/base.py
@@ -1,6 +1,5 @@
# This is your project's main settings file that can be committed to your
# repo. If you need to override a setting locally, use settings_local.py

from funfactory.settings_base import *

# Name of the top-level module where you put all your apps.
Expand All @@ -13,10 +12,12 @@
ROOT_URLCONF = '%s.urls' % PROJECT_MODULE

INSTALLED_APPS = list(INSTALLED_APPS) + [
# Django admin
'django.contrib.admin',
# Application base, containing global templates.
'%s.base' % PROJECT_MODULE,
# Example code. Can (and should) be removed for actual projects.
'%s.examples' % PROJECT_MODULE,
# Static website base, containing global templates.
'%s.static_site' % PROJECT_MODULE,
]

LOCALE_PATHS = (
Expand Down
Empty file added gameon/static_site/__init__.py
Empty file.
Empty file added gameon/static_site/models.py
Empty file.
9 changes: 9 additions & 0 deletions gameon/static_site/templates/static_site/categories.html
@@ -0,0 +1,9 @@
{% extends 'base.html' %}

{% block page_title %}Categories{% endblock %}
{% block page_id %}category_list{% endblock %}
{% block section_class %}categories{% endblock %}

{% block content %}
<h1>CATEGORIES!! FEELS SO GOOD TO SPELL IT WITH AN S</h1>
{% endblock %}
9 changes: 9 additions & 0 deletions gameon/static_site/templates/static_site/judges.html
@@ -0,0 +1,9 @@
{% extends 'base.html' %}

{% block page_title %}Judges{% endblock %}
{% block page_id %}judges_list{% endblock %}
{% block section_class %}judges{% endblock %}

{% block content %}
<h1>THIS IS ALL THE JUDGES - LOOK AT THEIR FACES</h1>
{% endblock %}
9 changes: 9 additions & 0 deletions gameon/static_site/templates/static_site/landing.html
@@ -0,0 +1,9 @@
{% extends 'base.html' %}

{% block page_title %}Homepage{% endblock %}
{% block page_id %}home{% endblock %}
{% block section_class %}landing{% endblock %}

{% block content %}
<h1>HONEY, I'M HOME!!</h1>
{% endblock %}
9 changes: 9 additions & 0 deletions gameon/static_site/templates/static_site/previous.html
@@ -0,0 +1,9 @@
{% extends 'base.html' %}

{% block page_title %}Previous winners{% endblock %}
{% block page_id %}previous_winners{% endblock %}
{% block section_class %}previous{% endblock %}

{% block content %}
<h1>PREVIOUS, I HAVE PLENTY OF PREVIOUS</h1>
{% endblock %}
9 changes: 9 additions & 0 deletions gameon/static_site/templates/static_site/prizes.html
@@ -0,0 +1,9 @@
{% extends 'base.html' %}

{% block page_title %}Prizes{% endblock %}
{% block page_id %}prize_list{% endblock %}
{% block section_class %}prizes{% endblock %}

{% block content %}
<h1>I LIKE PRIZES!!!</h1>
{% endblock %}
9 changes: 9 additions & 0 deletions gameon/static_site/templates/static_site/resources.html
@@ -0,0 +1,9 @@
{% extends 'base.html' %}

{% block page_title %}Resources{% endblock %}
{% block page_id %}resource_list{% endblock %}
{% block section_class %}resources{% endblock %}

{% block content %}
<h1>LOOK AT ALL THESE RESOURCES!!</h1>
{% endblock %}
9 changes: 9 additions & 0 deletions gameon/static_site/templates/static_site/rules.html
@@ -0,0 +1,9 @@
{% extends 'base.html' %}

{% block page_title %}Rules{% endblock %}
{% block page_id %}rules_page{% endblock %}
{% block section_class %}rules{% endblock %}

{% block content %}
<h1>SHOW ME THE RULES!</h1>
{% endblock %}
14 changes: 14 additions & 0 deletions gameon/static_site/urls.py
@@ -0,0 +1,14 @@
from django.conf.urls.defaults import *

from . import views


urlpatterns = patterns('',
url(r'^$', views.home, name='static_site.home'),
url(r'^rules/$', views.rules, name='static_site.rules'),
url(r'^judges/$', views.judges, name='static_site.judges'),
url(r'^prizes/$', views.prizes, name='static_site.prizes'),
url(r'^resources/$', views.resources, name='static_site.resources'),
url(r'^previous/$', views.previous, name='static_site.previous'),
url(r'^categories/$', views.categories, name='static_site.categories'),
)
49 changes: 49 additions & 0 deletions gameon/static_site/views.py
@@ -0,0 +1,49 @@
from django.shortcuts import render

import commonware

log = commonware.log.getLogger('playdoh')


def home(request, template='static_site/landing.html'):
"""Main example view."""
data = {} # You'd add data here that you're sending to the template.
log.debug("I'm home!")
return render(request, template, data)


def rules(request, template='static_site/rules.html'):
"""Main example view."""
data = {} # You'd add data here that you're sending to the template.
log.debug("I'm reading the rules!")
return render(request, template, data)


def judges(request, template='static_site/judges.html'):
"""Main example view."""
data = {} # You'd add data here that you're sending to the template.
return render(request, template, data)


def prizes(request, template='static_site/prizes.html'):
"""Main example view."""
data = {} # You'd add data here that you're sending to the template.
return render(request, template, data)


def resources(request, template='static_site/resources.html'):
"""Main example view."""
data = {} # You'd add data here that you're sending to the template.
return render(request, template, data)


def previous(request, template='static_site/previous.html'):
"""Main example view."""
data = {} # You'd add data here that you're sending to the template.
return render(request, template, data)


def categories(request, template='static_site/categories.html'):
"""Main example view."""
data = {} # You'd add data here that you're sending to the template.
return render(request, template, data)
16 changes: 8 additions & 8 deletions gameon/urls.py
@@ -1,33 +1,33 @@
from django.conf import settings
from django.conf.urls.defaults import patterns, include
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.http import HttpResponse

from .examples import urls
from .static_site import urls

from funfactory.monkeypatches import patch
patch()

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
# Example:
(r'', include(urls)),

# Generate a robots.txt
(r'^robots\.txt$',
(r'^robots\.txt$',
lambda r: HttpResponse(
"User-agent: *\n%s: /" % 'Allow' if settings.ENGAGE_ROBOTS else 'Disallow' ,
"User-agent: *\n%s: /" % 'Allow' if settings.ENGAGE_ROBOTS else 'Disallow',
mimetype="text/plain"
)
)
),

# Uncomment the admin/doc line below to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
# (r'^admin/', include(admin.site.urls)),
(r'^admin/', include(admin.site.urls)),
)

## In DEBUG mode, serve media files through Django.
Expand Down

0 comments on commit 1ed759e

Please sign in to comment.