2020-03-21 13:34:37 +03:00
|
|
|
{{ define "content" }}
|
2019-06-26 22:02:31 +03:00
|
|
|
{{ $playing := .Playing }}
|
2020-03-21 13:34:37 +03:00
|
|
|
<div id="player">
|
|
|
|
{{ if $playing.ID }}
|
|
|
|
<video id="video" controls poster="/t/{{ $playing.ID}}" src="/v/{{ $playing.ID }}.mp4"></video>
|
|
|
|
<h1>{{ $playing.Title }}</h1>
|
2020-03-25 05:40:00 +03:00
|
|
|
<h2>{{ $playing.Views }} views • {{ $playing.Modified }}</h2>
|
2020-03-21 13:34:37 +03:00
|
|
|
<p>{{ $playing.Description }}</p>
|
|
|
|
{{ else }}
|
|
|
|
<video id="video" controls></video>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
<div id="playlist">
|
2020-03-25 16:02:04 +03:00
|
|
|
<div class="nav">
|
|
|
|
<ul>
|
|
|
|
<li><a {{ if eq $.Sort "views" }}class="active"{{ end }}href="?sort=views">Trending</a></li>
|
|
|
|
<li><a {{ if eq $.Sort "timestamp" }}class="active"{{ end }}href="?sort=timestamp">Recent</a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2020-03-21 13:34:37 +03:00
|
|
|
{{ 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>
|
2020-03-25 09:01:29 +03:00
|
|
|
<h2>{{ $m.Views }} views • {{ $m.Modified }}</h2>
|
2020-03-21 13:34:37 +03:00
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
{{end}}
|