82 lines
2.0 KiB
Cheetah
82 lines
2.0 KiB
Cheetah
<h1 style="margin-bottom: 0">
|
|
Prochain réveil le :
|
|
{{ if .noAlarm}}
|
|
aucun défini
|
|
{{ else }}
|
|
{{ if .sameDay }}
|
|
aujourd'hui
|
|
{{ else if lt .nCycles 16 }}
|
|
demain
|
|
{{ else }}
|
|
{{ .nextAlarmDate }}
|
|
{{ end }}
|
|
à {{ .nextAlarmTime }}
|
|
{{ end }}
|
|
</h1>
|
|
{{ if not .noAlarm }}
|
|
<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>
|
|
{{ end }}
|
|
|
|
<div style="display: flex; gap: 10px;">
|
|
{{ if not .noAlarm }}
|
|
<form method="post" action="/nojs.html">
|
|
<input type="hidden" name="action" value="cancel">
|
|
<button type="submit">
|
|
Annuler la prochaine alarme
|
|
</button>
|
|
</form>
|
|
{{ end }}
|
|
|
|
{{ 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="text" required name="time" placeholder="00:00" value="{{ .defaultAlarm }}">
|
|
<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>
|