Basic Bootstrapification

(imported from commit 54871fadcb5670a1ed3a68156b282bde1b50363f)
This commit is contained in:
Keegan McAllister 2012-08-28 15:56:46 -04:00
parent d8e29c3ffe
commit f88882f9a2
4 changed files with 47 additions and 6 deletions

View File

@ -1 +1,6 @@
<a href="/accounts/login/?next=/">login</a> | <a href="/accounts/register/">register</a>
{% extends "zephyr/base.html" %}
{% block nav %}
<li><a href="/accounts/login/?next=/">Log in</a></li>
<li><a href="/accounts/register/">Register</a></li>
{% endblock %}

View File

@ -5,19 +5,43 @@
<head>
<title>Zephyr</title>
<link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
/* Make room for the topbar */
padding-top: 50px;
}
/* From bootstrap-responsive.css */
.navbar .brand {
padding-right: 10px;
padding-left: 10px;
margin: 0 0 0 -5px;
}
</style>
</head>
<body>
<script src="/static/bootstrap/js/bootstrap.min.js"></script>
{% if not user.is_authenticated %}<a href="/accounts/login/?next=/">login</a> | <a
href="/accounts/register/">register</a>{% endif %}
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="#">Humbug</a>
<ul class="nav">
{% block nav %}
{% endblock %}
</ul>
</div>
</div>
</div>
{% if user.is_authenticated %}<a href="/accounts/logout/?next=/">logout</a>{% endif %}
<div class="container">
{% block content %}
{% endblock %}
</div>
</body>
</html>

View File

@ -1,3 +1,7 @@
{% extends "zephyr/base.html" %}
{% block content %}
{% if form.errors %}
<p>Your username and password didn't match. Please try again.</p>
{% endif %}
@ -15,6 +19,8 @@
</tr>
</table>
<input type="submit" value="login" />
<input type="submit" value="Log in" />
<input type="hidden" name="next" value="{{ next }}" />
</form>
{% endblock %}

View File

@ -1,3 +1,7 @@
{% extends "zephyr/base.html" %}
{% block content %}
<form method="post" action="{% url register %}">{% csrf_token %}
<table>
<tr>
@ -10,6 +14,8 @@
</tr>
</table>
<input type="submit" value="register" />
<input type="submit" value="Register" />
<input type="hidden" name="next" value="{{ next }}" />
</form>
{% endblock %}