Fix sort persistance

This commit is contained in:
James Mills 2020-03-28 22:29:13 +10:00
parent 6c50fb31e0
commit 592d811d5d
No known key found for this signature in database
GPG key ID: AC4C014F1440EBD6
2 changed files with 103 additions and 103 deletions

File diff suppressed because one or more lines are too long

View file

@ -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}}