all repos — fixyoutube-go @ 29d827408340269e64205c65fe96873275948e65

A better way to embed YouTube videos everywhere (inspired by FixTweet).

templates/video.html (view raw)

 1<!doctype html>
 2<!--
 3    ███████ ██ ██   ██ ██    ██   ███   ██   ██ ██████ ██   ██ ██████  ███████ 
 4    ██      ██  ██ ██   ██  ██  ██   ██ ██   ██   ██   ██   ██ ██   ██ ██      
 5    █████   ██   ███     ████   ██   ██ ██   ██   ██   ██   ██ ██████  █████   
 6    ██      ██  ██ ██     ██    ██   ██ ██   ██   ██   ██   ██ ██   ██ ██      
 7    ██      ██ ██   ██    ██      ███     ███     ██     ███   ██████  ███████ 
 8    ██
 9    ██  A better way to embed YouTube videos on Telegram (inspired by FixTweet).
10    ██  
11-->
12<html lang="en">
13
14<head>
15    <meta charset="utf-8">
16    <meta name="viewport" content="width=device-width, initial-scale=1">
17    <title>{{ .Title }} - GoPipe</title>
18    <link rel="canonical" href="https://www.youtube.com/watch?v={{ .VideoId }}" />
19    <meta property="og:url" content="https://www.youtube.com/watch?v={{ .VideoId }}" />
20    <meta property="theme-color" content="0000FF" />
21    <meta property="twitter:card" content="player" />
22    <meta property="twitter:site" content="{{ .Uploader }}" />
23    <meta property="twitter:creator" content="{{ .Uploader }}" />
24    <meta property="twitter:title" content="{{ .Title }}" />
25    <meta property="og:title" content="{{ .Title }}" />
26    <meta property="og:description" content="{{ .Description }}" />
27    <meta property="og:site_name" content="GoPipe ({{ .Uploader }})" />
28    <meta property="twitter:image" content="{{ .Thumbnail }}" />
29    <meta property="twitter:player:stream:content_type" content="video/mp4" />
30    {{ if .Url }}
31    <meta property="og:video" content="{{ .Url }}" />
32    <meta property="og:video:secure_url" content="{{ .Url }}" />
33    <meta property="og:video:duration" content="{{ .Duration }}">
34    <meta property="og:video:type" content="video/mp4" />
35    {{ end }}
36    <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text fill=%22white%22 y=%22.9em%22 font-size=%2290%22>🛠</text></svg>">
37    <link rel="stylesheet" href="https://unpkg.com/@picocss/pico@latest/css/pico.min.css">
38</head>
39
40<body>
41    <main class="container" style="max-width: 35rem">
42        <video style="width: 100%" autoplay controls>
43            <source src="{{ .Url }}" type="video/mp4" />
44        </video>
45        <h2>{{ .Title }}</h2>
46        <h3>&gt; {{ .Uploader }}</h3>
47        <pre style="white-space: pre-wrap">{{ .Description }}</pre>
48        <a href="https://www.youtube.com/watch?v={{ .VideoId }}">Watch on YouTube</a>
49        <br />
50        <a href="/">What is this?</a>
51        <hr>
52        <section>
53            <small>
54                <a href="https://github.com/birabittoh/fixyoutube-go" target="_blank">Source code</a>
55            </small>
56            <br />
57            <small>• YouTube is a trademark of Google LLC. This app is not affiliated with Google LLC.</small>
58        </section>
59    </main>
60</body>
61
62</html>