Bumped to v8
This commit is contained in:
parent
787009c621
commit
ff1c848c58
2
main.go
2
main.go
@ -26,7 +26,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
const VERSION = "v7"
|
||||
const VERSION = "v8"
|
||||
|
||||
var (
|
||||
logger *slog.Logger
|
||||
|
@ -5,6 +5,18 @@
|
||||
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
|
||||
{{ template "fonts" }}
|
||||
<link rel="stylesheet" type="text/css" href="/css/{{ .VERSION }}/main.css">
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.2.1/dist/chart.umd.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/luxon@3.3.0/build/global/luxon.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chartjs-adapter-luxon@1.3.1"></script>
|
||||
|
||||
<script type="importmap">
|
||||
{
|
||||
"imports": {
|
||||
"chart.js": "/js/{{ .VERSION }}/lib/chartjs/index.d.ts"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="layout">
|
||||
|
@ -2,8 +2,19 @@
|
||||
{{ $version := .VERSION }}
|
||||
<link rel="stylesheet" type="text/css" href="/css/{{ .VERSION }}/datapoints.css">
|
||||
|
||||
<script type="module" defer>
|
||||
import { DataGraph } from "/js/{{ .VERSION }}/datapoint_graph.mjs"
|
||||
const graph = new DataGraph({{ .Data.Datapoint }})
|
||||
graph.setData({{ .Data.Values }})
|
||||
graph.render('chart')
|
||||
</script>
|
||||
|
||||
{{ block "page_label" . }}{{end}}
|
||||
|
||||
<div>
|
||||
<canvas id="chart"></canvas>
|
||||
</div>
|
||||
|
||||
<div id="values">
|
||||
{{ range .Data.Values }}
|
||||
<div class="value">{{ format_time .Ts }}</div>
|
||||
|
Loading…
Reference in New Issue
Block a user