Bugfix-Test-1
All checks were successful
release-tag / release-image (push) Successful in 1m57s

This commit is contained in:
2025-09-21 17:40:43 +02:00
parent 1d478f8803
commit 920da0a374
7 changed files with 18 additions and 22 deletions

View File

@@ -93,9 +93,11 @@ func main() {
http.Error(w, "upstream error", http.StatusBadGateway)
}
r.Handle("/static/*", http.StripPrefix("/static",
http.FileServer(http.FS(ui.FS)),
))
r.Handle("/static/*",
http.StripPrefix("/static",
http.FileServer(http.FS(ui.StaticFS)),
),
)
r.Handle("/hls/*", http.StripPrefix("/hls", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if strings.Contains(r.URL.Path, "..") {

View File

@@ -6,13 +6,14 @@
<title>Streams</title>
<link rel="preload" href="/static/fonts/inter-regular.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/static/fonts/inter-semibold.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/static/fonts/inter-extrabold.woff2" as="font" type="font/woff2" crossorigin>
<link rel="stylesheet" href="/static/fonts/inter.css">
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<div class="wrap">
<div class="title">
<h1 style="margin:0">🎬 Streams</h1>
<h1 class="title-no-margin">🎬 Streams</h1>
<div class="row">
<input id="filter" placeholder="Filter (z. B. stream1)">
<a href="/refresh" class="pill">Neu laden</a>

View File

@@ -15,3 +15,4 @@ video{width:100%;border-radius:12px;background:#000}
.meta{margin-top:10px;display:flex;gap:10px;align-items:center}
input{width:220px;padding:8px 10px;border-radius:10px;border:1px solid #36446c;background:#0f1530;color:#e6eaf2}
a{color:#90cdf4;text-decoration:none}
.title-no-margin { margin: 0; }

View File

@@ -1,15 +1,3 @@
@font-face {
font-family: 'Inter';
src: url('/static/fonts/inter-regular.woff2') format('woff2');
font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
font-family: 'Inter';
src: url('/static/fonts/inter-semibold.woff2') format('woff2');
font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
font-family: 'Inter';
src: url('/static/fonts/inter-extrabold.woff2') format('woff2');
font-weight: 800; font-style: normal; font-display: swap;
}
@font-face { font-family: 'Inter'; src: url('/static/fonts/inter-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/static/fonts/inter-semibold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/static/fonts/inter-extrabold.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }

View File

@@ -6,13 +6,14 @@
<title>{{.Name}}</title>
<link rel="preload" href="/static/fonts/inter-regular.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/static/fonts/inter-semibold.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/static/fonts/inter-extrabold.woff2" as="font" type="font/woff2" crossorigin>
<link rel="stylesheet" href="/static/fonts/inter.css">
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<div class="wrap">
<a href="/">← Zurück</a>
<h1 style="margin:8px 0">{{.Name}} <span id="live" class="pill off">Offline</span></h1>
<h1 class="title-no-margin">{{.Name}} <span id="live" class="pill off">Offline</span></h1>
<div class="card">
<video id="v" controls playsinline></video>
<div class="meta">
@@ -21,7 +22,7 @@
</div>
</div>
</div>
<script defer src="/static/vendor/hls.min.js"></script>
<script defer src="/static/js/hls.min.js"></script>
<script defer src="/static/js/stream.js"></script>
<script>window.__STREAM_NAME__={{.JSONName}};</script>
</body>

View File

@@ -3,5 +3,8 @@ package ui
import "embed"
//go:embed *.html
//go:embed static/**
var FS embed.FS
// Embed nur echte Dateien; keine leeren Ordner!
//go:embed static/**/*.js static/**/*.css static/**/*.woff2
var StaticFS embed.FS