31 lines
820 B
HTML
31 lines
820 B
HTML
|
{{ $title := (.Context).Value "title" }}
|
||
|
{{ $stations := (.Context).Value "streams" }}
|
||
|
{{ $sentry := (.Context).Value "sentry" }}
|
||
|
|
||
|
<!DOCTYPE html>
|
||
|
<html lang='en'>
|
||
|
<head>
|
||
|
<meta charset='utf-8'>
|
||
|
<meta name='description' content='oops'/>
|
||
|
<meta name='viewport' content='width=device-width,initial-scale=1'>
|
||
|
<link rel='stylesheet' type='text/css' href='/static/style.css'>
|
||
|
<title>{{ $title }}</title>
|
||
|
</head>
|
||
|
<body>
|
||
|
<header><h1>{{$title}}</h1></header>
|
||
|
<main>
|
||
|
<ul>
|
||
|
{{range $name, $stationUrl := $stations}}
|
||
|
{{ if gt (($sentry).GetStatus $stationUrl) 400 }}
|
||
|
<li class="offline"><a href="#">{{$name}}</a></li>
|
||
|
{{else}}
|
||
|
<li class="online"><a href="{{$stationUrl}}" target="_blank">{{$name}}</a></li>
|
||
|
{{end}}
|
||
|
{{end}}
|
||
|
</ul>
|
||
|
</main>
|
||
|
</body>
|
||
|
</head>
|
||
|
</html>
|
||
|
|