Fr3deric
6 years ago
11 changed files with 202 additions and 57 deletions
@ -0,0 +1,75 @@
@@ -0,0 +1,75 @@
|
||||
{% load static %} |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<link rel="stylesheet" href="{% static "bam/pure-min.css" %}"> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1"> |
||||
<style> |
||||
body { |
||||
padding: 0px; |
||||
text-align: center; |
||||
background-color: #fcfcfc; |
||||
} |
||||
|
||||
#content { |
||||
margin-top: 2em; |
||||
} |
||||
|
||||
#header { |
||||
background-image: url({% static "bam/header.svg" %}); |
||||
padding: 1rem; |
||||
box-shadow: 2px 2px 2px gray; |
||||
} |
||||
|
||||
#header h1 { |
||||
color: #ffffff; |
||||
font-weight: bold; |
||||
font-size: 3rem; |
||||
text-shadow: 0px 0px 20px black; |
||||
font-family: "Lucida Console", Monaco, monospace; |
||||
} |
||||
|
||||
#menu { |
||||
background-color: black; |
||||
box-shadow: 2px 2px 2px gray; |
||||
min-height: 2em; |
||||
} |
||||
|
||||
#menu a { |
||||
color: white; |
||||
font-weight: 600; |
||||
} |
||||
|
||||
#menu a:hover { |
||||
color: black; |
||||
} |
||||
|
||||
h1 { |
||||
font-weight: lighter; |
||||
text-shadow: 0px 0px 1px white; |
||||
} |
||||
</style> |
||||
{% block content-extra-head %} |
||||
{% endblock %} |
||||
</head> |
||||
<body> |
||||
<div id="header"> |
||||
<h1>Blinkenbunt Account Manager</h1> |
||||
</div> |
||||
|
||||
<div id="menu" class="pure-menu pure-menu-horizontal"> |
||||
{% if user.is_authenticated %} |
||||
<ul class="pure-menu-list"> |
||||
<li class="pure-menu-item"><a href="{% url "profile" %}" class="pure-menu-link">Profile</a></li> |
||||
<li class="pure-menu-item"><a href="{% url "password_change" %}" class="pure-menu-link">Password Change</a></li> |
||||
<li class="pure-menu-item"><a href="{% url "logout" %}" class="pure-menu-link">Logout</a></li> |
||||
</ul> |
||||
{% endif %} |
||||
</div> |
||||
|
||||
<div id="content"> |
||||
{% block content %} |
||||
{% endblock %} |
||||
</div> |
||||
</body> |
||||
</html> |
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
{% extends "bam/base.html" %} |
||||
{% block content %} |
||||
<p><h1>Logged out</h1>You have been logged out.</p> |
||||
<p><a href="{% url "login" %}">Log in again</a></p> |
||||
{% endblock %} |
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
{% extends "bam/base.html" %} |
||||
{% block content %} |
||||
<h1>Login</h1> |
||||
|
||||
{% if form.errors %} |
||||
<p>Your username and password didn't match. Please try again.</p> |
||||
{% endif %} |
||||
|
||||
{% if next %} |
||||
{% if user.is_authenticated %} |
||||
<p>Your account doesn't have access to this page. To proceed, |
||||
please login with an account that has access.</p> |
||||
{% else %} |
||||
<p>Please login to see this page.</p> |
||||
{% endif %} |
||||
{% endif %} |
||||
|
||||
<form method="post" action="{% url 'login' %}" class="pure-form pure-form-aligned"> |
||||
{% csrf_token %} |
||||
<fieldset> |
||||
<div class="pure-control-group"> |
||||
{{ form.username.label_tag }} |
||||
{{ form.username }} |
||||
</div> |
||||
<div class="pure-control-group"> |
||||
{{ form.password.label_tag }} |
||||
{{ form.password }} |
||||
</div> |
||||
<div class="pure-controls"> |
||||
<button type="submit" class="pure-button pure-button-primary">Login</button> |
||||
<a class="pure-button" href="{% url 'password_reset' %}">Lost password?</a> |
||||
</div> |
||||
<input type="hidden" name="next" value="{{ next }}"> |
||||
</fieldset> |
||||
</form> |
||||
{% endblock %} |
@ -0,0 +1,32 @@
@@ -0,0 +1,32 @@
|
||||
{% extends "bam/base.html" %} |
||||
{% block content-extra-head %} |
||||
<style> |
||||
.form-error { |
||||
color: #e9322d; |
||||
} |
||||
</style> |
||||
{% endblock %} |
||||
{% block content %} |
||||
<p><h1>Password Change</h1></p> |
||||
|
||||
<p> |
||||
<form method="post" action="{% url 'password_change' %}" class="pure-form pure-form-aligned"> |
||||
{% csrf_token %} |
||||
<fieldset> |
||||
{% for field in form %} |
||||
<div class="pure-control-group"> |
||||
{{ field.label_tag }} |
||||
{{ field }} |
||||
{% for error in field.errors %} |
||||
<span class="pure-form-message form-error">{{ error }}</span> |
||||
{% endfor %} |
||||
</div> |
||||
{% endfor %} |
||||
<div class="pure-controls"> |
||||
<button type="submit" class="pure-button pure-button-primary">Change password</button> |
||||
</div> |
||||
<input type="hidden" name="next" value="{{ next }}"> |
||||
</fieldset> |
||||
</form> |
||||
</p> |
||||
{% endblock %} |
@ -0,0 +1,4 @@
@@ -0,0 +1,4 @@
|
||||
{% extends "bam/base.html" %} |
||||
{% block content %} |
||||
<h1>Welcome, {{ user.username }}!</h1> |
||||
{% endblock %} |
@ -1,8 +0,0 @@
@@ -1,8 +0,0 @@
|
||||
<html> |
||||
<head> |
||||
</head> |
||||
<body> |
||||
{% block content %} |
||||
{% endblock %} |
||||
</body> |
||||
</html> |
@ -1,7 +0,0 @@
@@ -1,7 +0,0 @@
|
||||
{% extends "base.html" %} |
||||
|
||||
{% block content %} |
||||
|
||||
<a href="{% url 'password_change' %}">Change password</a> |
||||
|
||||
{% endblock %} |
@ -1,38 +0,0 @@
@@ -1,38 +0,0 @@
|
||||
{% extends "base.html" %} |
||||
|
||||
{% block content %} |
||||
|
||||
{% if form.errors %} |
||||
<p>Your username and password didn't match. Please try again.</p> |
||||
{% endif %} |
||||
|
||||
{% if next %} |
||||
{% if user.is_authenticated %} |
||||
<p>Your account doesn't have access to this page. To proceed, |
||||
please login with an account that has access.</p> |
||||
{% else %} |
||||
<p>Please login to see this page.</p> |
||||
{% endif %} |
||||
{% endif %} |
||||
|
||||
<form method="post" action="{% url 'login' %}"> |
||||
{% csrf_token %} |
||||
<table> |
||||
<tr> |
||||
<td>{{ form.username.label_tag }}</td> |
||||
<td>{{ form.username }}</td> |
||||
</tr> |
||||
<tr> |
||||
<td>{{ form.password.label_tag }}</td> |
||||
<td>{{ form.password }}</td> |
||||
</tr> |
||||
</table> |
||||
|
||||
<input type="submit" value="login"> |
||||
<input type="hidden" name="next" value="{{ next }}"> |
||||
</form> |
||||
|
||||
{# Assumes you setup the password_reset view in your URLconf #} |
||||
<p><a href="{% url 'password_reset' %}">Lost password?</a></p> |
||||
|
||||
{% endblock %} |
Loading…
Reference in new issue