1
0
Fork 0
mirror of https://codeberg.org/ashley/poke.git synced 2024-11-17 09:34:41 -05:00
poke/html/lite.ejs

606 lines
20 KiB
Text
Raw Normal View History

2022-11-30 13:48:15 -05:00
<% if (!isMobile) { %>
<!--
This Source Code Form is subject to the terms of the GNU General Public License:
2023-10-06 17:55:46 -04:00
Copyright (C) 2021-2023 POKETUBE (https://codeberg.org/Ashley/poketube)
2022-11-30 13:48:15 -05:00
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see https://www.gnu.org/licenses/.
-->
<!DOCTYPE html>
2023-11-16 13:12:17 -05:00
<html class="poketube_desktop_player" version="browser_web_lite" style="background: #000;">
2022-11-30 13:48:15 -05:00
<head>
<% if (e === false) { %>
<!-- MetaTag disabled -->
<% } %>
<% if (!e) { %>
2023-04-24 10:53:33 -04:00
<meta content="<%=inv_vid.title%>" name=title>
2022-11-30 13:48:15 -05:00
<meta content="<%=color%>" name="theme-color">
2023-04-24 10:53:33 -04:00
<meta content="<%=k.Video.Channel.Name%>" name=twitter:author>
2022-11-30 13:48:15 -05:00
<meta content=@youtube name=twitter:site>
2023-04-24 10:53:33 -04:00
<meta content="https://poketube.fun/lite?v=<%=inv_vid.videoId%>" name=twitter:url>
2023-11-16 13:16:18 -05:00
<meta content="<%=inv_vid.title%> - Lite " name=twitter:title>
<meta content="Watch this video by <%=k.Video.Channel.Name%> On Lite! Save Your Bandwidth while protecting your privacy!" property=twitter:description>
2023-04-24 10:53:33 -04:00
<meta content="https://i.ytimg.com/vi/<%=inv_vid.videoId%>/maxresdefault.jpg" property=og:image>
2022-11-30 13:48:15 -05:00
<meta content=summary_large_image name=twitter:card>
2023-04-24 10:53:33 -04:00
<link href="https://poketube.fun/lite?v=<%=inv_vid.videoId%>" itemprop=url>
<link href="http://www.youtube.com/channel/<%=k.Video.Channel.id%>" itemprop=url>
2022-11-30 13:48:15 -05:00
<% } %> <!-- close the } -->
<link href="/css/yt-ukraine.svg" rel=icon>
2023-11-16 13:12:17 -05:00
<title> <%=inv_vid.title%> | Lite </title>
2022-11-30 13:48:15 -05:00
<style>
.comments-area {
background: #f1f9ff;
padding: 50px 30px;
margin-top: 50px;
}
@media (max-width: 414px) {
.comments-area {
padding: 50px 8px;
}
}
div{
2023-02-01 15:19:39 -05:00
font-family:ubuntu !important;
2022-11-30 13:48:15 -05:00
border-style:none !important;
border-radius:15px !important
}
.video-info-panel.gradient {
background: none !important;
}
.comments-area h4 {
text-align: center;
margin-bottom: 50px;
color: #002347;
font-size: 18px;
}
.comments-area h5 {
font-size: 16px;
margin-bottom: 0px;
}
.comments-area a {
color: #002347;
}
.comments-area .comment-list {
padding-bottom: 30px;
}
.comments-area .comment-list:last-child {
padding-bottom: 0px;
}
.comments-area .comment-list.left-padding {
padding-left: 25px;
}
@media (max-width: 413px) {
.comments-area .comment-list .single-comment h5 {
font-size: 12px;
}
.comments-area .comment-list .single-comment .date {
font-size: 11px;
}
.comments-area .comment-list .single-comment .comment {
font-size: 10px;
}
}
.comments-area .thumb {
margin-right: 20px;
}
.comments-area .date {
font-size: 13px;
color: #777777;
margin-bottom: 13px;
}
.comments-area .comment {
color: #777777;
margin-bottom: 0px;
}
.comments-area .btn-reply {
background-color: #fff;
color: #002347;
border: 1px solid #eee;
padding: 2px 18px;
font-size: 12px;
display: block;
font-weight: 600;
-webkit-transition: all 0.3s ease 0s;
-moz-transition: all 0.3s ease 0s;
-o-transition: all 0.3s ease 0s;
transition: all 0.3s ease 0s;
}
.comments-area .btn-reply:hover {
background: #fdc632;
color: #002347;
}
.comment-form {
background: #f1f9ff;
text-align: center;
padding: 47px 30px 43px;
margin-top: 50px;
margin-bottom: 40px;
}
.comment-form h4 {
text-align: center;
margin-bottom: 50px;
font-size: 18px;
line-height: 22px;
color: #002347;
}
.comment-form .name {
padding-left: 0px;
}
@media (max-width: 767px) {
.comment-form .name {
padding-right: 0px;
margin-bottom: 1rem;
}
}
.comment-form .email {
padding-right: 0px;
}
@media (max-width: 991px) {
.comment-form .email {
padding-left: 0px;
}
}
.comment-form .form-control {
padding: 8px 20px;
background: #fff;
border: none;
border-radius: 0px;
width: 100%;
font-size: 14px;
color: #777777;
border: 1px solid transparent;
}
.comment-form .form-control:focus {
box-shadow: none;
border: 1px solid #eee;
}
.comment-form textarea.form-control {
height: 140px;
resize: none;
}
.comment-form ::-webkit-input-placeholder {
/* Chrome/Opera/Safari */
font-size: 15px;
color: #777;
}
.comment-form ::-moz-placeholder {
/* Firefox 19+ */
font-size: 15px;
color: #777;
}
.comment-form :-ms-input-placeholder {
/* IE 10+ */
font-size: 15px;
color: #777;
}
.comment-form :-moz-placeholder {
/* Firefox 18- */
font-size: 15px;
color: #777;
}
.description{
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
white-space: pre-wrap; /* css-3 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
white-space: -webkit-pre-wrap; /* Newer versions of Chrome/Safari*/
word-break: break-all;
white-space: normal;
}
.desc {
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
white-space: pre-wrap; /* css-3 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
white-space: -webkit-pre-wrap; /* Newer versions of Chrome/Safari*/
word-break: break-all;
white-space: normal;
}
2023-11-16 12:59:10 -05:00
<% if (lightOrDark(color) == "light") { %>
.player.video-ambient-container {
box-shadow: 0 -8px 5.9em <%=color%>;
}
<% } %>
<% if (lightOrDark(color) == "dark") { %>
.player.video-ambient-container {
box-shadow: 0 -8px 5.9em <%=color2%>;
}
<% } %>
2023-11-16 13:00:53 -05:00
</style>
2022-11-30 13:48:15 -05:00
<link href=/css/app-cdn.min.css rel=stylesheet>
2023-12-14 13:45:30 -05:00
<link href=/css/app.main.css?v=45 rel=stylesheet>
2023-12-14 14:18:48 -05:00
<link href="/css/watch.main.css?v=564" rel=stylesheet>
2022-11-30 13:48:15 -05:00
<link href="/css/watch-util.css" rel=stylesheet>
2023-12-04 13:44:15 -05:00
<link href="/css/watch-navbar.css?v=56" rel=stylesheet>
2022-11-30 13:48:15 -05:00
<link href="/css/poketube.css?v=56" rel=stylesheet>
2023-02-01 15:19:39 -05:00
2022-11-30 13:48:15 -05:00
<!-- ICONS -->
<link href=https://p.poketube.fun/https://site-assets.fontawesome.com/releases/v6.1.1/css/all.css rel=stylesheet>
<link href=https://p.poketube.fun/https://unpkg.com/ionicons@4.5.10-0/dist/css/ionicons.css rel=stylesheet>
</head>
<body>
2023-04-24 12:54:22 -04:00
<div class="app" style="color:#fff;border-radius: 0em !important;">
2022-11-30 13:48:15 -05:00
2023-11-16 13:12:17 -05:00
<nav style="position: sticky;">
2022-11-30 13:48:15 -05:00
<div class=left>
2023-11-16 13:16:18 -05:00
<a class="class" href="/143" style=font-family:Inter,sans-serif;color:#fff> <img style="transform: scale(1.0);padding-left:0;width: 7.5em;display: block;margin-left: auto;margin-right: auto;" src="/css/logo-poke.svg?v=5"></a>
2022-11-30 13:48:15 -05:00
</div>
<div class="middle">
<form action="/search"><input class="search-bar" autocomplete="on" id="fname" name="query" style="color:#fff;font-family:Inter,sans-serif;border-radius: 2em;" data-ddg-inputtype="identities.firstName">
<button class="btn btn-success" type="submit" style="transform: translate(21em, -1.25em);"><i class="fa-light fa-search"></i></button>
</form>
</div>
<div class="right">
<a href="/privacy" style="text-decoration: none;" title="Privacy Policy">
<i style="display: block;margin-left: auto;margin-right: auto;" class="fa-light fa-shield"></i>
</a>
<a href="/video/upload" style="text-decoration: none;" title="Upload Video">
<i style="display: block;margin-left: auto;margin-right: auto;" class="fa-light fa-video"></i>
</a>
</div>
</nav>
<div class="watch-page">
<div class="primary">
2023-11-16 13:02:22 -05:00
<div class="video-player-container">
2022-11-30 13:48:15 -05:00
2023-11-16 13:02:22 -05:00
<video class="player video-ambient-container" id="<%=sha384(inv_vid.videoId)%>" style="border-radius: 7px;margin-left: -5.5px;" autoplay controls
2022-11-30 13:48:15 -05:00
2023-04-24 10:53:33 -04:00
poster="https://p.poketube.fun/https://i.ytimg.com/vi/<%=inv_vid.videoId%>/maxresdefault.jpg?v=607ddcd4">
2023-05-18 09:48:28 -04:00
2023-10-21 05:35:43 -04:00
<% if (!qua) { %>
2023-05-18 09:48:28 -04:00
<% if (isvidious) { %>
2023-04-28 13:47:53 -04:00
<source src="<%=u%>/latest_version?id=<%=inv_vid.videoId%>&itag=18&local=true" type="video/mp4; codecs=&quot;avc1.64001F, mp4a.40.2&quot;" label="sd360" selected="true">
2022-11-30 13:48:15 -05:00
2023-05-18 09:48:28 -04:00
<% } %>
<% if (!isvidious) { %>
<source src="https://tube.kuylar.dev/proxy/media/<%=inv_vid.videoId%>/18" type="video/mp4; codecs=&quot;avc1.64001F, mp4a.40.2&quot;" label="sd360" selected="true">
<% } %>
2023-10-21 05:35:43 -04:00
<% } %>
<% if (qua) { %>
<% if (isvidious) { %>
2023-04-28 13:47:53 -04:00
2023-10-21 05:35:43 -04:00
<source src="<%=u%>/latest_version?id=<%=inv_vid.videoId%>&itag=22&local=true" type="video/mp4; codecs=&quot;avc1.64001F, mp4a.40.2&quot;" label="sd360" selected="true">
<% } %>
<% if (!isvidious) { %>
<source src="https://tube.kuylar.dev/proxy/media/<%=inv_vid.videoId%>/22" type="video/mp4; codecs=&quot;avc1.64001F, mp4a.40.2&quot;" label="sd360" selected="true">
<% } %>
<% } %>
2022-11-30 13:48:15 -05:00
2023-04-24 10:53:33 -04:00
<% if ( video?.Subtitles?.Subtitle) { %>
2022-11-30 13:48:15 -05:00
2023-04-24 10:53:33 -04:00
<% if (Array.isArray( video?.Subtitles?.Subtitle)) { %>
2022-11-30 13:48:15 -05:00
<% video.Subtitles.Subtitle.forEach(x => { %>
2023-04-24 10:53:33 -04:00
<track src="/api/subtitles?v=<%=inv_vid.videoId%>&h=<%= x.language %>" label="<%= x.language.replace("United States","Simplified - USA") %>" kind="subtitles">
2022-11-30 13:48:15 -05:00
2023-12-04 13:44:15 -05:00
<% }) %>
2022-11-30 13:48:15 -05:00
<% } %>
<% if (!Array.isArray( video.Subtitles.Subtitle)) { %>
2023-04-24 10:53:33 -04:00
<track src="/api/subtitles?v=<%=inv_vid.videoId%>&h=<%= video.Subtitles.Subtitle.language %>" label="<%= video.Subtitles.Subtitle.language.replace("United States","Simplified - USA") %>" kind="subtitles">
2022-11-30 13:48:15 -05:00
2023-12-04 13:44:15 -05:00
2022-11-30 13:48:15 -05:00
<% } %>
<% } %>
</video>
<div style="display: flex;justify-content: center;align-items: center;flex-direction: row; column-gap: 3px;" align="center">
</div>
</div>
<br>
2023-10-20 13:47:53 -04:00
<div class="video-info" style="border-radius:0em !important;">
2023-04-24 10:53:33 -04:00
<div class="video-info-panel" style="border-radius:0em !important;">
2023-10-20 13:47:53 -04:00
<div class="video-title" style="font-family:Inter;font-weight:bold;line-break: auto;max-width: max-content;margin: 0;margin-bottom: 0;padding: 0;border-radius: 0px !important;" title="<%=inv_vid.title%>"><%=inv_vid.title%> </div>
2022-11-30 13:48:15 -05:00
2023-10-21 05:35:43 -04:00
<a style="font-weight: bolder;font-family: sans-serif;color: #fff;font-size: small;"> <%= date %> - <%=convert(engagement.viewCount)%> Views - By <%=k.Video.Channel.Name%></a>
2022-11-30 13:48:15 -05:00
<div>
<div class="video-info-buttons pill" >
<div style="margin-top: -3em;display: flex;">
<div style="text-align: center;font-size: x-large;margin: 9px;">
<p>
<%=convert(engagement.likes)%>
<br>
</p><p style="font-size: 17px;margin-top: -2em;">Likes</p>
</p>
</div>
<div style="text-align: center;font-size: x-large;margin: 9px;">
<p>
<%=convert(engagement.dislikes)%>
<br>
</p><p style="font-size: 17px;margin-top: -2em;">Dislikes</p>
</p>
</div>
2023-10-21 05:35:43 -04:00
<a href="/download?v=<%=inv_vid.videoId%>" style="text-align: center;font-size: x-large;margin: 9px;">
2022-11-30 13:48:15 -05:00
<p>
<i class="fa-light fa-download"></i>
<br>
</p><p style="font-size: 17px;margin-top: -2em;">Download</p>
</p>
</a>
</div>
</div>
</div>
</div>
2023-10-21 05:51:29 -04:00
<div class="video-sub-info description" style="background: #333;padding: 10px;border-radius: 21px !important;margin-left: -7px;">
2023-10-21 05:35:43 -04:00
2023-10-20 13:47:53 -04:00
2023-04-24 10:53:33 -04:00
<% if (String(inv_vid.descriptionHtml) != "undefined") { %>
2022-11-30 13:48:15 -05:00
<% if (String(inv_vid.descriptionHtml) != " ") { %>
2023-04-24 12:54:22 -04:00
<%-linkify(String(inv_vid.description)).replace(/\n/g, " <br> ").replace(/twitter\.com/g, "nitter.net").replace(/reddit\.com/g, "teddit.net") %>
2022-11-30 13:48:15 -05:00
<% } %> <% } %>
2023-04-24 10:53:33 -04:00
2022-11-30 13:48:15 -05:00
2023-04-24 12:54:22 -04:00
2022-11-30 13:48:15 -05:00
</span>
<hr style="clear: both;display: block;border: none;border-bottom: 0.5px solid #2f2f2f;/*! width: 4.5em; */height: 0;">
2023-04-24 10:53:33 -04:00
<% if (Array.isArray(video?.Tags?.Tag)) { %>
2022-11-30 13:48:15 -05:00
<div class="video-title" style="color:#fff;font-family:'PokeTube Flex';font-weight:1000;font-stretch: extra-expanded;margin-top: 10px;margin-bottom: 10px;">Tags</div>
<div class="tags">
<% video.Tags.Tag.forEach(x => { %>
<div class="tag">
<a href="/hashtag/<%=x %>" style="color:#fff">
<%=x %>
</a>
</div>
<% }) %>
</div>
<hr style="clear: both;display: block;border: none;border-bottom: 0.5px solid #2f2f2f;/*! width: 4.5em; */height: 0;">
<% } %>
</p>
<div>
</div>
</div>
<div style="display:none;">
<div class="video-pill-buttons">
<div title="<%=engagement.likes.toLocaleString()%> Likes">
<i class="fa-light fa-thumbs-up"></i>
<%=convert(engagement.likes)%>
</div>
<div title="<%=engagement.dislikes.toLocaleString()%> Dislikes">
<i class="fa-light fa-thumbs-down"></i> <%=convert(engagement.dislikes)%>
2023-10-20 13:47:53 -04:00
</div> <div>
2022-11-30 13:48:15 -05:00
2023-04-24 10:53:33 -04:00
<a title="Download this Video :3" style="color:#fff;text-decoration: none; " href="/download?v=<%=inv_vid.videoId%>">
2022-11-30 13:48:15 -05:00
<i class="fa-light fa-download"></i>
Download
</a>
2023-04-24 10:53:33 -04:00
<% if (!k.Video.Channel.Name.endsWith(' - Topic')) { %>
<% if (!inv_vid.title.endsWith('Audio)')) { %>
2022-11-30 13:48:15 -05:00
2023-04-24 10:53:33 -04:00
<a title="Encryption duh" style="color:#fff;text-decoration: none;" href="/encryption?v=<%=inv_vid.videoId%>">
2022-11-30 13:48:15 -05:00
<i class="fa-light fa-shield"></i>
Encryption
</a>
<% }%> <% }%>
2023-04-24 10:53:33 -04:00
<% if (k.Video.Channel.Name.endsWith(' - Topic') || inv_vid.title.endsWith('Audio)')) { %>
2022-11-30 13:48:15 -05:00
2023-04-24 10:53:33 -04:00
<% if (k.Video.Channel.Name.endsWith(' - Topic') || inv_vid.title.endsWith('Audio)')) { %>
<a title="open this song in poketube music player :3" style="color:#fff;text-decoration: none;" href="/music?v=<%=inv_vid.videoId%>">
2022-11-30 13:48:15 -05:00
<i class="fa-light fa-music"></i>
Open In Music Player
</a>
<% }%>
<% }%>
</div>
</div>
</div>
</div>
<div style="display:none;">
</div>
<% if(!inv.comments) { %>
</div>
<% } %>
<% if(inv.comments) { %>
</div>
<% } %>
<div class="recommended-list" align="center">
<% if (!r) { %>
<div class="video-title" style="text-align:left;font-family:'PokeTube Flex';font-weight:1000;white-space:yes;font-stretch: extra-expanded;"> Recommendations
</div>
<% if (!f) { %>
<% k.Video.Recommendations.Video.forEach(x => { %>
<div class="video" >
<% if (!optout) { %>
2023-12-04 13:44:15 -05:00
<a href="/lite?v=<%= x.id %>" class="thumbnail" style="background-image: url('/vi/<%= x.id %>/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLBy_x4UUHLNDZtJtH0PXeQGoRFTgw');border-radius: 9.5px;" > <span class="video-length"><%=x.duration || "LIVE" %></span>
2022-11-30 13:48:15 -05:00
<% } %>
<% if (optout) { %>
2023-12-04 13:44:15 -05:00
<a href="/lite?v=<%= x.id %>&t=f" class="thumbnail" style="background-image: url('/vi/<%= x.id %>/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLBy_x4UUHLNDZtJtH0PXeQGoRFTgw');border-radius: 9.5px;" > <span class="video-length"><%- x.duration || "LIVE"%></span>
2022-11-30 13:48:15 -05:00
<% } %>
</a>
<div class="info">
<% if (!optout) { %>
<a href="/lite?v=<%= x.id %>" class="title max-lines-2" title="<%= x.Title %>" style="font-stretch: 100%;font-weight: 800;"><%= x.Title %></a>
<% } %>
<% if (optout) { %>
<a href="/lite?v=<%= x.id %>&t=f" class="title max-lines-2" title="<%= x.Title %>" style="font-stretch: 100%;font-weight: 800;"><%= x.Title %></a>
<% } %>
<div>
2023-02-01 15:19:39 -05:00
<a class="max-lines-2" href="/channel?id=<%= x.Channel.id %>" style="-webkit-line-clamp: 1;width: 12em;word-wrap: break-word;"><%=x.Channel.Name %></a>
2023-04-24 12:54:22 -04:00
<div class="video-views"> <%= x.uploadedAt.replace("Streamed", "Live") %> • <%= convert(x.views) %> views </div>
2022-11-30 13:48:15 -05:00
</div>
</div>
</div>
<% }) %>
<% } %>
2023-04-24 12:54:22 -04:00
2022-11-30 13:48:15 -05:00
<% } %>
</div>
</div>
</div>
</body>
</html>
<% } %>