diff options
| author | davy <davy.wybiral@gmail.com> | 2019-06-26 14:02:31 -0500 |
|---|---|---|
| committer | davy <davy.wybiral@gmail.com> | 2019-06-26 14:02:31 -0500 |
| commit | e1090a7583cfbb75fa03eb56d2b26d68732282cf (patch) | |
| tree | 624e842a7a61b76330f8381c519f8e6e37a942a0 /templates/index.html | |
| parent | a946d2b96618ff3d49364d272cb637af19e6d54e (diff) | |
import code
Diffstat (limited to 'templates/index.html')
| -rw-r--r-- | templates/index.html | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..60b20bb --- /dev/null +++ b/templates/index.html @@ -0,0 +1,36 @@ +{{ $playing := .Playing }}
+<html>
+<head>
+ <title>Tube</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="shortcut icon" type="image/x-icon" href="/static/favicon.ico">
+ <link rel="stylesheet" type="text/css" href="/static/css/index.css">
+</head>
+<body>
+ <nav><a href="/">Tube</a></nav>
+ <main>
+ <div id="player">
+ <video id="video" controls poster="/t/{{ $playing.ID}}" src="/v/{{ $playing.ID }}.mp4"></video>
+ <h1>{{ $playing.Title }}</h1>
+ <h2>{{ $playing.Modified }}</h2>
+ <p>{{ $playing.Description }}</p>
+ </div>
+ <div id="sidebar">
+ {{ range $m := .Playlist }}
+ {{ if eq $m.ID $playing.ID }}
+ <a href="/{{ $m.ID }}" class="playing">
+ {{ else }}
+ <a href="/{{ $m.ID }}">
+ {{ end }}
+ <img src="/t/{{ $m.ID }}">
+ <div>
+ <h1>{{ $m.Title }}</h1>
+ <h2>{{ $m.Modified }}</h2>
+ </div>
+ </a>
+ {{ end }}
+ </div>
+ </main>
+</body>
+</html>
|
