gnu-social/templates/security/login.html.twig
Eliseu Amaro 8b4148a00d
[TWIG][CSS] Register and Login styling done.
Signed-off-by: Eliseu Amaro <mail@eliseuama.ro>
2021-07-28 11:52:37 +01:00

59 lines
1.9 KiB
Twig

{% extends 'stdgrid.html.twig' %}
{% block stylesheets %}
{{ parent() }}
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/security/security.css') }}">
{% endblock %}
{% block title %}Log in!{% endblock %}
{% block body %}
<div class='content'>
<form method="post">
<fieldset>
<legend>Login</legend>
{% if error %}
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}
<p>
{% if app.user %}
<h1 class="mb-3">
You are logged in as {{ app.user.username }}.
<br>
<button class="btn btn-lg btn-primary">
<a href="{{ path('app_logout') }}">Logout</a>
</button>
</h1>
{% else %}
<label for="inputNickname">Nickname</label>
<br>
<input type="text" value="{{ last_username }}" name="nickname" id="inputNickname"
class="form-control" required autofocus>
{% endif %}
</p>
<p>
<label for="inputPassword">Password</label>
<br>
<input type="password" name="password" id="inputPassword" class="form-control" required>
</p>
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
<p class="checkbox mb-3">
<label>Remember me</label>
<input type="checkbox" name="_remember_me">
</p>
<button class="btn btn-lg btn-primary" type="submit">
Sign in
</button>
</fieldset>
</form>
</div>
{% endblock body %}
{% block javascripts %}{% endblock %}