1
0
Fork 0
This commit is contained in:
Korbs 2024-06-21 02:41:45 -04:00
parent 5759d05c9b
commit 618eaa9c86
10 changed files with 243 additions and 1 deletions

18
.gitignore vendored Normal file
View file

@ -0,0 +1,18 @@
# generated types
.astro/
# dependencies
node_modules/
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# environment variables
.env
.env.production
# macOS-specific files
.DS_Store

View file

@ -1,2 +1,47 @@
# Poke, but built on Astro # Poke, but built on Astro
This repo is only a proof of concept to see how Poke will run in Astro. A lot of code will be used from [MinPluto](https://ark.sudovanilla.org/MinPluto/MinPluto/), as it's a YouTube frontend built on Astro inspired by Poke. This repo is only a proof of concept to see how Poke will run in Astro. A lot of code will be used from [MinPluto](https://ark.sudovanilla.org/MinPluto/MinPluto/), as it's a YouTube frontend built on Astro and inspired by Poke.
## Todo List
- [ ] i18n
- [ ] English
- [ ] Spanish
- [ ] Russian
- [ ] Japanese
- [ ] Inline Player
## Build
> Instructions assume you're using Bun as the package manager, which is preferred for Astro projects.
### Requirements
- git
- [Bun](https://bun.sh) (NPM/NodeJS not required)
### Build and Run
Clone the repository:
```bash
git clone https://codeberg.org/korbs/poke-but-in-astro.git
cd ./poke-but-in-astro/
```
Install packages:
```bash
bun install
```
Run:
```bash
bun start # or use "bunx --bun astro dev"
```
It's that easy.
## License
```
Copyright (C) 2024 SudoVanilla
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/.
```

42
astro.config.mjs Normal file
View file

@ -0,0 +1,42 @@
import { defineConfig } from 'astro/config';
import node from "@astrojs/node";
import partytown from "@astrojs/partytown";
import sitemap from "@astrojs/sitemap";
import robotsTxt from "astro-robots-txt";
import vue from "@astrojs/vue";
import matomo from "astro-matomo";
export default defineConfig({
output: "server",
adapter: node({
mode: "standalone"
}),
security: {
checkOrigin: true
},
server: {
port: 6003,
host: true
},
devToolbar: {enabled: false},
experimental: {
actions: true,
},
integrations: [
partytown(),
sitemap(),
robotsTxt(),
vue(),
matomo({
enabled: import.meta.env.PROD, // Only run Matomo in production
host: "#",
setCookieDomain: "#",
trackerUrl: "js/", // Defaults to matomo.php
srcUrl: "js/", // Defaults to matomo.js
siteId: 143,
heartBeatTimer: 5,
disableCookies: true,
debug: false,
})
]
});

BIN
bun.lockb Executable file

Binary file not shown.

43
package.json Normal file
View file

@ -0,0 +1,43 @@
{
"name": "poke",
"type": "module",
"version": "25.01",
"license": "GPL-3.0-or-later",
"scripts": {
"start": "astro dev",
"build": "astro build"
},
"repository": {
"url": "https://codeberg.org/korbs/poke-but-in-astro"
},
"keywords": [
"poketube",
"private",
"ytdl",
"youtube"
],
"dependencies": {
"@astrojs/node": "^8.3.1",
"@astrojs/partytown": "^2.1.1",
"@astrojs/react": "^3.6.0",
"@astrojs/sitemap": "^3.1.6",
"@astrojs/vue": "^4.5.0",
"@iconoir/vue": "^7.7.0",
"@innologica/vue-dropdown-menu": "^0.1.4",
"@shoelace-style/shoelace": "^2.15.1",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"astro": "^4.11.0",
"astro-matomo": "^1.6.0",
"astro-robots-txt": "^1.0.0",
"iconoir-react": "^7.7.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"vue": "^3.4.29"
},
"devDependencies": {
"@types/bun": "^1.1.5",
"accessible-astro-components": "^2.3.6",
"sass": "^1.77.6"
}
}

0
src/actions/index.ts Normal file
View file

74
src/assets/poke-text.svg Normal file
View file

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="424.99179"
height="112.56479"
viewBox="0 0 424.99179 112.56479"
version="1.1"
id="svg5"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
sodipodi:docname="drawing-1.svg"
xml:space="preserve"
inkscape:export-filename="draw2ing.svg"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview7"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
inkscape:document-units="px"
showgrid="false"
inkscape:zoom="0.6147115"
inkscape:cx="774.347"
inkscape:cy="251.33742"
inkscape:window-width="1920"
inkscape:window-height="1008"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" /><defs
id="defs2" /><g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-387.38205,-335.77142)"><g
id="g1157-3-2"
transform="translate(70.029334,142.05383)"
inkscape:export-filename="./g1157-3-2.svg"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"><path
d="m 456.27173,300.46899 14.34564,-101.9487 h 35.09949 q 8.22871,0 14.34563,4.07795 6.11693,4.07795 9.10257,10.99589 2.98564,6.91795 1.74769,15.29231 -1.16513,8.52 -6.18974,15.43795 -5.02462,6.84512 -12.30667,10.92307 -7.20923,4.07795 -15.21948,4.07795 h -19.95282 l -5.82564,41.14358 z m 23.0841,-56.29024 h 18.42359 q 4.29641,0 8.22872,-2.18462 3.9323,-2.18462 6.55384,-5.82564 2.69436,-3.64103 3.34975,-8.22872 0.65538,-4.58769 -1.01949,-8.22871 -1.60205,-3.71385 -4.9518,-5.82564 -3.27692,-2.18462 -7.57333,-2.18462 h -18.42358 z"
style="font-size:145.641px;font-family:Urbanist;-inkscape-font-specification:'Urbanist, @ital=1.00,wght=600';font-variation-settings:'ital' 1, 'wght' 600;fill:#ffffff;stroke-width:3.4;stroke-linecap:round;stroke-linejoin:bevel;paint-order:stroke fill markers"
id="path4685"
transform="scale(0.98720112,1.0129648)" /><path
d="m 560.98952,302.36233 q -10.04923,0 -17.62256,-5.17026 -7.50051,-5.17025 -11.21436,-13.83589 -3.64103,-8.73846 -2.18462,-19.29744 1.09231,-8.01025 4.87898,-14.9282 3.85949,-6.99077 9.6123,-12.23385 5.75282,-5.31589 12.74359,-8.30153 7.06359,-2.98564 14.5641,-2.98564 10.04923,0 17.54974,5.17025 7.57334,5.17026 11.28718,13.90872 3.71385,8.73846 2.18462,19.37025 -1.09231,7.93744 -4.9518,14.85539 -3.78666,6.91794 -9.53948,12.23384 -5.75282,5.24308 -12.74359,8.22872 -6.99077,2.98564 -14.5641,2.98564 z m 2.11179,-15.14667 q 6.04411,0 11.28718,-3.2041 5.24308,-3.2041 8.81128,-8.44718 3.64103,-5.31589 4.44205,-11.50564 0.87385,-6.33538 -1.23795,-11.65128 -2.11179,-5.31589 -6.48102,-8.44718 -4.36923,-3.2041 -10.26769,-3.2041 -5.97128,0 -11.28718,3.2041 -5.24308,3.20411 -8.81128,8.52 -3.5682,5.3159 -4.44205,11.57846 -0.87385,6.48103 1.23795,11.7241 2.18461,5.24308 6.55384,8.37436 4.36923,3.05846 10.19487,3.05846 z"
style="font-size:145.641px;font-family:Urbanist;-inkscape-font-specification:'Urbanist, @ital=1.00,wght=600';font-variation-settings:'ital' 1, 'wght' 600;fill:#ffffff;stroke-width:3.4;stroke-linecap:round;stroke-linejoin:bevel;paint-order:stroke fill markers"
id="path4687"
transform="scale(0.98720112,1.0129648)" /><path
d="m 670.72839,300.46899 h -17.47692 l -13.54461,-30.87589 -13.69026,13.98154 -2.40307,16.89435 h -15.14667 l 15.36513,-109.23075 h 15.14666 l -9.68512,68.81537 31.67692,-32.40512 h 19.80717 l -28.98256,29.63795 z"
style="font-size:145.641px;font-family:Urbanist;-inkscape-font-specification:'Urbanist, @ital=1.00,wght=600';font-variation-settings:'ital' 1, 'wght' 600;fill:#ffffff;stroke-width:3.4;stroke-linecap:round;stroke-linejoin:bevel;paint-order:stroke fill markers"
id="path4689"
transform="scale(0.98720112,1.0129648)" /><path
d="m 710.01342,302.36233 q -10.04923,0 -17.62256,-5.17026 -7.50051,-5.17025 -11.21436,-13.83589 -3.64102,-8.73846 -2.18461,-19.29744 1.09231,-8.01025 4.87897,-14.9282 3.85949,-6.99077 9.61231,-12.23385 5.75282,-5.31589 12.74359,-8.30153 7.06358,-2.98564 14.5641,-2.98564 8.37435,0 14.85538,3.49538 6.48102,3.42256 10.55897,9.53949 4.15077,6.0441 5.3159,13.98153 1.23795,7.86462 -0.94667,16.74872 h -56.07179 q 0.14565,5.02461 2.33026,9.10256 2.18462,4.00513 6.0441,6.33539 3.93231,2.33025 9.24821,2.40307 5.53435,0 10.48615,-2.76718 4.95179,-2.76718 8.52,-7.64615 l 14.85538,3.56821 q -5.75282,9.68512 -15.43795,15.87486 -9.6123,6.11693 -20.53538,6.11693 z m -14.41846,-44.56615 h 41.36205 q 0,-5.24308 -2.33026,-9.46667 -2.33025,-4.29641 -6.4082,-6.7723 -4.07795,-2.54872 -9.32103,-2.54872 -5.17025,0 -9.90358,2.4759 -4.73334,2.47589 -8.22872,6.7723 -3.49539,4.22359 -5.17026,9.53949 z"
style="font-size:145.641px;font-family:Urbanist;-inkscape-font-specification:'Urbanist, @ital=1.00,wght=600';font-variation-settings:'ital' 1, 'wght' 600;fill:#ffffff;stroke-width:3.4;stroke-linecap:round;stroke-linejoin:bevel;paint-order:stroke fill markers"
id="path4691"
transform="scale(0.98720112,1.0129648)" /><path
fill-rule="evenodd"
clip-rule="evenodd"
d="m 39.782,41.7207 c -19.9967,22.5928 -19.0962,79.3023 -0.977,79.3023 12.5877,0 14.4521,-0.235 18.6508,-0.765 1.8451,-0.233 4.1409,-0.523 7.9954,-0.874 11.8103,-1.078 8.7256,-9.687 5.4833,-18.735 -2.1148,-5.9018 -4.2966,-11.9907 -2.4568,-16.2997 1.799,-4.2134 11.2308,-3.267 21.6295,-2.2235 9.5054,0.9538 19.8188,1.9886 25.8488,-0.7624 12.626,-5.7606 11.478,-35.0342 0,-45.4033 C 104.477,25.591 56.0977,23.2867 39.782,41.7207 Z m 43.8584,26.4989 c 4.6659,0 11.377,-1.8662 11.9479,-8.398 0.0288,-0.3298 0.0587,-0.6612 0.0886,-0.9937 0.6497,-7.211 1.3445,-14.924 -7.4412,-17.6686 -11.9479,-3.7324 -17.4623,11.15 -17.4623,18.6623 0,6.5318 8.201,8.398 12.867,8.398 z"
fill="url(#paint0_linear_9_6)"
id="path1134-9-9"
style="fill:#ffffff;fill-opacity:1;stroke-width:0.758265"
transform="matrix(1.14839,0,0,1.14839,288.64294,165.19861)"
inkscape:export-filename="./path1134-90-9.svg"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96" /></g></g></svg>

After

Width:  |  Height:  |  Size: 6.5 KiB

2
src/env.d.ts vendored Normal file
View file

@ -0,0 +1,2 @@
/// <reference path="../.astro/actions.d.ts" />
/// <reference types="astro/client" />

5
src/pages/index.astro Normal file
View file

@ -0,0 +1,5 @@
---
import Layout from '@layouts/Default.astro'
---
<Layout Title="Poke" Description="▶▶ Poke - The privacy app of your dreams!"></Layout>

13
tsconfig.json Normal file
View file

@ -0,0 +1,13 @@
{
"extends": "astro/tsconfigs/base",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@assets/*": ["src/assets/*"],
"@components/*": ["src/components/*"],
"@layouts/*": ["src/layouts/*"],
"@styles/*": ["src/styles/*"]
},
"jsx": "preserve"
}
}