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

11
templates/base.tera Normal file
View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{% block title %}{% endblock title %} ⋅ Plume</title>
</head>
<body>
{% block content %}
{% endblock content %}
</body>
</html>

View File

@ -1,10 +1,10 @@
<!DOCTYPE html> {% extends "base" %}
<html>
<head> {% block title %}
<meta charset="utf-8"> New blog
<title>New blog</title> {% endblock title %}
</head>
<body> {% block content %}
<h1>Create a blog</h1> <h1>Create a blog</h1>
<form method="post"> <form method="post">
<label for="title">Title</label> <label for="title">Title</label>
@ -12,5 +12,4 @@
<input type="submit" value="Create blog"/> <input type="submit" value="Create blog"/>
</form> </form>
</body> {% endblock content %}
</html>

View File

@ -1,10 +1,10 @@
<!DOCTYPE html> {% extends "base" %}
<html>
<head> {% block title %}
<meta charset="utf-8"> Configuration
<title>Configuration</title> {% endblock title %}
</head>
<body> {% block content %}
<h1>Configure your instance</h1> <h1>Configure your instance</h1>
<form method="post"> <form method="post">
<label for="name">Name</label> <label for="name">Name</label>
@ -12,5 +12,4 @@
<input type="submit" value="Let's go!"/> <input type="submit" value="Let's go!"/>
</form> </form>
</body> {% endblock content %}
</html>

View File

@ -1,10 +1,10 @@
<!DOCTYPE html> {% extends "base" %}
<html>
<head> {% block title %}
<meta charset="utf-8"> New post
<title>New post</title> {% endblock title %}
</head>
<body> {% block content %}
<h1>Create a post</h1> <h1>Create a post</h1>
<form method="post"> <form method="post">
<label for="title">Title</label> <label for="title">Title</label>
@ -18,5 +18,4 @@
<input type="submit" value="Publish"/> <input type="submit" value="Publish"/>
</form> </form>
</body> {% endblock content %}
</html>

View File

@ -1,10 +1,10 @@
<!DOCTYPE html> {% extends "base" %}
<html>
<head> {% block title %}
<meta charset="utf-8"> Login
<title>Login</title> {% endblock title %}
</head>
<body> {% block content %}
<h1>Login</h1> <h1>Login</h1>
<form method="post"> <form method="post">
<label for="email_or_name">Username or email</label> <label for="email_or_name">Username or email</label>
@ -15,5 +15,4 @@
<input type="submit" value="Login"/> <input type="submit" value="Login"/>
</form> </form>
</body> {% endblock content %}
</html>

View File

@ -1,13 +1,12 @@
<!DOCTYPE html> {% extends "base" %}
<html>
<head> {% block title %}
<meta charset="utf-8"> {{ user.display_name }}
<title>{{ user.display_name }}</title> {% endblock title %}
</head>
<body> {% block content %}
<h1>{{ user.display_name }}</h1> <h1>{{ user.display_name }}</h1>
<div> <div>
{{ user.summary | safe }} {{ user.summary | safe }}
</div> </div>
</body> {% endblock content %}
</html>

View File

@ -1,10 +1,10 @@
<!DOCTYPE html> {% extends "base" %}
<html>
<head> {% block title %}
<meta charset="utf-8"> New Account
<title>New account</title> {% endblock title %}
</head>
<body> {% block content %}
<h1>Create an account</h1> <h1>Create an account</h1>
<form method="post"> <form method="post">
<label for="username">Username</label> <label for="username">Username</label>
@ -21,5 +21,4 @@
<input type="submit" value="Create account"/> <input type="submit" value="Create account"/>
</form> </form>
</body> {% endblock content %}
</html>