diff --git a/README.md b/README.md index 92d3cb3..6775996 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,13 @@ This repo is only a proof of concept to see how Poke will run in Astro. A lot of - [ ] Dedicated Redirect Page - [ ] Should pull from instances list (git.poketube.fun, not Codeberg) - [ ] Search + - Revamp Experience - Filters - Auto Complete + - [ ] Video Page + - [ ] Toggle: + - [ ] Audio Only + - [ ] Autoplay - [ ] User Settings - [ ] Invidious Server Selection - [ ] SafeTwitch Backend Server Selection @@ -23,12 +28,10 @@ This repo is only a proof of concept to see how Poke will run in Astro. A lot of - [ ] Video Player - [ ] Toggle: - [ ] Proxy - - [ ] Audio Only - - [ ] Autoplay - [ ] Theme - [ ] Preferred Language (For audio track on YouTube) - [ ] Custom CSS/JS - - [ ] Import/Export YouTube Subscription + - [ ] Import/Export YouTube Subscription (Use local session, no database crap) - [ ] Import/Export Poke User Settings - [x] Add Twitch Support, use [SafeTwitch Backend](https://codeberg.org/SafeTwitch/safetwitch-backend) diff --git a/src/components/Dropdown.astro b/src/components/Dropdown.astro deleted file mode 100644 index f93f30c..0000000 --- a/src/components/Dropdown.astro +++ /dev/null @@ -1,169 +0,0 @@ ---- -// Properties -const { - Icon -} = Astro.props - -// i18n -import i18next, { t } from "i18next"; -import { Trans, HeadHrefLangs } from "astro-i18next/components"; - -// Icons -import { - Menu, - Settings, - ProfileCircle, - CircleSpark, - Youtube, - OpenNewWindow, - ViewGrid, - Arcade, - InfoCircle, - PrivacyPolicy, - Code, - Language, - NavArrowLeft, - NavArrowRight, - List -} from '@iconoir/vue' - -// Check URL -if (Astro.url.pathname.startsWith('/watch')) { - var WatchPage = true -} else { - var WatchPage = false -} ---- - - -
-

{t('dropdown.Options')}

-
{t('dropdown.Language')}
- {t('dropdown.Account')} - {t('dropdown.Settings')} - {t('dropdown.Instances')} - -

{t('dropdown.Hub')}

- {t('dropdown.Apps')} - {t('dropdown.Games')} - - - {WatchPage ? -

{t('dropdown.Openin')}

- {t('dropdown.LiteMode')} - {t('dropdown.YouTube')} - {t('dropdown.Invidious')} - {t('dropdown.Pipe')} - : - null - } - -

{t('dropdown.Other')}

- {t('dropdown.About')} - {t('dropdown.Privacy')} - {t('dropdown.SourceCode')} -
-
-

{t('dropdown.Language')}

- {t("dropdown.GoBack")} - English - 日本語 -
- - - - \ No newline at end of file diff --git a/src/components/generic/Button.astro b/src/components/generic/Button.astro index 033f996..c1496c1 100644 --- a/src/components/generic/Button.astro +++ b/src/components/generic/Button.astro @@ -10,6 +10,7 @@ const { BorderColor = "#222222", BorderWidth = "1px", BorderRadius = "4px", + BackDrop, // Optionals Options Target = "_self", @@ -28,12 +29,13 @@ const { + '; border-color: ' + BorderColor + '; border-width: ' + BorderWidth + '; border-radius: ' + BorderRadius + + '; backdrop-filter: ' + BackDrop } > - \ No newline at end of file diff --git a/src/components/global/Head.astro b/src/components/global/Head.astro index e1da580..e4deaa3 100644 --- a/src/components/global/Head.astro +++ b/src/components/global/Head.astro @@ -23,13 +23,13 @@ const { // Components import { ViewTransitions } from 'astro:transitions'; -import { fade } from "astro/virtual-modules/transitions.js"; +import { slide } from "astro/virtual-modules/transitions.js"; --- - + {Title} diff --git a/src/components/global/Header.astro b/src/components/global/Header.astro index 78f1e01..8450fce 100644 --- a/src/components/global/Header.astro +++ b/src/components/global/Header.astro @@ -5,8 +5,7 @@ import { Trans, HeadHrefLangs } from "astro-i18next/components"; // Components import { Image } from 'astro:assets'; -import { actions } from "astro:actions"; -import Dropdown from '@components/Dropdown.astro' +import Button from '@components/generic/Button.astro' // Images import Poke from '@assets/poke-text.svg' @@ -17,8 +16,28 @@ import { Gamepad, Settings, Search, - Language + ProfileCircle, + CircleSpark, + Youtube, + OpenNewWindow, + ViewGrid, + Arcade, + InfoCircle, + PrivacyPolicy, + Code, + Language, + NavArrowLeft, + NavArrowRight, + List } from '@iconoir/vue' +import { Menu } from "@iconoir/vue"; + +// Check URL +if (Astro.url.pathname.startsWith('/watch')) { + var WatchPage = true +} else { + var WatchPage = false +} ---
@@ -26,15 +45,56 @@ import {
Poke Logo
-
-
- - -
- -
+
- + + +
+ +
+

{t('dropdown.Language')}

+ {t("dropdown.GoBack")} + English + 日本語
@@ -61,6 +121,117 @@ section 4, provided you include this license notice and a URL through which recipients can access the Corresponding Source. +@licend The above is the entire license notice +for the JavaScript code in this page. +*/ + +// Dismiss when the end-user clicks else where +document.body.addEventListener("click", function (evt) { + document.querySelector(".header-dropdown#primary").style.display = "none"; +}); + +// Toggle Primary Dropdown +function ToggleHeaderDropdown() { + var HeaderDropdown = document.querySelector(".header-dropdown#primary"); + if (HeaderDropdown.style.display === "flex") { + setTimeout(() => { + HeaderDropdown.style.display = "none"; + }, 0o100); + } else { + setTimeout(() => { + HeaderDropdown.style.display = "flex"; + }, 0o100); + } +} + +// Toggle Language Dropdown +function ToggleHeaderLanguageDropdown() { + var HeaderLanguageDropdown = document.querySelector(".header-dropdown#language"); + if (HeaderLanguageDropdown.style.display === "flex") { + HeaderLanguageDropdown.style.display = "none"; + } else { + HeaderLanguageDropdown.style.display = "flex"; + } +} + + + + + \ No newline at end of file diff --git a/src/pages/watch.astro b/src/pages/watch.astro index e8a8a0e..bf39404 100644 --- a/src/pages/watch.astro +++ b/src/pages/watch.astro @@ -14,15 +14,14 @@ const comments = await fetch('https://' + DEFAULT_INVIDIOUS_INSTANCE + "/api/v1/ --- -
-