Added navbar, login, signup, and forgot password
This commit is contained in:
26
website/templates/base.html
Normal file
26
website/templates/base.html
Normal file
@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}CurrencyProj{% endblock %}</title>
|
||||
{% load static %}
|
||||
|
||||
<ul class="navbar">
|
||||
<li class="navbar" ><a class="navbar" href="/">Home</a></li>
|
||||
<li class="navbar"><a class="navbar" href="/users/signup">Sign up</a></li>
|
||||
<li class="navbar"><a class="navbar" id="login" href="/users/login"style="float:right">Login</a></li>
|
||||
</ul>
|
||||
|
||||
<meta name="description" content="Start throwing out trash in an eco-friendly way!">
|
||||
<meta name="author" content="Yamozha">
|
||||
<link rel="stylesheet" href="{% static "home/css/style.css" %}">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="centered">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
16
website/templates/home.html
Normal file
16
website/templates/home.html
Normal file
@ -0,0 +1,16 @@
|
||||
<!-- templates/home.html -->
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Home{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if user.is_authenticated %}
|
||||
Hi {{ user.username }}!
|
||||
{{ currencyTotal }}
|
||||
<p><a href="{% url 'logout' %}">Log Out</a></p>
|
||||
<p><a href="{% url 'password_reset' %}">Reset Password</a></p>
|
||||
{% else %}
|
||||
<p>You are not logged in</p>
|
||||
<a href="{% url 'login' %}">Log In</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
12
website/templates/registration/login.html
Normal file
12
website/templates/registration/login.html
Normal file
@ -0,0 +1,12 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Login{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Log In</h2>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button type="submit">Log In</button>
|
||||
</form>
|
||||
{% endblock %}
|
@ -0,0 +1,8 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Password reset complete{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Password reset complete</h1>
|
||||
<p>Your new password has been set. You can log in now on the <a href="{% url 'login' %}">log in page</a>.</p>
|
||||
{% endblock %}
|
20
website/templates/registration/password_reset_confirm.html
Normal file
20
website/templates/registration/password_reset_confirm.html
Normal file
@ -0,0 +1,20 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Enter new password{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if validlink %}
|
||||
|
||||
<h1>Set a new password!</h1>
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" value="Change my password">
|
||||
</form>
|
||||
|
||||
{% else %}
|
||||
|
||||
<p>The password reset link was invalid, possibly because it has already been used. Please request a new password reset.</p>
|
||||
|
||||
{% endif %}
|
8
website/templates/registration/password_reset_done.html
Normal file
8
website/templates/registration/password_reset_done.html
Normal file
@ -0,0 +1,8 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Email Sent{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Check your inbox.</h1>
|
||||
<p>We've emailed you instructions for setting your password. You should receive the email shortly!</p>
|
||||
{% endblock %}
|
14
website/templates/registration/password_reset_form.html
Normal file
14
website/templates/registration/password_reset_form.html
Normal file
@ -0,0 +1,14 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Forgot Your Password?{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Forgot your password?</h1>
|
||||
<p>Enter your email address below, and we'll email instructions for setting a new one.</p>
|
||||
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" value="Send me instructions!">
|
||||
</form>
|
||||
{% endblock %}
|
13
website/templates/registration/signup.html
Normal file
13
website/templates/registration/signup.html
Normal file
@ -0,0 +1,13 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Sign Up{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Sign up</h2>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button type="submit">Sign Up</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user