Create a basic HTML page to permit usage of non-JS devices
This commit is contained in:
parent
fa13484718
commit
7df46e03e0
7 changed files with 236 additions and 0 deletions
73
ui/nojs_templates/index.tmpl
Normal file
73
ui/nojs_templates/index.tmpl
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
<h1 style="margin-bottom: 0">
|
||||
Prochain réveil le :
|
||||
{{ if .sameDay }}
|
||||
aujourd'hui
|
||||
{{ else if lt .nCycles 16 }}
|
||||
demain
|
||||
{{ else }}
|
||||
{{ .nextAlarmDate }}
|
||||
{{ end }}
|
||||
à {{ .nextAlarmTime }}
|
||||
</h1>
|
||||
<h2 style="color: gray; margin-top: 0; margin-left: 5em">
|
||||
{{ if gt .nDays 2 }}(dans {{ .nDays }} jours){{ else }}(dans {{ .nCycles }} cycles + {{ .nMinutes }} min){{ end }}
|
||||
</h2>
|
||||
|
||||
<div style="display: flex; gap: 10px;">
|
||||
<form method="post" action="/nojs.html">
|
||||
<input type="hidden" name="action" value="cancel">
|
||||
<button type="submit">
|
||||
Annuler la prochaine alarme
|
||||
</button>
|
||||
</form>
|
||||
|
||||
{{ if .isPlaying }}
|
||||
<form method="post" action="/nojs.html">
|
||||
<input type="hidden" name="action" value="stop">
|
||||
<button type="submit">
|
||||
Arrêter le réveil
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<form method="post" action="/nojs.html">
|
||||
<input type="hidden" name="action" value="nexttrack">
|
||||
<button type="submit">
|
||||
Prochaine musique
|
||||
</button>
|
||||
</form>
|
||||
{{ else }}
|
||||
<form method="post" action="/nojs.html">
|
||||
<input type="hidden" name="action" value="start">
|
||||
<button type="submit">
|
||||
Lancer le réveil
|
||||
</button>
|
||||
</form>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<h3>Programmer une nouvelle alarme</h3>
|
||||
<div style="display: flex; gap: 10px;">
|
||||
<form method="post" action="/nojs.html">
|
||||
<input type="hidden" name="action" value="new">
|
||||
<input type="time" required name="time">
|
||||
<button type="submit">
|
||||
Nouvelle alarme
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<form method="post" action="/nojs.html">
|
||||
<input type="hidden" name="action" value="new">
|
||||
<input type="hidden" name="time" value="5c">
|
||||
<button type="submit">
|
||||
+ 5 cycles
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<form method="post" action="/nojs.html">
|
||||
<input type="hidden" name="action" value="new">
|
||||
<input type="hidden" name="time" value="6c">
|
||||
<button type="submit">
|
||||
+ 6 cycles
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue