diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5c4fd4f --- /dev/null +++ b/.gitignore @@ -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 \ No newline at end of file diff --git a/README.md b/README.md index 7f57462..dddbbd2 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,47 @@ # 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. \ No newline at end of file +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/. +``` \ No newline at end of file diff --git a/astro.config.mjs b/astro.config.mjs new file mode 100644 index 0000000..fe1d3ca --- /dev/null +++ b/astro.config.mjs @@ -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, + }) + ] +}); \ No newline at end of file diff --git a/bun.lockb b/bun.lockb new file mode 100755 index 0000000..db1af93 Binary files /dev/null and b/bun.lockb differ diff --git a/package.json b/package.json new file mode 100644 index 0000000..2d6cd59 --- /dev/null +++ b/package.json @@ -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" + } +} \ No newline at end of file diff --git a/src/actions/index.ts b/src/actions/index.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/assets/poke-text.svg b/src/assets/poke-text.svg new file mode 100644 index 0000000..23746e7 --- /dev/null +++ b/src/assets/poke-text.svg @@ -0,0 +1,74 @@ + + + + \ No newline at end of file diff --git a/src/env.d.ts b/src/env.d.ts new file mode 100644 index 0000000..7cd4c1d --- /dev/null +++ b/src/env.d.ts @@ -0,0 +1,2 @@ +/// +/// diff --git a/src/pages/index.astro b/src/pages/index.astro new file mode 100644 index 0000000..b03e059 --- /dev/null +++ b/src/pages/index.astro @@ -0,0 +1,5 @@ +--- +import Layout from '@layouts/Default.astro' +--- + + \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..6ee9e78 --- /dev/null +++ b/tsconfig.json @@ -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" + } +} \ No newline at end of file