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
4
ui/nojs_templates/error.tmpl
Normal file
4
ui/nojs_templates/error.tmpl
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<h1>
|
||||
Une erreur inattendue s'est produite :
|
||||
{{ .errmsg }}
|
||||
</h1>
|
||||
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>
|
||||
18
ui/nojs_templates/single.tmpl
Normal file
18
ui/nojs_templates/single.tmpl
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr" class="d-flex flex-column mh-100 h-100">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="description" content="" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<meta name="theme-color" content="#ffffff"/>
|
||||
<link rel="apple-touch-icon" sizes="192x192" href="/img/apple-touch-icon.png">
|
||||
<meta name="author" content="nemucorp">
|
||||
<meta name="robots" content="none">
|
||||
<base href="/">
|
||||
</head>
|
||||
<body class="flex-fill d-flex flex-column">
|
||||
<div class="flex-fill d-flex flex-column justify-content-between" style="min-height: 100%">%sveltekit.body%</div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue