31 lines
1.1 KiB
HTML
31 lines
1.1 KiB
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='internet radio'/>
|
|
<meta name='viewport' content='width=device-width,initial-scale=1'>
|
|
<link rel='stylesheet' type='text/css' href='/static/style.css?v=20241030.01'>
|
|
<link rel='shortcut icon' href='/static/favicon.png'>
|
|
<title>{{ $title }}</title>
|
|
</head>
|
|
<body>
|
|
<header><h1>{{$title}}</h1></header>
|
|
<main>
|
|
<ul>
|
|
{{range $name, $stationUrl := $stations}}
|
|
{{ if gt (($sentry).GetStatus $stationUrl) 399 }}
|
|
<li class="offline"><span class="station">{{$name}} (offline)</span><a class="stationurl" href="{{$stationUrl}}" target="_blank">{{$stationUrl}}</a></li>
|
|
{{else}}
|
|
<li class="online"><a class="station" href="{{$stationUrl}}" target="_blank">{{$name}}</a><a class="stationurl" href="{{$stationUrl}}" target="_blank">{{$stationUrl}}</a></li>
|
|
{{end}}
|
|
{{end}}
|
|
</ul>
|
|
</main>
|
|
</body>
|
|
</head>
|
|
</html>
|
|
|