diff options
Diffstat (limited to 'internal/web/templates/index.html')
| -rw-r--r-- | internal/web/templates/index.html | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/web/templates/index.html b/internal/web/templates/index.html index d3416e9..cd30208 100644 --- a/internal/web/templates/index.html +++ b/internal/web/templates/index.html @@ -78,6 +78,14 @@ <label class="mono-toggle"><input type="checkbox" {{if .Mono}}checked{{end}} onchange="document.body.classList.toggle('mono', this.checked)"> {{.L.Mono}}</label> + {{/* Download the current readings; the URL is built from the live control + values at click time so it always matches what's on screen. */}} + <span class="export">{{.L.Export}}: + <a href="#" onclick="location='/export?fmt=txt&'+new URLSearchParams(new FormData(document.getElementById('controls'))).toString();return false;">txt</a> + <a href="#" onclick="location='/export?fmt=md&'+new URLSearchParams(new FormData(document.getElementById('controls'))).toString();return false;">md</a> + <a href="#" onclick="location='/export?fmt=pdf&'+new URLSearchParams(new FormData(document.getElementById('controls'))).toString();return false;">pdf</a> + </span> + <div id="pane">{{.Reading}}</div> </div> |
