added 'head' tag to base.html, moved stream.js import there for stream.html

This commit is contained in:
BroodjeAap 2020-07-12 14:44:58 +00:00
parent 1a4f3e8227
commit 9707f46259
2 changed files with 4 additions and 2 deletions

View file

@ -4,7 +4,7 @@
<title>StreamWatcher</title>
<link rel="stylesheet" href="https://unpkg.com/purecss@2.0.3/build/pure-min.css" integrity="sha384-cg6SkqEOCV1NbJoCu11+bm0NvBRc8IYLRGXkmNrqUBfTjmMYwNKPWBTIKyw9mHNJ" crossorigin="anonymous">
<link rel="stylesheet" href="/static/css/style.css">
<script src="/static/js/stream.js"></script>
{{ template "head" .}}
</head>
<body>
{{template "content" .}}

View file

@ -1,4 +1,7 @@
{{template "base" .}}
{{define "head"}}
<script src="/static/js/stream.js"></script>
{{end}}
{{define "content"}}
<div>
<canvas id="canvas" width="1280" height="720">Not supported</canvas>
@ -37,7 +40,6 @@
<td>{{ $watchArea.Area.Max.X }}</td>
<td>{{ $watchArea.Area.Max.Y }}</td>
</tr>
{{end}}
</table>
{{end}}