- Panel is mounted sideways: render landscape (600x400), rotate to the panel's native portrait orientation right before writing to hardware. - Web UI: card-based layout, dark mode, active nav highlighting, save confirmation toasts, error banners. - Rotation: separate enabled/disabled toggle (off pins to the first screen in the list) and the interval is now in minutes instead of raw seconds. Migrates existing config.json from the old interval_seconds field. - Weather: type a city name instead of hunting down coordinates, resolved via Open-Meteo's free geocoding API. Manual lat/long still available as a fallback.
38 lines
1.3 KiB
HTML
38 lines
1.3 KiB
HTML
{% extends "base.html" %}
|
|
{% block content %}
|
|
<h1>Weather</h1>
|
|
|
|
{% if error %}
|
|
<div class="toast error">{{ error }}</div>
|
|
{% endif %}
|
|
|
|
<form method="post">
|
|
<div class="card">
|
|
<div class="section-label">Location</div>
|
|
<p class="hint" style="margin: -0.25rem 0 1rem;">Uses Open-Meteo — no API key needed.</p>
|
|
<div class="field">
|
|
<label for="city">City</label>
|
|
<input type="text" id="city" name="city" placeholder="e.g. Berlin">
|
|
{% if settings.city %}
|
|
<p class="hint">Currently: {{ settings.city }} ({{ settings.latitude }}, {{ settings.longitude }})</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="section-label">Or enter coordinates manually</div>
|
|
<p class="hint" style="margin: -0.25rem 0 1rem;">Leave the city field above empty to use these instead.</p>
|
|
<div class="field">
|
|
<label for="latitude">Latitude</label>
|
|
<input type="text" id="latitude" name="latitude" value="{{ settings.latitude if settings.latitude is not none else '' }}" placeholder="e.g. 52.52">
|
|
</div>
|
|
<div class="field">
|
|
<label for="longitude">Longitude</label>
|
|
<input type="text" id="longitude" name="longitude" value="{{ settings.longitude if settings.longitude is not none else '' }}" placeholder="e.g. 13.40">
|
|
</div>
|
|
</div>
|
|
|
|
<button type="submit">Save</button>
|
|
</form>
|
|
{% endblock %}
|