Added printing images

This commit is contained in:
2022-03-17 10:39:22 +01:00
parent 980d12613c
commit 7ca6878d0d
4 changed files with 157 additions and 36 deletions

View File

@@ -9,15 +9,15 @@
<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>
<div class="col-md-7 offset-md-2">
<a href="/"><img class="rounded" width="100px" src="{{ url_for('static', filename='images/little-printer.png') }}" alt="LittlePrynter icon"></a><h1 class="card-title font-weight-bold">Little Prynter</h1>
<hr>
<div class="alert alert-dark" role="alert">LittlePrynter is under heavy developpement, you may encounter bugs ! If so, try again. Thanks !</div>
<br>
{% with messages = get_flashed_messages(category_filter=('error')) %}
{% if messages %}
{% for message in messages %}
<div class="alert alert-danger" role="alert">{{ message }}</div>
<div class="alert alert-danger" role="alert">⚠️ {{ message }}</div>
{% endfor %}
{% endif %}
{% endwith %}
@@ -25,7 +25,7 @@
{% with messages = get_flashed_messages(category_filter=('info')) %}
{% if messages %}
{% for message in messages %}
<div class="alert alert-info" role="alert">{{ message }}</div>
<div class="alert alert-info" role="alert"> {{ message }}</div>
{% endfor %}
{% endif %}
{% endwith %}
@@ -40,20 +40,30 @@
<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="form-control" type="text" name="txt" placeholder="200 chars or less " maxlength="200" required><br>
<input class="form-control" type="text" name="signature" placeholder="Signature or pseudo" maxlength="200" required><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>
<div class="card">
<h3 class="card-header">Print an image</h3>
<div class="card-body">
<form enctype="multipart/form-data" class="form-group" action="/api/print/img" method="post">
<input class="form-control" type="file" name="img" required><br>
<input class="form-control" type="text" name="signature" placeholder="Signature or pseudo" maxlength="200" required><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>
<hr>
<footer>Little Prynter is built by <a href="https://n07070.xyz/about-me/">n07070</a> for fun :) </footer>
</div>