make all this have a login page, use ldap, put a logo on, moved some upstream stuff to static/ -- need to do more here to be consistent with bootstrap 5, but for another day
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
{% if not InDBox %}
|
||||
<html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Book DB</title>
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="Book DB">
|
||||
|
||||
<!-- Bootstrap CSS -->
|
||||
<link rel="stylesheet" href="{{ url_for( 'static', filename='upstream/bootstrap-5.0.2-dist/css/bootstrap.min.css' ) }}">
|
||||
|
||||
<!-- Bootstrap CSS -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@1.18.0/dist/bootstrap-table.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.22/css/dataTables.bootstrap4.min.css">
|
||||
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
|
||||
@@ -100,11 +104,19 @@
|
||||
<a class="dropdown-item" href="{{url_for('reset_all_series_ratings')}}">Recalculate all series ratings</a>
|
||||
</div class="dropdow-menu">
|
||||
</div class="nav-item dropdown">
|
||||
</div clas="navbar-nav">
|
||||
<form class="form-inline my-2 my-lg-0" method="POST" action="/search">
|
||||
<input class="form-control mr-sm-2" type="search" placeholder="Search by title" aria-label="Search" name="term">
|
||||
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
|
||||
</form>
|
||||
<form class="d-flex col ms-5" method="POST" action="/search">
|
||||
<input class="form-control mr-sm-2" type="search" placeholder="Search by title" aria-label="Search" name="term">
|
||||
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
|
||||
</form>
|
||||
<div class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="UserMenu" role="button" data-toggle="dropdown" aria-expanded="false">
|
||||
<svg width="20" height="20" fill="currentColor"><use xlink:href="{{url_for('static', filename='icons.svg')}}#user"/></svg>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-end" aria-labelledby="UserMenu">
|
||||
<div><a class="dropdown-item" href="{{url_for('logout')}}">Logout</a></div>
|
||||
</div class="dropdown-menu">
|
||||
</div class="nav-item dropdown">
|
||||
</div class="navbar-nav">
|
||||
</div class="collapse navbar-collapse">
|
||||
</nav>
|
||||
|
||||
|
||||
66
templates/login.html
Normal file
66
templates/login.html
Normal file
@@ -0,0 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Book DB Login</title>
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="Photo Assistant">
|
||||
|
||||
<!-- Bootstrap CSS -->
|
||||
<link rel="stylesheet" href="{{ url_for( 'static', filename='upstream/bootstrap-5.0.2-dist/css/bootstrap.min.css' ) }}">
|
||||
|
||||
<!-- code to get bootstrap to work -->
|
||||
<script src="{{ url_for( 'static', filename='upstream/jquery-3.6.0.min.js')}}"></script>
|
||||
<script src="{{ url_for( 'static', filename='upstream/bootstrap-5.0.2-dist/js/bootstrap.min.js')}}"></script>
|
||||
|
||||
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
|
||||
|
||||
{% import "bootstrap/wtf.html" as wtf %}
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
{% if form.errors|length > 0 %}
|
||||
<div class="row my-5">
|
||||
<alert id="err" class="alert alert-danger alert-dismissible fade show">
|
||||
<button type="button" class="close btn border-secondary me-3" data-dismiss="alert" aria-label="Close" onClick="$('#err').hide()">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
{% set last_err = namespace(txt="") %}
|
||||
{% for e in form.errors %}
|
||||
{% if last_err.txt != form.errors[e] %}
|
||||
{% set err = form.errors[e]|replace("['", "" ) %}
|
||||
{% set err = err|replace("']", "" ) %}
|
||||
{{err}}
|
||||
{% set last_err.txt=form.errors[e] %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</alert>
|
||||
</div class="row">
|
||||
{% endif %}
|
||||
|
||||
<div class="row px-3 my-5 col-6" style="border: 3px solid #5bc0de; border-radius: 15px;">
|
||||
<h3 class="my-3 text-center" style="color: #5bc0de">
|
||||
<svg width="64" height="64" fill="currentColor"><use xlink:href="{{url_for('static', filename='book.svg')}}#logo" /></svg> Book DB Login</h3>
|
||||
<form class="" method="POST">
|
||||
<div class="input-group">
|
||||
<label for="username" class="text-right input-group-text col-4 text-info">Username:</label>
|
||||
<input class="form-control" type="text" id="username" name="username"></input>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<label for="password" class="text-right input-group-text col-4 text-info">Password:</label>
|
||||
<input class="form-control col-8" type="password" id="password" name="password"></input>
|
||||
</div>
|
||||
|
||||
<div class="col-12 my-2 text-center">
|
||||
{{ form.submit( class="form-control text-info") }}
|
||||
</div>
|
||||
{{ form.hidden_tag() }}
|
||||
</form>
|
||||
</div class="row">
|
||||
</div class="container">
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user