mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-13 12:33:25 +02:00
Improve login page 2 (#2103)
* Got basic login page format working * Use different login css template * Got login form partially working * Remove old form fields * Got login page working with image * Load css and js assets locally
This commit is contained in:
parent
a1981cc846
commit
ff79efda35
14 changed files with 156 additions and 30 deletions
7
frontend/public/assets/css/bootstrap.min.css
vendored
Normal file
7
frontend/public/assets/css/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
11
frontend/public/assets/css/ionicons.min.css
vendored
Normal file
11
frontend/public/assets/css/ionicons.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
30
frontend/public/assets/css/login.css
Normal file
30
frontend/public/assets/css/login.css
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
.back {
|
||||
background: #e2e2e2;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.div-center {
|
||||
width: 400px;
|
||||
height: 400px;
|
||||
background-color: #fff;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
overflow: auto;
|
||||
padding: 1em 2em;
|
||||
border-bottom: 2px solid #ccc;
|
||||
display: table;
|
||||
}
|
||||
|
||||
div.content {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
BIN
frontend/public/assets/images/icon.png
Normal file
BIN
frontend/public/assets/images/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 39 KiB |
7
frontend/public/assets/js/bootstrap.bundle.min.js
vendored
Normal file
7
frontend/public/assets/js/bootstrap.bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4
frontend/public/assets/js/jquery.min.js
vendored
Normal file
4
frontend/public/assets/js/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
squeaknode/admin/webapp/static/build/assets/css/bootstrap.min.css
vendored
Normal file
7
squeaknode/admin/webapp/static/build/assets/css/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
11
squeaknode/admin/webapp/static/build/assets/css/ionicons.min.css
vendored
Normal file
11
squeaknode/admin/webapp/static/build/assets/css/ionicons.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
30
squeaknode/admin/webapp/static/build/assets/css/login.css
Normal file
30
squeaknode/admin/webapp/static/build/assets/css/login.css
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
.back {
|
||||
background: #e2e2e2;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.div-center {
|
||||
width: 400px;
|
||||
height: 400px;
|
||||
background-color: #fff;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
overflow: auto;
|
||||
padding: 1em 2em;
|
||||
border-bottom: 2px solid #ccc;
|
||||
display: table;
|
||||
}
|
||||
|
||||
div.content {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
BIN
squeaknode/admin/webapp/static/build/assets/images/icon.png
Normal file
BIN
squeaknode/admin/webapp/static/build/assets/images/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 39 KiB |
7
squeaknode/admin/webapp/static/build/assets/js/bootstrap.bundle.min.js
vendored
Normal file
7
squeaknode/admin/webapp/static/build/assets/js/bootstrap.bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4
squeaknode/admin/webapp/static/build/assets/js/jquery.min.js
vendored
Normal file
4
squeaknode/admin/webapp/static/build/assets/js/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -5,18 +5,11 @@
|
|||
{% else %}
|
||||
<title>Welcome to Squeaknode</title>
|
||||
{% endif %}
|
||||
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="assets/css/ionicons.min.css">
|
||||
<link rel="stylesheet" href="assets/css/login.css">
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
Squeaknode:
|
||||
<a href="{{ url_for('index') }}">Home</a>
|
||||
{% if current_user.is_anonymous %}
|
||||
<a href="{{ url_for('login') }}">Login</a>
|
||||
{% else %}
|
||||
<a href="{{ url_for('logout') }}">Logout</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<hr>
|
||||
{% with messages = get_flashed_messages() %}
|
||||
{% if messages %}
|
||||
<ul>
|
||||
|
|
@ -27,5 +20,8 @@
|
|||
{% endif %}
|
||||
{% endwith %}
|
||||
{% block content %}{% endblock %}
|
||||
|
||||
<script src="assets/js/jquery.min.js"></script>
|
||||
<script src="assets/js/bootstrap.bundle.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,24 +1,36 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Sign In</h1>
|
||||
<form action="" method="post" novalidate>
|
||||
{{ form.hidden_tag() }}
|
||||
<p>
|
||||
{{ form.username.label }}<br>
|
||||
{{ form.username(size=32) }}<br>
|
||||
{% for error in form.username.errors %}
|
||||
<span style="color: red;">[{{ error }}]</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>
|
||||
{{ form.password.label }}<br>
|
||||
{{ form.password(size=32) }}<br>
|
||||
{% for error in form.password.errors %}
|
||||
<span style="color: red;">[{{ error }}]</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>{{ form.remember_me() }} {{ form.remember_me.label }}</p>
|
||||
<p>{{ form.submit() }}</p>
|
||||
</form>
|
||||
<div class="back">
|
||||
<div class="div-center">
|
||||
<div class="content">
|
||||
|
||||
<div class="mx-auto p-3">
|
||||
<img src="assets/images/icon.png" class="rounded-circle border" alt="Cinque Terre" width="200" height="200">
|
||||
</div>
|
||||
|
||||
<h3>Squeaknode Login</h3>
|
||||
<hr />
|
||||
<form action="" method="post" novalidate>
|
||||
{{ form.hidden_tag() }}
|
||||
<div class="form-group">
|
||||
{{ form.username.label }}<br>
|
||||
{{ form.username(size=32, class_="form-control", placeholder_="Username") }}<br>
|
||||
{% for error in form.username.errors %}
|
||||
<span style="color: red;">[{{ error }}]</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ form.password.label }}<br>
|
||||
{{ form.password(size=32, class_="form-control", placeholder_="Password") }}<br>
|
||||
{% for error in form.password.errors %}
|
||||
<span style="color: red;">[{{ error }}]</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{{ form.submit(class_="btn btn-primary") }}
|
||||
<hr />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue