Skip to content

Commit

Permalink
Created CSS; started templating.
Browse files Browse the repository at this point in the history
  • Loading branch information
hbillings committed Oct 15, 2011
1 parent 2de94fc commit fb0c721
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 10 deletions.
60 changes: 60 additions & 0 deletions entries/static/main.css
@@ -0,0 +1,60 @@
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}

/* end reset */

body {
color: #ff0000;
}

header {
background-color: #C2E078;
display: block;
height: 150px;
}
2 changes: 1 addition & 1 deletion entries/views.py
@@ -1,6 +1,6 @@
from django.http import HttpResponse from django.http import HttpResponse
from django.template import Context, loader from django.template import Context, loader
from entries.models import Recipe from entries.models import Recipe, Ingredient
from django.shortcuts import render_to_response from django.shortcuts import render_to_response


def index(request): def index(request):
Expand Down
Binary file modified entries/views.pyc
Binary file not shown.
Binary file added logos.psd
Binary file not shown.
9 changes: 9 additions & 0 deletions settings.py
Expand Up @@ -82,12 +82,21 @@
os.path.join(PROJECT_PATH, 'templates'), os.path.join(PROJECT_PATH, 'templates'),
) )


STATICFILES_DIRS = (
"/entries/static"
)

STATIC_URL = '/entries/static'

STATIC_ROOT = '/'

INSTALLED_APPS = ( INSTALLED_APPS = (
'django.contrib.auth', 'django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.contenttypes',
'django.contrib.sessions', 'django.contrib.sessions',
'django.contrib.sites', 'django.contrib.sites',
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles',
# Uncomment the next line to enable the admin: # Uncomment the next line to enable the admin:
'django.contrib.admin', 'django.contrib.admin',
# Uncomment the next line to enable admin documentation: # Uncomment the next line to enable admin documentation:
Expand Down
Binary file modified settings.pyc
Binary file not shown.
23 changes: 23 additions & 0 deletions templates/base.html
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>{% block page_name %}{% endblock %} | A Clever Recipe App</title>
<link rel="stylesheet" href="{{ STATIC_URL }}main.css" type="text/css">

{% block head_includes %}
{% endblock %}
</head>
<body>
<header>
<h1>Sugar and Spice and Everything Nice</h1>
</header>
<section id="content">
{% block content %}
{% endblock %}
</section>
<footer>

</footer>
</body>
</html>
22 changes: 13 additions & 9 deletions templates/index.html
@@ -1,9 +1,13 @@
{% if alpha %} {% extends "base.html" %}
<ul>
{% for recipe in alpha %} {% block content %}
<li>{{ recipe.title }}</li> {% if alpha %}
{% endfor %} <ul>
</ul> {% for recipe in alpha %}
{% else %} <li>{{ recipe.title }}</li>
<p>None available.</p> {% endfor %}
{% endif %} </ul>
{% else %}
<p>None available.</p>
{% endif %}
{% endblock %}

0 comments on commit fb0c721

Please sign in to comment.