Browse Source

add or update HTML templates (all based around user/accounts).

These are very rough templates but they serve as a way to get the
logged-in user stuff functionality started.
stable
Craig Oates 2 years ago
parent
commit
2aaefdbf5e
  1. 2
      templates/index.html
  2. 13
      templates/user/dashboard.html
  3. 19
      templates/user/edit.html
  4. 16
      templates/user/log-in.html

2
templates/index.html

@ -2,4 +2,6 @@
{% block title %}Nicola Ellis & Ritherdon Archive{% endblock %}
{% block content %}
<h1>Index</h1>
<a href="/setup">Create Account</a>
<a href="login">Log-In</a>
{% endblock %}

13
templates/user/dashboard.html

@ -2,4 +2,17 @@
{% block title %}Manage you archive.{% endblock %}
{% block content %}
<h1>Dashboard</h1>
<div>
{% if roles.logged-in %}
<a href="/dashboard">Dashboard</a>
<a href="/user/edit">Edit Account</a>
<form action="/logout" method="post">
<input type="hidden" name="AUTHENTICITY-TOKEN" value="{{token}}">
<input type="submit" value="logout">
</form>
{% else %}
<a href="/">Home</a>
<a href="/login">Log-in</a>
{% endif %}
</div>
{% endblock %}

19
templates/user/edit.html

@ -0,0 +1,19 @@
{% extends "layouts/default.html" %}
{% block title%}Edit your accout settings.{%endblock%}
{% block content %}
<h2>Edit Account</h2>
<div>
<p>Note: Username cannot be changed.</p>
<form action="/user/edit" method="post">
<input type="hidden" name="AUTHENTICITY-TOKEN" value="{{token}}">
<label>Display Name</label>
<input type="text" name="DISPLAY-NAME" value="{{user.display-name}}">
<label>New Password</label>
<input type="password" name="NEW-PASSWORD">
<label>New Password Check</label>
<input type="password" name="PASSWORD-CHECK">
<input type="submit" value="Update Account">
</form>
</div>
{% endblock %}

16
templates/user/log-in.html

@ -0,0 +1,16 @@
{% extends "layouts/default.html" %}
{% block title%}Log-in and start doing stuff.{%endblock%}
{% block content %}
<h2>Login</h2>
<div>
<form action="/login" method="post">
<input type="hidden" name="AUTHENTICITY-TOKEN" value="{{token}}">
<label>Username</label>
<input required type="text" name="USERNAME">
<label>password</label>
<input required type="password" name="PASSWORD">
<input type="submit" value="Log-in">
</form>
</div>
{% endblock %}
Loading…
Cancel
Save