Merge pull request 'Add Progressive Web App support' (#37) from Korbs/poketube:main into main

Reviewed-on: https://codeberg.org/Ashley/poketube/pulls/37
This commit is contained in:
Ashley 2023-09-30 17:41:59 +00:00
commit 75190c5a25
11 changed files with 44 additions and 4 deletions

BIN
css/pt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
css/pwa-desktop.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
css/pwa-mobile.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 836 KiB

View file

@ -23,6 +23,7 @@
<title>Technoblade Never Dies! - PokeTube</title>
<% } %>
<title><%=j.Channel?.Metadata.Name%> - PokeTube</title>
<link rel="manifest" href="/manifest.json">
<link href=css/yt-ukraine.svg rel=icon>
<meta content=website property=og:type>
<meta content="<%=j.Channel?.Metadata.Name%> - PokeTube" property=og:title>

View file

@ -2,6 +2,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="manifest" href="/manifest.json">
<link href="https://codeberg.org/Ashley/poketube/raw/branch/main/css/yt-ukraine.svg" rel=icon>
<title> Content Settings | PokeTube :3 </title>
<style>

View file

@ -20,6 +20,7 @@
<title>PokeTube | Download Video </title>
<meta content="<%=color%>" name="theme-color">
<link href=/css/yt-ukraine.svg?v=6 rel=icon>
<link rel="manifest" href="/manifest.json">
<meta content=website property=og:type>
<meta content="PokeTube - Video Downloader" property=og:title>
<meta content="You wouldn't download a car... Right? welp i would - Download this video on PokeTube! for the price of 0$!" property=twitter:description>

View file

@ -22,6 +22,7 @@
<head>
<title>PokeTube - Be Anonymous!</title>
<link href=/css/yt-ukraine.svg?v=6 rel=icon>
<link rel="manifest" href="/manifest.json">
<meta content="▶▶ PokeTube - Be Anonymous!" property=og:title>
<meta content="Watch Silly videos while being anonymous on poketube!" property=twitter:description>
<meta content="https://cdn.glitch.global/d68d17bb-f2c0-4bc3-993f-50902734f652/drawing.png" property="og:image" />

View file

@ -46,6 +46,7 @@
<meta content="Watch this video from <%=k.Video.Channel.Name%> On PokeTube! The Libre YouTube Front end!1!" property=twitter:description>
<meta content="https://i.ytimg.com/vi/<%=inv_vid.videoId%>/maxresdefault.jpg" property=og:image>
<meta content=summary_large_image name=twitter:card>
<link rel="manifest" href="/manifest.json">
<link href="https://poketube.fun/watch?v=<%=inv_vid.videoId%>" itemprop=url>
<% } %> <!-- close the } -->
<link href="/css/yt-ukraine.svg?v=3" rel=icon>

View file

@ -20,6 +20,7 @@
<head>
<head>
<title>Searching <%=q%> - PokeTube</title>
<link rel="manifest" href="/manifest.json">
<link href=/css/yt-ukraine.svg?v=6 rel=icon>
<link href="https://fonts.poketube.fun/css/fonts.css" rel=stylesheet>
<link href=/css/app-cdn.min.css rel=stylesheet>

View file

@ -16,4 +16,8 @@ server {
proxy_ssl_session_reuse off;
proxy_set_header Host $http_host;
}
location /manifest.json {
root /path/to/poketube/pwa/;
}
}

30
pwa/manifest.json Normal file
View file

@ -0,0 +1,30 @@
{
"name": "PokeTube",
"short_name": "PokeTube",
"description": "Watch Videos - Anonymously",
"start_url": "/",
"display": "standalone",
"background_color": "#080808",
"theme_color": "#612153",
"icons": [
{
"src": "/css/pt.png",
"sizes": "512x512",
"type": "image/png"
}
],
"screenshots": [
{
"src": "/css/pwa-desktop.png",
"type": "image/png",
"sizes": "1695x1445",
"form_factor": "wide"
},
{
"src": "/css/pwa-mobile.jpg",
"type": "image/jpg",
"sizes": "1080x2412",
"form_factor": "narrow"
}
]
}