diff --git a/cmd/dashboard/main.go b/cmd/dashboard/main.go index dac880b..548e85f 100644 --- a/cmd/dashboard/main.go +++ b/cmd/dashboard/main.go @@ -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, "..") { diff --git a/internal/ui/index.html b/internal/ui/index.html index 4ff41ac..0ae0bcc 100644 --- a/internal/ui/index.html +++ b/internal/ui/index.html @@ -6,13 +6,14 @@ Streams +
-

🎬 Streams

+

🎬 Streams

Neu laden diff --git a/internal/ui/static/css/style.css b/internal/ui/static/css/style.css index 69f1e50..a6ac811 100644 --- a/internal/ui/static/css/style.css +++ b/internal/ui/static/css/style.css @@ -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; } \ No newline at end of file diff --git a/internal/ui/static/fonts/inter.css b/internal/ui/static/fonts/inter.css index 2d9afeb..6157a40 100644 --- a/internal/ui/static/fonts/inter.css +++ b/internal/ui/static/fonts/inter.css @@ -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; } diff --git a/internal/ui/static/vendor/hls.min.js b/internal/ui/static/js/hls.min.js similarity index 100% rename from internal/ui/static/vendor/hls.min.js rename to internal/ui/static/js/hls.min.js diff --git a/internal/ui/stream.html b/internal/ui/stream.html index 6992ac2..f0f7006 100644 --- a/internal/ui/stream.html +++ b/internal/ui/stream.html @@ -6,13 +6,14 @@ {{.Name}} +
← Zurück -

{{.Name}} Offline

+

{{.Name}} Offline

@@ -21,7 +22,7 @@
- + diff --git a/internal/ui/templates.go b/internal/ui/templates.go index 67274fc..4193c62 100644 --- a/internal/ui/templates.go +++ b/internal/ui/templates.go @@ -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