From 29cfb766d679a222e33b7ba5621853027c59d501 Mon Sep 17 00:00:00 2001 From: ston1th Date: Sun, 20 Mar 2022 17:02:20 +0100 Subject: [PATCH] new html template --- pkg/srv/templates.go | 117 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 104 insertions(+), 13 deletions(-) diff --git a/pkg/srv/templates.go b/pkg/srv/templates.go index 958d769..b62827f 100644 --- a/pkg/srv/templates.go +++ b/pkg/srv/templates.go @@ -8,29 +8,120 @@ var ( index = template.Must(template.New("index").Parse(` +
-[v]: show video
-[n]: skip file caching
-[p]: preload file
-[s]: stop preloading
+[v]: show video         [p]: preload file
+[n]: skip file caching  [s]: stop preloading
   
- - + + + + + {{range $s := .Dirs -}} - + + + + + {{end -}} {{range $s := .Files -}} - - + + + + + {{end -}}
PathOptions
../[dir]
../[dir]
{{$s.Name}}[dir]
{{$s.Name}}[dir]
{{$s.Name}}[v] [n] [p] [s] {{if ne $s.Status -1}}{{$s.Status}}%{{end}}
{{$s.Name}} + {{if ge $s.Status 0}}{{$s.Status}}%{{end}}[v][n][p][s] +
+{{if ge $s.Status 0}} +
+{{end -}} +
@@ -39,7 +130,7 @@ var ( video = template.Must(template.New("video").Parse(` - +