diff options
| author | James Mills <prologic@shortcircuit.net.au> | 2020-03-28 22:29:13 +1000 |
|---|---|---|
| committer | James Mills <prologic@shortcircuit.net.au> | 2020-03-28 22:29:13 +1000 |
| commit | 592d811d5dc4fa58dadb367a7729caa64f2a3d96 (patch) | |
| tree | 2697f9694edf28582123687a6224ba1e86f91ef1 /templates | |
| parent | 6c50fb31e077284e0822991c318aa3fd1fa878a6 (diff) | |
Fix sort persistance
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/index.html | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/templates/index.html b/templates/index.html index 820c9db..525710c 100644 --- a/templates/index.html +++ b/templates/index.html @@ -31,17 +31,17 @@ </ul>
</div>
{{ range $m := .Playlist }}
- {{ if eq $m.ID $playing.ID }}
- <a href="/v/{{ $m.ID }}" class="playing">
- {{ else }}
- <a href="/v/{{ $m.ID }}">
- {{ end }}
- <img src="/t/{{ $m.ID }}">
- <div>
- <h1>{{ $m.Title }}</h1>
- <h2>{{ $m.Views }} views • {{ $m.Modified }}<br />{{ $m.Size | bytes }}</h2>
- </div>
- </a>
+ {{ if eq $m.ID $playing.ID }}
+ <a href="/v/{{ $m.ID }}?sort={{ $.Sort }}" class="playing">
+ {{ else }}
+ <a href="/v/{{ $m.ID }}?sort={{ $.Sort }}">
+ {{ end }}
+ <img src="/t/{{ $m.ID }}">
+ <div>
+ <h1>{{ $m.Title }}</h1>
+ <h2>{{ $m.Views }} views • {{ $m.Modified }}<br />{{ $m.Size | bytes }}</h2>
+ </div>
+ </a>
{{ end }}
</div>
{{end}}
|
