label_printer/templates/image.html

31 lines
1,019 B
HTML
Raw Permalink Normal View History

2024-09-25 19:48:36 +00:00
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
{% extends "base.html" %}
{% block content %}
<h1>Upload Image</h1>
2024-09-15 12:57:26 +00:00
<form method="POST" action="/image" enctype="multipart/form-data">
<input type="file" name="image">
<input type="submit" value="Generate preview"><br>
2024-11-27 22:55:50 +00:00
Recommended image height = {{label_width}}, other sizes will be scaled
</form>
2024-09-14 18:49:57 +00:00
{% if info %}
<p class="info" style="color: {{info_color}}">{{info}}</p>
{% endif %}
{% if filename %}
2024-09-25 20:23:32 +00:00
<img src="user_data/{{filename}}" alt="Uploaded image" style="height: 150px; width: auto;">
2024-09-15 12:57:26 +00:00
<form method="POST" action="/image-print">
{% if cut %}
<input type="checkbox" name="cut" value="cut" checked>
{%else %}
<input type="checkbox" name="cut" value="cut">
{%endif%}
<label for="cut"> Cut paper after printing </label><br>
<input type="submit" value="Print" style="font-size: 2em; padding: 20px 40px;">
{% endif %}
{% endblock %}