Commits

Alex Mayfield committed b51caca

New profile template, other template touchups and breakouts.

Comments (0)

Files changed (6)

templates/_menu.html

+<ul class="pills">
+	<li><a href="/">Home</a></li>
+	<li><a href="/rules">Rules</a></li>
+	<li><a href="/private-ctf">Private CTF</a></li>
+	<li><a href="/servers">Server Passwords</a></li>
+</ul>

templates/_user.html

+{% if user.is_authenticated %}
+<h5>Welcome, {{ user }}</h5>
+<ul>
+	<li><a href="{% url profiles.views.profile %}">Profile</a></li>
+	<li><a href="{% url auth_password_change %}">Change Password</a></li>
+	<li><a href="{% url auth_logout %}">Logout</a></li>
+</ul>
+{% else %}
+<h5>Welcome</h5>
+<ul>
+	<li><a href="{% url auth_login %}">Login</a></li>
+</ul>
+{% endif %}

templates/base.html

 <!DOCTYPE html>
 <html>
 	<head>
+		<title>{% block title %}{% endblock %} - FUNCRUSHER+</title>
 		<link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.3.0/bootstrap.min.css">
 	</head>
 	<body>
 			<div class="content">
 				<div class="page-header">
 					<img src="http://www.funcrusherplus.net/funcrusherplus.png" />
-					{% if user.is_authenticated %}
-					Welcome {{ user }}.
-					<a href="{% url profiles.views.profile %}">Profile</a>
-					<a href="{% url auth_password_change %}">Change Password</a>
-					<a href="{% url auth_logout %}">Logout</a>
-					{% else %}
-					<a href="{% url auth_login %}">Login</a>
-					{% endif %}
 				</div>
-				<ul class="pills">
-					<li><a href="#">Home</a>
-					<li><a href="#">Rules</a>
-					<li><a href="#">Private CTF</a>
-					<li><a href="#">Passwords</a>
-				</ul>
 				<div class="row">
-					<div class="span16">
+					<div class="span12">
+						{% include "_menu.html" %}
 						{% block content %}{% endblock %}
 					</div>
+					<div class="span4">
+						<div class="well">
+							{% include "_user.html" %}
+						</div>
+					</div>
 				</div>
 			</div>
 		</div>

templates/flatpages/default.html

 {% extends "base.html" %}
 
+{% block title %}{{ flatpage.title }}{% endblock %}
+
 {% block content %}
 {{ flatpage.content }}
 {% endblock %}

templates/profiles/profile.html

+{% extends "base.html" %}
+
+{% block content %}
+{% if flash %}
+<div class="alert-message success">
+	<p>{{ flash }}</p>
+</div>
+{% endif %}
+<form method="post">{% csrf_token %}
+	<fieldset>
+		<legend>Profile</legend>
+		{% for field in form %}
+		<div class="clearfix{% if field.errors %} error{% endif %}">
+			{{ field.label_tag }}
+			<div class="input">
+				{{ field }}
+				<span class="help-inline">{% for error in field.errors %}{{ error }}{% endfor %}</span>
+				<span class="help-block">{{ field.help_text }}</span>
+			</div>
+		</div>
+		{% endfor %}
+		<div class="actions">
+			<input type="submit" class="btn primary" value="Submit" />
+			<button type="reset" class="btn">Reset</button>
+		</div>
+	</fieldset>
+</form>
+{% endblock %}

templates/servers/passwords.html

 {% extends "base.html" %}
 
+{% block title %}Passwords{% endblock %}
+
 {% block content %}
 {% for server in servers %}
 <div class="row">
-	<div class="span7">
+	<div class="span5">
 		{{ server.name }}
 	</div>
-	<div class="span4">
+	<div class="span3">
 		<code>{{ server.address }}</code>
 	</div>
-	<div class="span5">
+	<div class="span4">
 		{% if server.status %}
 		<a href="#" class="btn disabled small {{ server.status_class }}">{{ server.status }}</a>
 		{% if server.status = "Allowed" %}