Added templates, moved old ones
This commit is contained in:
10
src/templates/api.html
Normal file
10
src/templates/api.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" dir="ltr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>LittlePrynter API</title>
|
||||
</head>
|
||||
<body>
|
||||
"Welcome to the printing software's API. Please see the index page to get started.
|
||||
</body>
|
||||
</html>
|
||||
60
src/templates/index.html
Normal file
60
src/templates/index.html
Normal file
@@ -0,0 +1,60 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>LittlePrynter</title>
|
||||
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
<link rel="stylesheet" href="{{ url_for('static',filename='css/style.css') }}">
|
||||
</head>
|
||||
<body class="container">
|
||||
<div class="col-md-6 offset-md-3">
|
||||
<img class="rounded" width="100px" src="{{ url_for('static', filename='images/little-printer.png') }}" alt="LittlePrynter icon"><h1 class="card-title font-weight-bold">Little Prynter</h1>
|
||||
<hr>
|
||||
<br>
|
||||
{% with messages = get_flashed_messages(category_filter=('error')) %}
|
||||
{% if messages %}
|
||||
{% for message in messages %}
|
||||
<div class="alert alert-warning" role="alert">{{ message }}</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
{% with messages = get_flashed_messages(category_filter=('info')) %}
|
||||
{% if messages %}
|
||||
{% for message in messages %}
|
||||
<div class="alert alert-info" role="alert">{{ message }}</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
<!-- <br>
|
||||
<h3>Imprimer une image aléatoire</h3>
|
||||
<a class="btn btn-primary btn-lg" href="/api/print/image"> Imprimer</a>
|
||||
<hr>
|
||||
<br> -->
|
||||
<div class="card">
|
||||
<h3 class="card-header">Print a short message</h3>
|
||||
<div class="card-body">
|
||||
|
||||
<form class="form-group" action="/api/print/sms" method="post">
|
||||
<input class="form-control" type="text" name="txt" placeholder="200 chars or less " maxlength="200"><br>
|
||||
<input class="form-control" type="text" name="signature" placeholder="Signature or pseudo" maxlength="200"><br>
|
||||
|
||||
<input class="btn btn-primary float-right" type="submit" value="Imprimer" name="imprimer">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="pbar" style="display:none">
|
||||
<img src="{{ url_for('static',filename='load.gif') }}" alt="loading wheel">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
<hr>
|
||||
<footer>Little Prynter is built for fun by <a href="https://n07070.xyz/about-me/">n07070</a> for fun :) </footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
30
src/templates/password.html
Normal file
30
src/templates/password.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Log in</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="{{ url_for('static',filename='css/style.css') }}">
|
||||
</head>
|
||||
<body class="container">
|
||||
<div class="col-md-6 offset-md-3">
|
||||
<h1>Login</h1>
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
{% for category, message in messages %}
|
||||
<div class="alert alert-{{ category }}" role="alert">{{ message }}</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
<form action="/login" method="post">
|
||||
<div class="form-group">
|
||||
<input type="text" name="username" class="form-control" placeholder="Pseudo">
|
||||
<input type="password" name="password" class="form-control" placeholder="Password">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user