2024-09-14 18:49:57 +00:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<form method="POST" action="/text-template">
|
|
|
|
<label for="template">Template:</label>
|
|
|
|
<select name="template">
|
|
|
|
<option value="DNH">Do not hack</option>
|
|
|
|
<option value="Food">Food</option>
|
|
|
|
</select>
|
|
|
|
<input type="submit" value="Apply">
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
|
|
<form method="POST" action="/text-form">
|
|
|
|
<h2>String 1</h2>
|
2024-09-15 10:24:26 +00:00
|
|
|
Text:<br>
|
|
|
|
<textarea name="string1">{{text1["string"]}}</textarea><br>
|
2024-09-14 18:49:57 +00:00
|
|
|
Size: <input type="number" value="{{text1["size"]}}" name="size1" min="0" required
|
|
|
|
style="width: 40px"><br>
|
|
|
|
Y position: <input type="number" value="{{text1["pos"]}}" name="pos1" required
|
|
|
|
style="width: 40px"><br>
|
|
|
|
|
|
|
|
<h2>String 2</h2>
|
2024-09-15 10:24:26 +00:00
|
|
|
Text:<br>
|
|
|
|
<textarea name="string2">{{text2["string"]}}</textarea><br>
|
2024-09-14 18:49:57 +00:00
|
|
|
Size: <input type="number" value="{{text2["size"]}}" name="size2" min="0" required
|
|
|
|
style="width: 40px"><br>
|
|
|
|
Y position: <input type="number" value="{{text2["pos"]}}" name="pos2" required
|
|
|
|
style="width: 40px"><br>
|
|
|
|
<input type="submit" value="Submit">
|
|
|
|
</form>
|
|
|
|
|
|
|
|
{% if filename %}
|
|
|
|
<br><br>
|
2024-09-17 18:12:24 +00:00
|
|
|
<img src="user_data/{{filename}}" alt="Generated Image">
|
2024-09-14 18:49:57 +00:00
|
|
|
|
|
|
|
<form method="POST" action="/text-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>
|
|
|
|
|
2024-09-15 11:54:29 +00:00
|
|
|
<input type="submit" value="Print" style="font-size: 2em; padding: 20px 40px;">
|
2024-09-14 18:49:57 +00:00
|
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% endblock %}
|
|
|
|
|