1
1

add base template and make login and logout page extend it

This commit is contained in:
2020-03-04 18:27:29 +01:00
parent 619b2b3aad
commit a0c543babf
3 changed files with 56 additions and 55 deletions

View File

@@ -0,0 +1,21 @@
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{% block title %}FinancePlanner{% endblock %}</title>
<link rel="stylesheet" type="text/css" href="{% static 'financeplanner/style.css' %}">
</head>
<body>
<h1>FloPlanner</h1>
<p>
{% block navi %}{% endblock %}
</p>
{% block content %}{% endblock %}
</body>
</html>

View File

@@ -1,25 +1,15 @@
{% load static %}
{% extends "financeplanner/base.html" %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>FloPlanner - Logout</title>
<link rel="stylesheet" type="text/css" href="{% static 'financeplanner/style.css' %}">
</head>
<body>
{% block title %}FinancePlanner - Logout{% endblock %}
<h1>FloPlanner</h1>
<p>
{% block navi %}
<a href="{% url 'admin:index' %}" class="mini-link">Admin Panel</a>
-
<a href="{% url 'login' %}" class="mini-link">Login</a>
</p>
{% endblock %}
<div class="main-container text-centering">
{% block content %}
<div class="main-container text-centering">
<p>You have been logged out.</p>
</div>
</body>
</html>
</div>
{% endblock %}

View File

@@ -1,21 +1,13 @@
{% load static %}
{% extends "financeplanner/base.html" %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>FloPlanner - Login</title>
<link rel="stylesheet" type="text/css" href="{% static 'financeplanner/style.css' %}">
</head>
<body>
{% block title %}FinancePlanner - Login{% endblock %}
<h1>FloPlanner</h1>
<p>
{% block navi %}
<a href="{% url 'admin:index' %}" class="mini-link">Admin Panel</a>
</p>
{% endblock %}
<div class="main-container flex-col-centering">
{% block content %}
<div class="main-container flex-col-centering">
<form id="login-form" method="post" class="login-form" action="{% url 'login' %}">
{% csrf_token %}
<p class="login-line">
@@ -34,7 +26,5 @@
</p>
<input type="hidden" name="next" value="{{ next }}"/>
</form>
</div>
</body>
</html>
</div>
{% endblock %}