2020-03-21 13:34:37 +03:00
|
|
|
{{ define "content" }}
|
2019-06-26 22:02:31 +03:00
|
|
|
{{ $playing := .Playing }}
|
2020-03-28 11:13:49 +03:00
|
|
|
<div class="topnav" id="myTopnav">
|
2020-03-28 11:40:43 +03:00
|
|
|
<a href="javascript:void(0);" class="icon" onclick="myFunction()">
|
|
|
|
<i class="fa fa-cogs"></i>
|
|
|
|
</a>
|
2020-03-28 11:13:49 +03:00
|
|
|
<a {{ if eq $.Quality "" }}class="active"{{ end }} href="/v/{{ $playing.ID }}">fullHD</a>
|
|
|
|
<a {{ if eq $.Quality "720p" }}class="active"{{ end }} href="/v/{{ $playing.ID }}?quality=720p">720p</a>
|
|
|
|
<a {{ if eq $.Quality "480p" }}class="active"{{ end }} href="/v/{{ $playing.ID }}?quality=480p">480p</a>
|
|
|
|
<a {{ if eq $.Quality "360p" }}class="active"{{ end }} href="/v/{{ $playing.ID }}?quality=360p">360p</a>
|
|
|
|
<a {{ if eq $.Quality "240p" }}class="active"{{ end }} href="/v/{{ $playing.ID }}?quality=240p">240p</a>
|
2020-03-28 10:18:01 +03:00
|
|
|
</div>
|
2020-03-28 11:13:49 +03:00
|
|
|
|
2020-03-21 13:34:37 +03:00
|
|
|
<div id="player">
|
|
|
|
{{ if $playing.ID }}
|
2020-03-28 08:59:16 +03:00
|
|
|
<video id="video" controls preload="metadata" poster="/t/{{ $playing.ID}}">
|
|
|
|
<source src="/v/{{ $playing.ID }}.mp4?quality={{ $.Quality }}" type="video/mp4" />
|
|
|
|
</video>
|
2020-03-21 13:34:37 +03:00
|
|
|
<h1>{{ $playing.Title }}</h1>
|
2020-03-27 11:16:23 +03:00
|
|
|
<h2>{{ $playing.Views }} views • {{ $playing.Modified }}<br />{{ $playing.Size | bytes }}</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>
|
2020-03-27 14:50:19 +03:00
|
|
|
<li><a {{ if or (eq $.Sort "timestamp") (eq $.Sort "") }}class="active"{{ end }} href="?sort=timestamp">Recent</a></li>
|
|
|
|
<li><a {{ if eq $.Sort "views" }}class="active"{{ end }} href="?sort=views">Views</a></li>
|
2020-03-25 16:02:04 +03:00
|
|
|
</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-27 11:16:23 +03:00
|
|
|
<h2>{{ $m.Views }} views • {{ $m.Modified }}<br />{{ $m.Size | bytes }}</h2>
|
2020-03-21 13:34:37 +03:00
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2020-03-28 11:13:49 +03:00
|
|
|
{{ define "scripts" }}
|
|
|
|
<script type="application/javascript">
|
|
|
|
/* Toggle between adding and removing the "responsive" class to topnav when the user clicks on the icon */
|
|
|
|
function myFunction() {
|
|
|
|
var x = document.getElementById("myTopnav");
|
|
|
|
if (x.className === "topnav") {
|
|
|
|
x.className += " responsive";
|
|
|
|
} else {
|
|
|
|
x.className = "topnav";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
{{ end }}
|