Skip to content

Commit

Permalink
basic cosmetics
Browse files Browse the repository at this point in the history
Yes, Bootstrap is a cliche, but I don't trust myself to do better at
the moment. Also, kind of surprised that Django had let me get away
with TEMPLATE_DIRS being a string.
  • Loading branch information
zackmdavis committed Aug 24, 2014
1 parent 20c227f commit d131f07
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 2 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Django==1.6.6
south==0.8.4
django-bootstrap3==4.11.0
4 changes: 3 additions & 1 deletion settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
'django.contrib.messages',
'django.contrib.staticfiles',
'south',
'bootstrap3',
'core',
)

Expand Down Expand Up @@ -64,6 +65,7 @@

USE_TZ = True

TEMPLATE_DIRS = "templates"
TEMPLATE_DIRS = ("templates",)
STATICFILES_DIRS = ("static",)

STATIC_URL = '/static/'
10 changes: 10 additions & 0 deletions static/finetooth.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#brand {
font-family: 'Italianno', cursive;
font-size: 60px;
margin-right: 50px;
text-decoration: none;
}
#brand a:link { text-decoration: none; color: #000000; }
#brand a:visited { text-decoration: none; color: #000000; }
#brand a:hover { text-decoration: none; color: #0000DD; }
#brand a:active { text-decoration: none; color: #DD0000; }
22 changes: 21 additions & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
{% load bootstrap3 %}

<!DOCTYPE html>
<html lang="en">
<head>
{% bootstrap_css %}
<link href='http://fonts.googleapis.com/css?family=Italianno'
rel='stylesheet' type='text/css'>
<link href="/static/finetooth.css" rel="stylesheet">
<title>Finetooth &mdash; {% block subtitle %}{% endblock %}</title>
</head>
<body>
<h1><a href="/">Finetooth</a></h1>

<div class="navbar navbar-default navbar-static-top">
<div class="container">
<span id="brand" class="pull-left"><a href="/">Finetooth</a></span>
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#TODO">About</a></li>
<li><a href="#TODO">Log in</a></li>
<li><a href="#TODO">Sign up</a></li>
</ul>
</div>
</div>

<div class="container">
{% block content %}{% endblock %}
</div>
</body>

</html>
2 changes: 2 additions & 0 deletions templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@

{% block content %}
{% for post in posts %}
<div class="row">
<h3><a href="{{ post.pk }}/">Post #{{ post.pk }}</a></h3>
<div class="post" data-id="{{ post.pk }}">
{{ post.content }}
</div>
<a href="{{ post.pk }}/#comments">
<strong>{{ post.comment_set.count }} comments</strong>
</a>
</div>
{% endfor %}
{% endblock %}

0 comments on commit d131f07

Please sign in to comment.