Login
This commit is contained in:
parent
89c2c22437
commit
a818f670d0
1 changed files with 29 additions and 120 deletions
|
@ -1,124 +1,33 @@
|
|||
{%- import "util/forms.html" as forms -%}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
{% block content %}
|
||||
<div id="login-form" class="">
|
||||
<h1 class="h2">Welcome back.</h1>
|
||||
<p class="text-muted mb-md-5">Glad to have you back!</p>
|
||||
|
||||
<head>
|
||||
{% include "analytics.html" %}
|
||||
|
||||
<meta name="description" content="{{config('DESCRIPTION')}}">
|
||||
{% include "csp.html" %}
|
||||
|
||||
<script src="{{ 'js/bootstrap.js' | asset }}"></script>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
<meta name="author" content="">
|
||||
|
||||
{% block title %}
|
||||
<title>Login - {{SITE_TITLE}}</title>
|
||||
{% endblock %}
|
||||
|
||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||
<link rel="stylesheet" href="{{ 'css/main.css' | asset }}">
|
||||
<link rel="stylesheet" href="{{ ('css/'~config('DEFAULT_THEME')~'.css') | asset }}">
|
||||
|
||||
</head>
|
||||
|
||||
<body id="login">
|
||||
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-transparent fixed-top border-0">
|
||||
<div class="container-fluid d-none">
|
||||
<button class="navbar-toggler d-none" role="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive"
|
||||
aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
{% if failed %}
|
||||
<div class="alert alert-danger alert-dismissible fade show d-flex my-3" role="alert">
|
||||
<i class="fas fa-exclamation-circle my-auto"></i>
|
||||
<div>
|
||||
Incorrect username, email address, or password.
|
||||
<br>
|
||||
<a href="/forgot" class="alert-link">Forgot password?</a>
|
||||
</div>
|
||||
<button class="close" data-bs-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container-fluid position-absolute h-100 p-0 overflow-auto">
|
||||
<div class="row no-gutters h-100">
|
||||
|
||||
<div class="col-12 col-md-6 my-auto p-3">
|
||||
|
||||
<div class="row justify-content-center">
|
||||
|
||||
<div class="col-10 col-md-7">
|
||||
|
||||
<div class="mb-5">
|
||||
<a href="/" class="text-decoration-none"><span class="h3 text-primary"></span></a>
|
||||
</div>
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div id="login-form" class="">
|
||||
|
||||
<h1 class="h2">Welcome back.</h1>
|
||||
|
||||
<p class="text-muted mb-md-5">Glad to have you back!</p>
|
||||
|
||||
{% if failed %}
|
||||
<div class="alert alert-danger alert-dismissible fade show d-flex my-3" role="alert">
|
||||
<i class="fas fa-exclamation-circle my-auto"></i>
|
||||
<div>
|
||||
Incorrect username, email address, or password.
|
||||
<br>
|
||||
<a href="/forgot" class="alert-link">Forgot password?</a>
|
||||
</div>
|
||||
<button class="close" data-bs-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form action="/login" method="post" class="mt-md-3" id="login">
|
||||
|
||||
<label for="username" class="mt-3">Username or Email Address</label>
|
||||
|
||||
<input autocomplete="off" class="form-control" id="username" aria-describedby="usernameHelp"
|
||||
type="text" name="username" required="">
|
||||
<input type="hidden" name="redirect" value="{{redirect}}">
|
||||
|
||||
<label for="password" class="mt-3">Password</label>
|
||||
|
||||
<input autocomplete="off" class="form-control" id="password" aria-describedby="passwordHelp"
|
||||
type="password" name="password" required="">
|
||||
|
||||
|
||||
<small><a href="/forgot">Forgot password?</a></small>
|
||||
|
||||
<button class="btn btn-primary login w-100 mt-3" id="login_button">Sign in</button>
|
||||
|
||||
<div class="text-center text-muted text-small mt-5 mb-3">
|
||||
Don't have an account? <a href="/signup{{'?redirect='+redirect if redirect else ''}}" class="font-weight-bold toggle-login">Sign up</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-6 d-none d-md-block">
|
||||
|
||||
<div class="splash-wrapper">
|
||||
|
||||
<div class="splash-overlay"></div>
|
||||
|
||||
<img alt="cover" loading="lazy" class="splash-img" src="{{ ('images/'~SITE_ID~'/cover.webp') | asset }}"></img>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<form action="/login" method="post" class="mt-md-3" id="login">
|
||||
<label for="username" class="mt-3">Username or Email Address</label>
|
||||
<input autocomplete="off" class="form-control" id="username" aria-describedby="usernameHelp" type="text" name="username" required="">
|
||||
<input type="hidden" name="redirect" value="{{redirect}}">
|
||||
<label for="password" class="mt-3">Password</label>
|
||||
<input autocomplete="off" class="form-control" id="password" aria-describedby="passwordHelp" type="password" name="password" required="">
|
||||
<small><a href="/forgot">Forgot password?</a></small>
|
||||
<button class="btn btn-primary login w-100 mt-3" id="login_button">Sign in</button>
|
||||
<div class="text-center text-muted text-small mt-5 mb-3">
|
||||
Don't have an account? <a href="/signup{{'?redirect='+redirect if redirect else ''}}" class="font-weight-bold toggle-login">Sign up</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue