forked from emilevs/label_printer
30 lines
1,021 B
HTML
30 lines
1,021 B
HTML
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
|
|
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
<h1>Upload Image</h1>
|
|
<form method="POST" action="/image" enctype="multipart/form-data">
|
|
<input type="file" name="image">
|
|
<input type="submit" value="Generate preview"><br>
|
|
Recommended image height = {{label_width}}, taller images will be scaled
|
|
</form>
|
|
|
|
{% if info %}
|
|
<p class="info" style="color: {{info_color}}">{{info}}</p>
|
|
{% endif %}
|
|
|
|
{% if filename %}
|
|
<img src="user_data/{{filename}}" alt="Uploaded image" style="height: 150px; width: auto;">
|
|
|
|
<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 %}
|
|
|