feat: Style login page

* This also makes footer inclusion optional
ila
Aonrud 2023-01-15 10:58:53 +00:00
rodzic a1b1dcebc8
commit eb131b0c7a
3 zmienionych plików z 35 dodań i 1 usunięć

Wyświetl plik

@ -301,6 +301,15 @@ nav.flexbox {
* Admin pages * Admin pages
*/ */
.login {
margin: 5em auto;
max-width: 25em;
background: $background;
border: 1px solid $border;
padding: 2em 2em calc(2em - 10px);
text-align: center;
}
.notification.new { .notification.new {
background: #5cb85c20; background: #5cb85c20;
} }

Wyświetl plik

@ -53,7 +53,9 @@
</div> </div>
{% endif %} {% endif %}
{% block content %}{% endblock %} {% block content %}{% endblock %}
{% include "footer.html" %} {% block footer %}
{% include "footer.html" %}
{% endblock %}
</div> </div>
{% if is_admin %} {% if is_admin %}
<script src="{{ BASE_URL }}/static/common-admin.js?v={{ JS_HASH }}"></script> <script src="{{ BASE_URL }}/static/common-admin.js?v={{ JS_HASH }}"></script>

Wyświetl plik

@ -0,0 +1,23 @@
{%- import "utils.html" as utils with context -%}
{% extends "layout.html" %}
{% block head %}
<meta name="robots" content="noindex, nofollow">
{% endblock %}
{% block content %}
<div class="login">
{% if error %}
<p class="primary-color">Invalid password.</p>
{% endif %}
<form class="form" action="{{ BASE_URL }}/admin/login" method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
<input type="hidden" name="redirect" value="{{ redirect }}">
<p><input type="password" placeholder="password" name="password" autofocus class="form-control" /></p>
<p><input type="submit" value="login" class="btn btn-primary" /></p>
</form>
</div>
{% endblock %}
{% block footer %}{% endblock %}