mirror of
https://codeberg.org/ashley/poke
synced 2025-06-19 20:12:10 +00:00
Compare commits
24 Commits
10a18905ec
...
2be8727949
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2be8727949 | ||
![]() |
7677d27698 | ||
![]() |
0fdb869af7 | ||
![]() |
7ee79d8013 | ||
![]() |
79804c063c | ||
![]() |
98d5df7a96 | ||
![]() |
d451401186 | ||
![]() |
046c35119b | ||
![]() |
11faafeaff | ||
![]() |
ec4d53cbed | ||
![]() |
35b83a5d3c | ||
![]() |
64b0529e1b | ||
![]() |
bbdb3be59d | ||
![]() |
10eee1e4b7 | ||
![]() |
d564e49d09 | ||
![]() |
43b8b641a7 | ||
![]() |
a3b44a58ee | ||
![]() |
b75dc35a6b | ||
![]() |
f7831ad85e | ||
![]() |
07490ec727 | ||
![]() |
0654c381c7 | ||
![]() |
26558507db | ||
![]() |
daae5abff1 | ||
![]() |
50597f59a7 |
@ -1,125 +1,237 @@
|
||||
// in the beginning.... god made mrrprpmnaynayaynaynayanyuwuuuwmauwnwanwaumawp :p
|
||||
var _yt_player= videojs;
|
||||
|
||||
var _yt_player = videojs;
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
|
||||
// video.js 8 init - source can be seen in https://poketube.fun/static/vjs.min.js or the vjs.min.js file
|
||||
// video.js 8 init - source can be seen in https://poketube.fun/static/vjs.min.js or the vjs.min.js file
|
||||
const video = videojs('video', {
|
||||
controls: true,
|
||||
autoplay: false,
|
||||
preload: 'auto',
|
||||
preload: 'auto'
|
||||
});
|
||||
|
||||
|
||||
// todo : remove this code lol
|
||||
const qua = new URLSearchParams(window.location.search).get("quality") || "";
|
||||
localStorage.setItem(`progress-${new URLSearchParams(window.location.search).get('v')}`, 0);
|
||||
const vidKey = new URLSearchParams(window.location.search).get('v');
|
||||
localStorage.setItem(`progress-${vidKey}`, 0);
|
||||
|
||||
// raw media elements
|
||||
const videoEl = document.getElementById('video');
|
||||
const audio = document.getElementById('aud');
|
||||
|
||||
const audioSrc = audio.getAttribute('src');
|
||||
const vidSrcObj = video.src();
|
||||
const videoSrc = Array.isArray(vidSrcObj) ? vidSrcObj[0].src : vidSrcObj;
|
||||
|
||||
let audioReady = false, videoReady = false;
|
||||
let syncInterval = null;
|
||||
|
||||
// pauses and syncs the video when the seek is finished :3
|
||||
function clearSyncLoop() {
|
||||
if (syncInterval) {
|
||||
clearInterval(syncInterval);
|
||||
syncInterval = null;
|
||||
audio.playbackRate = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// drift-compensation loop for micro-sync
|
||||
function startSyncLoop() {
|
||||
clearSyncLoop();
|
||||
syncInterval = setInterval(() => {
|
||||
const vt = video.currentTime();
|
||||
const at = audio.currentTime;
|
||||
const delta = vt - at;
|
||||
|
||||
// large drift → jump
|
||||
if (Math.abs(delta) > 0.5) {
|
||||
audio.currentTime = vt;
|
||||
audio.playbackRate = 1;
|
||||
}
|
||||
// micro drift → adjust rate
|
||||
else if (Math.abs(delta) > 0.05) {
|
||||
audio.playbackRate = 1 + delta * 0.1;
|
||||
} else {
|
||||
audio.playbackRate = 1;
|
||||
}
|
||||
}, 300);
|
||||
}
|
||||
|
||||
// align start when both are ready
|
||||
function tryStart() {
|
||||
if (audioReady && videoReady) {
|
||||
const t = video.currentTime();
|
||||
if (Math.abs(audio.currentTime - t) > 0.1) {
|
||||
audio.currentTime = t;
|
||||
}
|
||||
video.play();
|
||||
audio.play();
|
||||
startSyncLoop();
|
||||
setupMediaSession();
|
||||
}
|
||||
}
|
||||
|
||||
// simple one-time retry on error
|
||||
function attachRetry(elm, src, markReady) {
|
||||
elm.addEventListener('loadeddata', () => {
|
||||
markReady();
|
||||
tryStart();
|
||||
}, { once: true });
|
||||
|
||||
elm.addEventListener('error', () => {
|
||||
// only retry once, and only if we have a valid src
|
||||
if (!elm._didRetry && src) {
|
||||
elm._didRetry = true;
|
||||
elm.src = src;
|
||||
elm.load();
|
||||
} else {
|
||||
console.error(`${elm.tagName} failed to load.`);
|
||||
}
|
||||
}, { once: true });
|
||||
}
|
||||
|
||||
// le volume :3
|
||||
function setupMediaSession() {
|
||||
if ('mediaSession' in navigator) {
|
||||
navigator.mediaSession.metadata = new MediaMetadata({
|
||||
title: document.title || 'Video',
|
||||
artist: '',
|
||||
album: '',
|
||||
artwork: []
|
||||
});
|
||||
|
||||
navigator.mediaSession.setActionHandler('play', () => {
|
||||
video.play(); audio.play();
|
||||
});
|
||||
navigator.mediaSession.setActionHandler('pause', () => {
|
||||
video.pause(); audio.pause();
|
||||
});
|
||||
navigator.mediaSession.setActionHandler('seekbackward', ({ seekOffset }) => {
|
||||
const skip = seekOffset || 10;
|
||||
video.currentTime(video.currentTime() - skip);
|
||||
audio.currentTime -= skip;
|
||||
});
|
||||
navigator.mediaSession.setActionHandler('seekforward', ({ seekOffset }) => {
|
||||
const skip = seekOffset || 10;
|
||||
video.currentTime(video.currentTime() + skip);
|
||||
audio.currentTime += skip;
|
||||
});
|
||||
navigator.mediaSession.setActionHandler('seekto', ({ seekTime, fastSeek }) => {
|
||||
if (fastSeek && 'fastSeek' in audio) audio.fastSeek(seekTime);
|
||||
else audio.currentTime = seekTime;
|
||||
video.currentTime(seekTime);
|
||||
});
|
||||
navigator.mediaSession.setActionHandler('stop', () => {
|
||||
video.pause(); audio.pause();
|
||||
video.currentTime(0); audio.currentTime = 0;
|
||||
clearSyncLoop();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// ** DESKTOP MEDIA-KEY FALLBACK **
|
||||
document.addEventListener('keydown', e => {
|
||||
switch (e.code) {
|
||||
case 'AudioPlay':
|
||||
case 'MediaPlayPause':
|
||||
if (video.paused()) { video.play(); audio.play(); }
|
||||
else { video.pause(); audio.pause(); }
|
||||
break;
|
||||
|
||||
case 'AudioPause':
|
||||
video.pause(); audio.pause();
|
||||
break;
|
||||
|
||||
case 'AudioNext':
|
||||
case 'MediaTrackNext':
|
||||
const tFwd = video.currentTime() + 10;
|
||||
video.currentTime(tFwd); audio.currentTime += 10;
|
||||
break;
|
||||
|
||||
case 'AudioPrevious':
|
||||
case 'MediaTrackPrevious':
|
||||
const tBwd = video.currentTime() - 10;
|
||||
video.currentTime(tBwd); audio.currentTime -= 10;
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
// syncs stuff if used in HD mode
|
||||
if (qua !== "medium") {
|
||||
const audio = document.getElementById('aud');
|
||||
|
||||
const syncVolume = () => {
|
||||
audio.volume = video.volume();
|
||||
};
|
||||
|
||||
const syncVolumeWithVideo = () => {
|
||||
video.volume(audio.volume);
|
||||
};
|
||||
|
||||
// we check if a video is buffered
|
||||
const checkAudioBuffer = () => {
|
||||
const buffered = audio.buffered;
|
||||
const bufferedEnd = buffered.length > 0 ? buffered.end(buffered.length - 1) : 0;
|
||||
return audio.currentTime <= bufferedEnd;
|
||||
};
|
||||
|
||||
const isVideoBuffered = () => {
|
||||
const buffered = video.buffered();
|
||||
return buffered.length > 0 && buffered.end(buffered.length - 1) >= video.currentTime();
|
||||
};
|
||||
|
||||
// pauses and syncs the video when the seek is finnished :3
|
||||
const handleSeek = () => {
|
||||
video.pause();
|
||||
audio.pause();
|
||||
|
||||
if (Math.abs(video.currentTime() - audio.currentTime) > 0.3) {
|
||||
audio.currentTime = video.currentTime();
|
||||
}
|
||||
|
||||
if (!checkAudioBuffer()) {
|
||||
audio.addEventListener('canplay', () => {
|
||||
if (video.paused && isVideoBuffered()) {
|
||||
video.play();
|
||||
audio.play();
|
||||
}
|
||||
}, { once: true });
|
||||
}
|
||||
};
|
||||
|
||||
const handleBufferingComplete = () => {
|
||||
if (Math.abs(video.currentTime() - audio.currentTime) > 0.3) {
|
||||
audio.currentTime = video.currentTime();
|
||||
}
|
||||
};
|
||||
// attach retry & ready markers to the real elements
|
||||
attachRetry(audio, audioSrc, () => { audioReady = true; });
|
||||
attachRetry(videoEl, videoSrc, () => { videoReady = true; });
|
||||
|
||||
// Sync when playback starts
|
||||
video.on('play', () => {
|
||||
if (!syncInterval) startSyncLoop();
|
||||
if (Math.abs(video.currentTime() - audio.currentTime) > 0.3) {
|
||||
audio.currentTime = video.currentTime();
|
||||
}
|
||||
|
||||
if (isVideoBuffered()) {
|
||||
audio.play();
|
||||
}
|
||||
if (audioReady) audio.play();
|
||||
});
|
||||
|
||||
video.on('pause', () => {
|
||||
audio.pause();
|
||||
clearSyncLoop();
|
||||
});
|
||||
|
||||
video.on('seeking', handleSeek);
|
||||
// pause audio when video is buffering :3
|
||||
video.on('waiting', () => {
|
||||
audio.pause();
|
||||
clearSyncLoop();
|
||||
});
|
||||
|
||||
// resume audio when video resumes
|
||||
video.on('playing', () => {
|
||||
if (audioReady) audio.play();
|
||||
if (!syncInterval) startSyncLoop();
|
||||
});
|
||||
|
||||
// pauses and syncs on seek
|
||||
video.on('seeking', () => {
|
||||
audio.pause();
|
||||
clearSyncLoop();
|
||||
if (Math.abs(video.currentTime() - audio.currentTime) > 0.3) {
|
||||
audio.currentTime = video.currentTime();
|
||||
}
|
||||
});
|
||||
|
||||
video.on('seeked', () => {
|
||||
if (isVideoBuffered()) {
|
||||
video.play();
|
||||
}
|
||||
audio.play();
|
||||
if (audioReady) audio.play();
|
||||
if (!syncInterval) startSyncLoop();
|
||||
});
|
||||
|
||||
// le volume :3
|
||||
video.on('volumechange', syncVolume);
|
||||
audio.addEventListener('volumechange', syncVolumeWithVideo);
|
||||
// volume sync
|
||||
video.on('volumechange', () => {
|
||||
audio.volume = video.volume();
|
||||
});
|
||||
audio.addEventListener('volumechange', () => {
|
||||
video.volume(audio.volume);
|
||||
});
|
||||
|
||||
// Detects when video or audio finishes buffering
|
||||
video.on('canplaythrough', handleBufferingComplete);
|
||||
audio.addEventListener('canplaythrough', handleBufferingComplete);
|
||||
|
||||
// media control events
|
||||
document.addEventListener('play', (e) => {
|
||||
if (e.target === video) {
|
||||
audio.play();
|
||||
video.on('canplaythrough', () => {
|
||||
if (Math.abs(video.currentTime() - audio.currentTime) > 0.3) {
|
||||
audio.currentTime = video.currentTime();
|
||||
}
|
||||
});
|
||||
audio.addEventListener('canplaythrough', () => {
|
||||
if (Math.abs(video.currentTime() - audio.currentTime) > 0.3) {
|
||||
audio.currentTime = video.currentTime();
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('pause', (e) => {
|
||||
if (e.target === video) {
|
||||
audio.pause();
|
||||
}
|
||||
});
|
||||
|
||||
// pause if it becomes full screen :3
|
||||
// pause if it becomes full screen :3
|
||||
document.addEventListener('fullscreenchange', () => {
|
||||
if (!document.fullscreenElement) {
|
||||
video.pause();
|
||||
audio.pause();
|
||||
clearSyncLoop();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
// hai!! if ur asking why are they here - its for smth in the future!!!!!!
|
||||
|
||||
const FORMATS = {
|
||||
|
@ -4,184 +4,176 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
<link href="css/yt-ukraine.svg" rel="icon">
|
||||
<link rel="icon" href="css/yt-ukraine.svg" type="image/svg+xml">
|
||||
<meta name="theme-color" content="#101010">
|
||||
<meta name="description" content="Poke! Calendar — Sleek, zero-JS dark calendar">
|
||||
<meta property="og:title" content="Poke! Calendar">
|
||||
<meta property="og:description" content="Navigate months seamlessly with a minimalist dark glass UI—no JavaScript needed.">
|
||||
<meta property="og:image" content="https://cdn.glitch.global/d68d17bb-f2c0-4bc3-993f-50902734f652/aa70111e-5bcd-4379-8b23-332a33012b78.image.png?v=1701898829884">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="https://yourdomain.com/calendar">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@PokeCalendar">
|
||||
<meta name="twitter:creator" content="@YourHandle">
|
||||
<meta name="twitter:title" content="Poke! Calendar">
|
||||
<meta name="twitter:image" content="https://cdn.glitch.global/d68d17bb-f2c0-4bc3-993f-50902734f652/aa70111e-5bcd-4379-8b23-332a33012b78.image.png?v=1701898829884">
|
||||
|
||||
<title>Poke! Calendar</title>
|
||||
<meta content="PokeCalendar" property="og:title">
|
||||
<meta content="Worlds first no js web calendar :3" property="twitter:description">
|
||||
<meta content="https://cdn.glitch.global/d68d17bb-f2c0-4bc3-993f-50902734f652/aa70111e-5bcd-4379-8b23-332a33012b78.image.png?v=1701898829884" property="og:image" />
|
||||
<meta content=summary_large_image name=twitter:card>
|
||||
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'">
|
||||
<meta name="referrer" content="no-referrer">
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--bg: #101010;
|
||||
--panel: #1a1a1a;
|
||||
--border: #2a2a2a;
|
||||
--accent: #bb86fc;
|
||||
--accent-light: #ce9eff;
|
||||
--text: #e0e0e0;
|
||||
--today: #3700b3;
|
||||
--weekend: #121212;
|
||||
}
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
body {
|
||||
background-color: #121212;
|
||||
color: #ffffff;
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
background-color: #333333;
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
align-items: center; /* Center items vertically */
|
||||
justify-content: space-between; /* Space items evenly */
|
||||
}
|
||||
|
||||
.navbar h1 {
|
||||
margin: 0;
|
||||
color: #bb86fc;
|
||||
}
|
||||
|
||||
.navbar .years {
|
||||
color: #bb86fc; /* Year text color */
|
||||
display: flex; /* Use flexbox for alignment */
|
||||
gap: 20px; /* Space between year elements */
|
||||
flex-wrap: wrap; /* Allow wrapping on smaller screens */
|
||||
justify-content: center; /* Center items on smaller screens */
|
||||
}
|
||||
|
||||
.container {
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
background-color: #1e1e1e;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
||||
width: 90%;
|
||||
max-width: 800px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
h2, h3 {
|
||||
color: #bb86fc;
|
||||
margin: 10px 0; /* Margin between h2 elements */
|
||||
}
|
||||
|
||||
.month-title {
|
||||
font-size: 1.5em; /* Adjust the size as needed */
|
||||
margin: 20px 0; /* Spacing above and below */
|
||||
color: #bb86fc; /* Month title color */
|
||||
}
|
||||
|
||||
.calendar-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.calendar-table th, .calendar-table td {
|
||||
padding: 15px;
|
||||
text-align: center;
|
||||
border: 1px solid #333333;
|
||||
font-size: 0.9em; /* Smaller font size for better fit */
|
||||
}
|
||||
|
||||
.calendar-table th {
|
||||
background-color: #333333;
|
||||
}
|
||||
|
||||
.calendar-table td {
|
||||
background-color: #2c2c2c;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.nav-links {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.button {
|
||||
text-decoration: none;
|
||||
color: #ffffff;
|
||||
background-color: #bb86fc;
|
||||
padding: 10px 20px;
|
||||
border-radius: 5px;
|
||||
margin: 0 10px;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
.button:hover {
|
||||
background-color: #9c62f3;
|
||||
}
|
||||
|
||||
/* Responsive styles */
|
||||
@media (max-width: 768px) {
|
||||
.navbar {
|
||||
flex-direction: column; /* Stack navbar items vertically on small screens */
|
||||
align-items: center; /* Center items horizontally */
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 100%; /* Full width on small screens */
|
||||
height: 100vh; /* Full height of the viewport */
|
||||
border-radius: 0; /* Remove border-radius for full-screen effect */
|
||||
box-shadow: none; /* Remove shadow for a flatter design */
|
||||
padding: 10px; /* Adjust padding for mobile */
|
||||
}
|
||||
|
||||
.calendar-table th, .calendar-table td {
|
||||
padding: 10px; /* Reduced padding for smaller screens */
|
||||
font-size: 0.8em; /* Smaller font size */
|
||||
}
|
||||
|
||||
.month-title {
|
||||
font-size: 1.2em; /* Smaller month title */
|
||||
}
|
||||
|
||||
.button {
|
||||
padding: 8px 15px; /* Smaller button size */
|
||||
margin: 5px 0; /* Vertical spacing */
|
||||
display: block; /* Stack buttons vertically */
|
||||
width: 100%; /* Full width */
|
||||
}
|
||||
}
|
||||
|
||||
background: var(--bg) url('/css/background.jpg') center/cover fixed no-repeat;
|
||||
color: var(--text);
|
||||
font-family: 'Inter', sans-serif;
|
||||
min-height: 100vh;
|
||||
line-height: 1.5;
|
||||
}
|
||||
body::before {
|
||||
content: '';
|
||||
position: fixed; inset: 0;
|
||||
background: inherit;
|
||||
filter: blur(16px) brightness(0.4);
|
||||
z-index: -1;
|
||||
}
|
||||
.navbar {
|
||||
position: sticky; top: 0;
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
padding: 1rem 2rem;
|
||||
background: rgba(26,26,26,0.8);
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.navbar img { width: 8em; }
|
||||
.years { display: flex; gap: 1.5rem; flex-wrap: wrap; }
|
||||
.years h2 { font-size: 0.95rem; color: var(--accent); }
|
||||
.container {
|
||||
width: 90%; max-width: 900px;
|
||||
margin: 2rem auto;
|
||||
padding: 2rem;
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 12px;
|
||||
}
|
||||
.header-row {
|
||||
display: flex; flex-wrap: wrap;
|
||||
align-items: center; justify-content: space-between;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
.month-title { font-size: 2rem; color: var(--accent); }
|
||||
.month-picker {
|
||||
padding: 0.4rem 0.8rem;
|
||||
font-size: 1rem;
|
||||
color: var(--text);
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
}
|
||||
.month-button {
|
||||
margin-left: 0.5rem;
|
||||
padding: 0.5rem 1rem;
|
||||
background: var(--accent);
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.calendar-table {
|
||||
width: 100%; border-collapse: collapse; table-layout: fixed;
|
||||
}
|
||||
.calendar-table th, .calendar-table td {
|
||||
padding: 1rem; border: 1px solid var(--border);
|
||||
text-align: center;
|
||||
}
|
||||
.calendar-table th {
|
||||
background: var(--panel);
|
||||
color: var(--accent-light);
|
||||
font-weight: 500;
|
||||
}
|
||||
.calendar-table td {
|
||||
background: var(--panel);
|
||||
color: var(--text);
|
||||
}
|
||||
.calendar-table td:nth-child(1),
|
||||
.calendar-table td:nth-child(7) {
|
||||
background: var(--weekend);
|
||||
}
|
||||
.calendar-table td.today {
|
||||
background: var(--today) !important;
|
||||
color: #fff;
|
||||
border-color: var(--accent);
|
||||
}
|
||||
.nav-links {
|
||||
display: flex; justify-content: center; gap: 1rem;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
.button {
|
||||
padding: 0.75rem 1.5rem;
|
||||
background: var(--accent);
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--accent-light);
|
||||
cursor: pointer;
|
||||
font-weight: 500;
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.container { padding: 1rem; }
|
||||
.month-title { font-size: 1.5rem; }
|
||||
.calendar-table th, .calendar-table td { padding: 0.75rem; font-size: 0.85rem; }
|
||||
.nav-links { flex-direction: column; }
|
||||
.button { width: 100%; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar">
|
||||
<a class="class" href="/143" style="font-family: Inter, sans-serif; color: #fff">
|
||||
<img style="transform: scale(1.3); padding-left: 0.9em; width: 8.5em; display: block; margin-left: auto; margin-right: auto;" src="/css/logo-poke.svg?v=5">
|
||||
</a>
|
||||
<a href="/143"><img src="/css/logo-poke.svg?v=5" alt="Poke Calendar Logo"></a>
|
||||
<div class="years">
|
||||
<h2>Gregorian Year: <%= year %></h2>
|
||||
<h2>Islamic Year: <%= islamicYear %></h2>
|
||||
<h2>Persian Year: <%= persianYear %></h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container" style="margin-top: 1em;">
|
||||
<h2 class="month-title"><%= queryDate.toLocaleString('default', { month: 'long' }) %> <%= year %></h2> <!-- Month and Year Display -->
|
||||
|
||||
<div class="container">
|
||||
<div class="header-row">
|
||||
<h2 class="month-title"><%= queryDate.toLocaleString('default', { month: 'long' }) %> <%= year %></h2>
|
||||
<form action="/calendar" method="get" style="display:flex; align-items:center;">
|
||||
<input type="month" name="date" value="<%= currentDate.toISOString().slice(0,7) %>" class="month-picker">
|
||||
<button type="submit" class="month-button">Go</button>
|
||||
</form>
|
||||
</div>
|
||||
<table class="calendar-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Sunday</th>
|
||||
<th>Monday</th>
|
||||
<th>Tuesday</th>
|
||||
<th>Wednesday</th>
|
||||
<th>Thursday</th>
|
||||
<th>Friday</th>
|
||||
<th>Saturday</th>
|
||||
<th>Sun</th><th>Mon</th><th>Tue</th><th>Wed</th><th>Thu</th><th>Fri</th><th>Sat</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% for (let i = 0; i < 6; i++) { %>
|
||||
<tr>
|
||||
<% for (let j = 0; j < 7; j++) { %>
|
||||
<td>
|
||||
<% const day = days[i * 7 + j]; %>
|
||||
<%= day ? day.getDate() : '' %>
|
||||
</td>
|
||||
<% } %>
|
||||
</tr>
|
||||
<% } %>
|
||||
<% days.forEach((day, idx) => { %>
|
||||
<% if (idx % 7 === 0) { %><tr><% } %>
|
||||
<% const today = new Date(); %>
|
||||
<% const isToday = day &&
|
||||
day.getDate() === today.getDate() &&
|
||||
day.getMonth() === today.getMonth() &&
|
||||
day.getFullYear() === today.getFullYear(); %>
|
||||
<td class="<%= isToday ? 'today' : '' %>"><%= day ? day.getDate() : '' %></td>
|
||||
<% if (idx % 7 === 6) { %></tr><% } %>
|
||||
<% }); %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="nav-links">
|
||||
<a href="/calendar?date=<%= new Date(currentDate.getFullYear(), month - 1, 1).toISOString() %>" class="button">Previous Month</a>
|
||||
<a href="/calendar?date=<%= new Date(currentDate.getFullYear(), month + 1, 1).toISOString() %>" class="button">Next Month</a>
|
||||
<a href="/calendar?date=<%= new Date(year, month - 1, 1).toISOString() %>" class="button">← Prev</a>
|
||||
<a href="/calendar?date=<%= new Date(year, month + 1, 1).toISOString() %>" class="button">Next →</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -117,7 +117,7 @@
|
||||
<%- include('./partials/header.ejs') %>
|
||||
<video playsinline muted paused><source src="/bg-480.webm" type="video/webm"/></video>
|
||||
<div class="landing">
|
||||
<h1 style="text-align: center;">THE ONLY FRONT-END IN THE WORLD!</h1>
|
||||
<h1 style="text-align: center;">WELCOME TO POKE!</h1>
|
||||
<p style="max-width: 800px;text-align: center;margin: auto;margin-bottom: 3em;">Poke is a free software AD-FREE ! YouTube front-end, translator, map app, and more!!1! Watch videos and explore without a trace in this all-in-one privacy app!!1! :3</p>
|
||||
<div style="text-align: center; padding: 10px; border-radius: 8px;margin-left: -1em;">
|
||||
<details>
|
||||
@ -154,8 +154,7 @@
|
||||
|
||||
<div>
|
||||
<h1 style="margin-left: auto;margin-right: auto;text-align: center;margin-bottom: -1em;margin-top: 1em;">TOP 3 REASONS WHY POKE IZ COOL!!</h1>
|
||||
<p>U can refresh to see other features!!</p>
|
||||
</div>
|
||||
</div>
|
||||
<%
|
||||
const features = [
|
||||
{ title: "No Tracking and Ads", description: "Poke Has no Trackers or ads - we dont and we wont see the vids ur watching :3", icon: "<svg style='background: #ea6d6d;' width='24px' height='24px' viewBox='0 0 24 24' stroke-width='1.5' fill='none' xmlns='http://www.w3.org/2000/svg' color='#ffffff'><path d='M19.5 16L17.0248 12.6038' stroke='#ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/><path d='M12 17.5V14' stroke='#ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/><path d='M4.5 16L6.96895 12.6124' stroke='#ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/><path d='M3 8C6.6 16 17.4 16 21 8' stroke='#ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>" },
|
||||
|
@ -416,7 +416,7 @@ video[counter].classList.add("shake");
|
||||
<div class="middle">
|
||||
<div class="search">
|
||||
|
||||
<form action=/search><input class=search-bar autocomplete="on" value="<%=q%>" id=fname name=query style="color:#fff;font-family:Inter,sans-serif;border-radius: 8px;">
|
||||
<form action=/search><input class=search-bar autocomplete="on" value="<%=q%>" id=fname name=query style="color:#fff;font-family:Inter,sans-serif;border-radius: 8px;background: linear-gradient(90deg, hsla(235, 21%, 21%, 1) 0%, hsla(194, 41%, 22%, 1) 50%, hsla(174, 48%, 20%, 1) 100%);" >
|
||||
<button class="btn btn-success" type=submit><i class="fa-light fa-search"></i></button>
|
||||
|
||||
</form>
|
||||
|
@ -410,7 +410,7 @@ button:hover, a:hover {
|
||||
|
||||
<!-- player -->
|
||||
<link href="/css/videojs-v8.16.0.css?v=5949545" rel="stylesheet" />
|
||||
<script src="/static/vjs.min.js?v=45959"></script><!-- custom video player for poke --><script src="/static/player-base.js?v=21_d&lang=en_us&set=player_ias.vflset"> </script>
|
||||
<script src="/static/vjs.min.js?v=45959"></script><!-- custom video player for poke --><script src="/static/player-base.js?v=565_d&lang=en_us&set=player_ias.vflset"> </script>
|
||||
|
||||
<!-- ICONS -->
|
||||
<!-- Font awesome pro -->
|
||||
@ -2537,8 +2537,16 @@ a {
|
||||
<style>body, html { margin: 0; padding: 0; } * { font-family: ubuntu; color:#fff } .player { background-color: #000 !important; display: grid; grid-template-columns: 1fr min-content; grid-template-rows: max-content 1fr max-content max-content max-content; gap: 0 0; width: 100%; /* height: 100%; */ aspect-ratio: 16 / 9; } .player * { color: #fff; } .player.embed, video.embed { position: fixed; top: 0; bottom: 0; left: 0; right: 0; } .player * { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .player > video { position: relative; width: 100%; height: 100%; z-index: 0; grid-area: 1 / 1 / 6 / 3; } .player.hide-controls > .player-title, .player.hide-controls > .player-controls, .player.hide-controls > .player-playback-bar-container, .player.hide-controls > .player-menu { display: none !important; } .player-controls { background-color: #0007; display: flex; justify-content: center; align-items: center; z-index: 1; grid-area: 1 / 1 / 6 / 3; } .player-button { width: 96px; height: 96px; font-size: 90px; text-align: center; line-height: 48px; } .player-tiny-button { width: 40px; font-size: 20px; text-align: center; } .player-tiny-button > i { color: #ddd; } .player-button, .player-button * { color: #dddddd !important; text-decoration: none; } .player-button > i { min-width: 48px; } .player-button:hover, .player-button:hover * { color: #fff !important; } .player-playback-bar { transition: width linear 100ms; } .player-playback-bar-container { grid-area: 4 / 1 / 5 / 3; display: flex; column-gap: 8px; justify-content: center; align-items: center; height: 8px; transition: height linear 100ms; width: 100%; z-index: 2; margin-bottom: 10px; } .player-playback-bar-bg { background-color: #fff3 !important; width: 100%; height: 100%; z-index: 2; display: grid; grid-template-columns: 1fr; grid-template-rows: 1fr; } .player-playback-bar-bg > * { grid-area: 1 / 1 / 2 / 2; } .player-playback-bar-buffer { background-color: #fffa !important; height: 100%; width: 0; z-index: 3; } .player-playback-bar-fg { background-color: #f00 !important; height: 100%; width: 0; z-index: 4; } .player-buffering { grid-area: 1 / 1 / 6 / 3; z-index: 1; display: flex; justify-content: center; align-items: center; } .player-buffering-spinner { width: 80px; height: 80px; }</style>
|
||||
<body>
|
||||
<div class="app" style="color:#fff;margin-top: 0;">
|
||||
<nav>
|
||||
<div class="left"><a class="class" href="/" style="font-family:Inter,sans-serif;color:#fff"> <img style="width: 8.5em;display: block;margin-left: -1.5em;margin-right: auto;" src="/css/logo-poke.svg"> </a>
|
||||
<nav style="
|
||||
height: 2em;
|
||||
margin-bottom: 1em;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
backdrop-filter: blur(12px);
|
||||
-webkit-backdrop-filter: blur(12px);
|
||||
border-radius: 12px;
|
||||
">
|
||||
<div class="left"><a class="class" href="/" style="font-family:Inter,sans-serif;color:#fff">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="middle">
|
||||
@ -2911,8 +2919,82 @@ font-size: 13px;margin:0;padding:0;white-space: nowrap;
|
||||
%>
|
||||
<div class="nerddd" style="background:#272727;padding: 5px;margin-top: 12px;border-radius: 11px;font-family: 'PokeTube Flex';font-stretch: extra-expanded;font-weight: 700;">
|
||||
|
||||
<a href="https://chatgpt.com/?q=<%- inv_vid.description %>+Please+summarize+the+selection+using+precise+and+concise+language.+Use+headers+and+bulleted+lists+in+the+summary%2C+to+make+it+scannable.+Maintain+the+meaning+and+factual+accuracy.">SUMMERISE!</a>
|
||||
|
||||
<style>
|
||||
|
||||
@keyframes gradientAnimation {
|
||||
0% { background-position: 0% 50%; }
|
||||
50% { background-position: 100% 50%; }
|
||||
100% { background-position: 0% 50%; }
|
||||
}
|
||||
|
||||
@keyframes glow {
|
||||
0%, 100% {
|
||||
box-shadow: 0 0 15px rgba(0,255,255,0.7), inset 0 0 10px rgba(0,255,255,0.3);
|
||||
}
|
||||
50% {
|
||||
box-shadow: 0 0 25px rgba(0,255,255,1), inset 0 0 15px rgba(0,255,255,0.5);
|
||||
}
|
||||
}
|
||||
|
||||
.ai-buttona {
|
||||
padding: 0.75rem 1.5rem;
|
||||
font-size: 15px;
|
||||
letter-spacing: 0.05em;
|
||||
text-transform: uppercase;
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
hsla(235, 21%, 21%, 1) 0%,
|
||||
hsla(194, 41%, 22%, 1) 50%,
|
||||
hsla(174, 48%, 20%, 1) 100%
|
||||
);
|
||||
background-size: 238% 300%;
|
||||
border-radius: 2rem;
|
||||
border: none;
|
||||
box-shadow: 0 0 15px rgba(0,255,255,0.7), inset 0 0 10px rgba(0,255,255,0.3);
|
||||
transition: box-shadow 0.2s ease;
|
||||
margin-top: 1em;
|
||||
margin-bottom: -1em;
|
||||
margin-left: 6em;
|
||||
text-align: center;
|
||||
animation: none;
|
||||
}
|
||||
|
||||
.ai-button:hover {
|
||||
box-shadow: 0 0 20px rgba(0,255,255,1), inset 0 0 15px rgba(0,255,255,0.5);
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<%
|
||||
const variant = Math.random() < 0.5 ? 'A' : 'B';
|
||||
const showButton = Math.random() < 0.5;
|
||||
const desc = inv_vid.description || '';
|
||||
%>
|
||||
|
||||
<% if (showButton) { %>
|
||||
<br><br> <a
|
||||
href="https://chatgpt.com/?q=<%= encodeURIComponent(
|
||||
desc +
|
||||
' Please summarize the selection using precise and concise language. ' +
|
||||
'Use headers and bulleted lists in the summary, to make it scannable. ' +
|
||||
'Maintain the meaning and factual accuracy.'
|
||||
) %>"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
aria-label="Summarise the video description"
|
||||
class="ai-buttona"
|
||||
data-variant="<%= variant %>"
|
||||
>
|
||||
Summarise!
|
||||
</a>
|
||||
<% } %>
|
||||
|
||||
|
||||
<br><br><br>
|
||||
<%-String(channelurlfixer(inv_vid.descriptionHtml)).replace(/\n/g, " <br> ").replace(/twitter\.com/g, "twitter.com").replace(/reddit\.com/g, "redlib.matthew.science") %>
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user