major refactoring
This commit is contained in:
parent
91aa8371e9
commit
78b5e5f796
14 changed files with 712 additions and 576 deletions
30
pkg/srv/templates/cache.html
Normal file
30
pkg/srv/templates/cache.html
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{{define "body" -}}
|
||||
<pre>[v]: show video</pre>
|
||||
<table>
|
||||
<tr class="listitem">
|
||||
<td class="listpath up"><a href="../">../</a></td>
|
||||
<td class="listoptions">[dir]</td>
|
||||
</tr>
|
||||
<tr class="spacer"><td colspan="2"></td></tr>
|
||||
{{range $s := .Dirs -}}
|
||||
<tr class="listitem">
|
||||
<td class="listpath"><a href="{{$s.URI}}">{{$s.Name}}</a></td>
|
||||
<td class="listoptions">[dir]</td>
|
||||
</tr>
|
||||
<tr class="spacer"><td colspan="2"></td></tr>
|
||||
{{end -}}
|
||||
{{range $s := .Files -}}
|
||||
<tr class="listitem">
|
||||
<td class="listpath"><a id="{{$s.Anchor}}" href="{{$s.URI}}">{{$s.Name}}</a></td>
|
||||
<td class="listoptions">
|
||||
{{if ge $s.Status 0}}<span>{{$s.Status}}%</span>{{end}}<a href="{{$s.URI}}?o=v">[v]</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="spacer"><td colspan="2">
|
||||
{{if ge $s.Status 0 -}}
|
||||
<div class="spacer {{if le $s.Status 35}}red{{else if le $s.Status 65}}yellow{{else}}green{{end}}" style="width: {{$s.Status}}%;"></div>
|
||||
{{end -}}
|
||||
</td></tr>
|
||||
{{end -}}
|
||||
</table>
|
||||
{{end -}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue