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,16 +1,15 @@
<!DOCTYPE html> {% extends "base" %}
<html>
<head>
<meta charset="utf-8">
<title>New blog</title>
</head>
<body>
<h1>Create a blog</h1>
<form method="post">
<label for="title">Title</label>
<input name="title">
<input type="submit" value="Create blog"/> {% block title %}
</form> New blog
</body> {% endblock title %}
</html>
{% block content %}
<h1>Create a blog</h1>
<form method="post">
<label for="title">Title</label>
<input name="title">
<input type="submit" value="Create blog"/>
</form>
{% endblock content %}

View File

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

View File

@ -1,22 +1,21 @@
<!DOCTYPE html> {% extends "base" %}
<html>
<head>
<meta charset="utf-8">
<title>New post</title>
</head>
<body>
<h1>Create a post</h1>
<form method="post">
<label for="title">Title</label>
<input name="title">
<label for="content">Content</label> {% block title %}
<textarea name="content"></textarea> New post
{% endblock title %}
<label for="license">License</label> {% block content %}
<input name="license"> <h1>Create a post</h1>
<form method="post">
<label for="title">Title</label>
<input name="title">
<input type="submit" value="Publish"/> <label for="content">Content</label>
</form> <textarea name="content"></textarea>
</body>
</html> <label for="license">License</label>
<input name="license">
<input type="submit" value="Publish"/>
</form>
{% endblock content %}

View File

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

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,25 +1,24 @@
<!DOCTYPE html> {% extends "base" %}
<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">
<label for="email">Email</label> {% block title %}
<input name="email"> New Account
{% endblock title %}
<label for="password">Password</label> {% block content %}
<input type="password" name="password"> <h1>Create an account</h1>
<form method="post">
<label for="username">Username</label>
<input name="username">
<label for="password_confirmation">Password confirmation</label> <label for="email">Email</label>
<input type="password" name="password_confirmation"> <input name="email">
<input type="submit" value="Create account"/> <label for="password">Password</label>
</form> <input type="password" name="password">
</body>
</html> <label for="password_confirmation">Password confirmation</label>
<input type="password" name="password_confirmation">
<input type="submit" value="Create account"/>
</form>
{% endblock content %}