pi-frame-server/templates/app.html
Champlin, Saji 435337240a
Some checks failed
cargo_test_bench / Run Tests (push) Failing after 1m23s
cargo_test_bench / Run Benchmarks (push) Failing after 1m21s
centering images
2024-08-07 10:57:11 -05:00

64 lines
2 KiB
HTML

{% extends "partials/base.html" %}
{% block title %} Pi Frame Server {% endblock %}
{% block content %}
<header class="container">
<hgroup>
<h1>Pi EINK Frame Server</h1>
<p>Display things accurately (ish)</p>
</header>
<main class="container">
<form hx-encoding="multipart/form-data" enctype='multipart/form-data'>
<fieldset class="grid">
<div>
<fieldset>
<legend>Target Palette:</legend>
{% for m in palettes %}
<input type="radio" id="palette-{{m}}" name="palette" value="{{m}}"
{%- if loop.first %} checked {% endif %}>
<label htmlFor="palette-{{m}}">{{m}}</label>
{% endfor %}
</fieldset>
<small> "Default" uses a real-life based color scheme. "Simple" uses an idealized palette.</small>
</div>
<div>
<label for="dither-select">Dither Method:</label>
<select id="dither-select" name="dither_method">
{% for m in dither_methods %}
<option {%if loop.first %} selected {% endif %} value="{{m}}">{{m}}</option>
{% endfor %}
</select>
<small>
Different dither methods produce better results for certain images.
</small>
</div>
</fieldset>
<label for="image-input">Image: </label>
<input type="file" name="image" id="image-input" accept="image/*">
<small>Images will be resized to <code>800x480</code>, which may stretch the image.</small>
<div class="grid">
<button hx-post="/api/setimage" hx-disabled-elt="this">Set Display</button>
<button class="secondary"
hx-post="/app/preview"
hx-disabled-elt="this"
hx-target="#preview-area"
hx-swap="outerHTML"
>
Preview
</button>
</div>
</form>
<div id="preview-area" hidden></div>
</main>
<footer class="container-fluid">
pi-frame-server Version {{ version }}
</footer>
{% endblock %}