-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
285 lines (279 loc) · 13.1 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
<!-- // -->
<!-- Check the code -->
<!-- https://github.com/gianpaj/walnut.tv -->
<!-- // -->
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>walnut.tv - Your dose of daily videos on AI, Crypto, Entrepreneurship, Reddit, Documentaries</title>
<meta
name="description"
content="Your dose of daily videos on AI, Crypto, Entrepreneurship, Reddit, Documentaries"
/>
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous"
/>
<link href="/css/all.css" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,300,700" rel="stylesheet" type="text/css" />
<meta property="og:image" content="https://walnut.tv/public/walnut.tv-og-image.png" />
<meta property="og:image:width" content="960" />
<meta property="og:image:height" content="480" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<meta name="msapplication-TileColor" content="#da532c" />
<meta name="theme-color" content="#ffffff" />
<meta property="og:url" content="https://walnut.tv/" />
<link rel="canonical" href="https://walnut.tv/" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Walnut" />
<meta name="twitter:card" content="app" />
<meta name="twitter:title" content=">walnut.tv" />
<meta
name="twitter:description"
content="Your dose of daily videos on AI, Crypto, Entrepreneurship, Reddit, Documentaries"
/>
<!-- Start Single Page Apps for GitHub Pages -->
<script type="text/javascript">
// Single Page Apps for GitHub Pages
// https://github.com/rafrex/spa-github-pages
// Copyright (c) 2016 Rafael Pedicini, licensed under the MIT License
// ----------------------------------------------------------------------
// This script checks to see if a redirect is present in the query string
// and converts it back into the correct url and adds it to the
// browser's history using window.history.replaceState(...),
// which won't cause the browser to attempt to load the new url.
// When the single page app is loaded further down in this file,
// the correct url will be waiting in the browser's history for
// the single page app to route accordingly.
(function (l) {
if (!l.search) return;
var q = {};
l.search
.slice(1)
.split('&')
.forEach(function (v) {
var a = v.split('=');
q[a[0]] = a.slice(1).join('=').replace(/~and~/g, '&');
});
if (q.p !== undefined) {
window.history.replaceState(
null,
null,
l.pathname.slice(0, -1) + (q.p || '') + (q.q ? '?' + q.q : '') + l.hash
);
}
})(window.location);
</script>
<!-- End Single Page Apps for GitHub Pages -->
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-LJ7B0PVNZL"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'G-LJ7B0PVNZL');
</script>
</head>
<body>
<div id="appVideo">
<div class="navbar navbar-inverse">
<div class="header-container">
<div class="navbar-header">
<a class="navbar-brand" href="/">
<img src="/img/walnut-logo.svg" class="walnut-logo" alt="Walnut.tv Logo" />
</a>
<div class="hide-mobile-landscape hide-desktop collapse-container">
<button
aria-expanded="false"
class="hide-mobile-landscape navbar-toggle collapsed"
data-toggle="collapse"
data-target="#navbar-collapse-1"
type="button"
>
<span class="sr-only">Toggle navigation</span>
<span>{{ channel }}</span>
</button>
<div class="navbar-collapse collapse" id="navbar-collapse-1">
<ul class="nav navbar-nav">
<li v-for="item in channels" v-bind:class="{ 'active': item.title == channel && !searchInput }">
<a v-on:click="changeChannel(item.title)">{{ item.title }}</a>
</li>
</ul>
</div>
</div>
<div class="hide-mobile-portrait mobile-navbar-portrait">
<ul class="nav navbar-nav">
<li v-for="item in channels" v-bind:class="{ 'active': item.title == channel && !searchInput }">
<a v-on:click="changeChannel(item.title)">{{ item.title }}</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div>
<div v-show="!loadingVideos">
<div class="container">
<div v-if="!mobile" class="sidebar hidden-sm hidden-xs">
<ul class="video-list list-unstyled pre-scrollable" id="toolbox">
<li class="video" v-for="video in videoList" track-by="$index" data-video-id="{{ $index }}" v-cloak>
<a v-on:click="play($index)" :class="{ active: videoPlaying == $index}" class="active">
<div class="video-thumbnail-image hidden-xs">
<span class="video-watched" v-if="hasBeenWatched(video.youtubeId)">WATCHED</span>
<img class="video-image" v-bind:src="video.youtubeId | toUrl" alt="{!! video.title !!}" />
</div>
<div class="video-title" :title="video.title" :class="{ watched: hasBeenWatched(video.youtubeId)}">
<h4>{!! video.title | maxChar !!}</h4>
</div>
</a>
</li>
</ul>
</div>
<div class="main-content">
<div id="video-container" class="video-container pre-scrollable">
<div class="embed-container">
<div class="videoPlayer">
<div id="player"></div>
</div>
</div>
<div class="video-details">
<a href="{{ playingVideo['permalink'] }}" target="_blank">
<h2 v-cloak>{!! playingVideo['title'] !!}</h2>
</a>
<!-- <div v-if="playingVideo['ups']">
<svg
alt="upvote"
title="upvote"
class="up-vote pull-right"
v-on:click="vote(playingVideo.id, 1)"
viewBox="0 0 292.362 292.362"
:class="{ active: voted == 1 }"
>
<g>
<path
d="M286.935,197.286L159.028,69.379c-3.613-3.617-7.895-5.424-12.847-5.424s-9.233,1.807-12.85,5.424L5.424,197.286
C1.807,200.9,0,205.184,0,210.132s1.807,9.233,5.424,12.847c3.621,3.617,7.902,5.428,12.85,5.428h255.813
c4.949,0,9.233-1.811,12.848-5.428c3.613-3.613,5.427-7.898,5.427-12.847S290.548,200.9,286.935,197.286z"
/>
</g>
</svg>
<svg
alt="downvote"
title="downvote"
class="down-vote pull-right"
v-on:click="vote(playingVideo.id, -1)"
viewBox="0 0 292.362 292.362"
:class="{ active: voted == -1 }"
>
<g>
<path
d="M286.935,197.286L159.028,69.379c-3.613-3.617-7.895-5.424-12.847-5.424s-9.233,1.807-12.85,5.424L5.424,197.286
C1.807,200.9,0,205.184,0,210.132s1.807,9.233,5.424,12.847c3.621,3.617,7.902,5.428,12.85,5.428h255.813
c4.949,0,9.233-1.811,12.848-5.428c3.613-3.613,5.427-7.898,5.427-12.847S290.548,200.9,286.935,197.286z"
/>
</g>
</svg>
<span v-if="voted" class="up-vote-num pull-right">{{ playingVideo['ups'] | shortNumber }}</span>
</div> -->
</div>
<div class="video-controls hide-desktop">
<svg
alt="previous"
title="previous"
class="prev-video pull-left"
v-on:click="prevVideo()"
viewBox="379 256 460 690"
>
<!-- :class="{ disabled: videoPlaying < videoList.length }" -->
<path fill="#484848" d="M 609 256 L 609 486 L 379 486 L 379 256 L 609 256 Z" bx:origin="0.5 0.5" />
<path fill="#565656" d="M 609 486 L 839 486 L 839 716 L 609 716 L 609 486 Z" />
<path fill="#3c3d3c" d="M 379 716 L 609 716 L 609 946 L 379 946 L 379 716 Z" />
</svg>
<svg
alt="next"
title="next"
class="next-video pull-right"
v-on:click="nextVideo()"
viewBox="379 256 460 690"
>
<!-- :class="{ disabled: videoPlaying >= videoList.length - 1 }" -->
<path fill="#484848" d="M 609 256 L 609 486 L 379 486 L 379 256 L 609 256 Z" bx:origin="0.5 0.5" />
<path fill="#565656" d="M 609 486 L 839 486 L 839 716 L 609 716 L 609 486 Z" />
<path fill="#3c3d3c" d="M 379 716 L 609 716 L 609 946 L 379 946 L 379 716 Z" />
</svg>
</div>
<div class="terms-container">
<a class="terms" target="_blank" href="https://telegra.ph/Terms-of-Use-10-20-2">Terms of Service</a>
<a class="terms" target="_blank" href="https://telegra.ph/Privacy-Policy-10-31-7">Privacy Policy</a>
<a class="terms" target="_blank" href="mailto:[email protected]">Contact Us</a>
</div>
</div>
</div>
</div>
</div>
<div v-else>
<div class="container" v-cloak>
<h2 class="loadingMessage">{!! videoMessage !!}</h2>
</div>
</div>
</div>
</div>
<div class="modal fade" id="shareModal" tabindex="-1" role="dialog" aria-labelledby="share modal">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-body">
<form class="form-inline">
<div class="form-group">
<textarea class="form-control" id="url-text" rows="1" readonly></textarea>
</div>
<button type="button" class="btn btn-primary">Copy</button>
</form>
</div>
</div>
</div>
</div>
<!-- <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/reddit.min.js"></script>
<script src="https://cdn.jsdelivr.net/vue/1.0.10/vue.min.js"></script> -->
<script src="https://cdn.jsdelivr.net/combine/npm/[email protected],npm/[email protected],npm/[email protected]/dist/vue.min.js,npm/[email protected],npm/[email protected],npm/[email protected]"></script>
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
crossorigin="anonymous"
></script>
<script src="https://apis.google.com/js/api.js"></script>
<script src="/channels.js"></script>
<script src="/js/all.js"></script>
<script type="module">
import { initializeApp } from 'https://www.gstatic.com/firebasejs/10.7.2/firebase-app.js';
import { getAnalytics } from 'https://www.gstatic.com/firebasejs/10.7.2/firebase-analytics.js';
// Your web app's Firebase configuration
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
const firebaseConfig = {
// sonarlint-ignore-next-line
apiKey: 'AIzaSyA1-GsxvQht3kdP_b7fD9fNWEd2m4RdPu8',
authDomain: 'ucutv-219215.firebaseapp.com',
databaseURL: 'https://ucutv-219215.firebaseio.com',
projectId: 'ucutv-219215',
storageBucket: 'ucutv-219215.appspot.com',
messagingSenderId: '467558405283',
appId: '1:467558405283:web:69f44f22258fde52ccdb16',
measurementId: 'G-Z6V9TW1R8F',
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
const analytics = getAnalytics(app);
</script>
</body>
</html>