Add a base template

This commit is contained in:
Bat
2018-05-09 18:53:12 +01:00
parent 743e6a23d4
commit ae60d5961c
7 changed files with 105 additions and 100 deletions
+12 -13
View File
@@ -1,13 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{{ user.display_name }}</title>
</head>
<body>
<h1>{{ user.display_name }}</h1>
<div>
{{ user.summary | safe }}
</div>
</body>
</html>
{% extends "base" %}
{% block title %}
{{ user.display_name }}
{% endblock title %}
{% block content %}
<h1>{{ user.display_name }}</h1>
<div>
{{ user.summary | safe }}
</div>
{% endblock content %}
+20 -21
View File
@@ -1,25 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>New account</title>
</head>
<body>
<h1>Create an account</h1>
<form method="post">
<label for="username">Username</label>
<input name="username">
{% extends "base" %}
<label for="email">Email</label>
<input name="email">
{% block title %}
New Account
{% endblock title %}
<label for="password">Password</label>
<input type="password" name="password">
{% block content %}
<h1>Create an account</h1>
<form method="post">
<label for="username">Username</label>
<input name="username">
<label for="password_confirmation">Password confirmation</label>
<input type="password" name="password_confirmation">
<label for="email">Email</label>
<input name="email">
<input type="submit" value="Create account"/>
</form>
</body>
</html>
<label for="password">Password</label>
<input type="password" name="password">
<label for="password_confirmation">Password confirmation</label>
<input type="password" name="password_confirmation">
<input type="submit" value="Create account"/>
</form>
{% endblock content %}