From 3a55534dbbc8cb40877e23a09ec8b360108817f7 Mon Sep 17 00:00:00 2001 From: Korbs Date: Fri, 6 Sep 2024 23:45:59 -0400 Subject: [PATCH] Add Search Field --- src/search/Field.astro | 55 +++++++++++++++++++++++++ test/src/pages/index.astro | 84 +++++++++++++++++++++++++++++++++++++- 2 files changed, 137 insertions(+), 2 deletions(-) create mode 100644 src/search/Field.astro diff --git a/src/search/Field.astro b/src/search/Field.astro new file mode 100644 index 0000000..82cd280 --- /dev/null +++ b/src/search/Field.astro @@ -0,0 +1,55 @@ +--- +import { Search, ArrowRight } from "@iconoir/vue"; +--- + +
+ + + +
+ + diff --git a/test/src/pages/index.astro b/test/src/pages/index.astro index 2c702a7..f175235 100644 --- a/test/src/pages/index.astro +++ b/test/src/pages/index.astro @@ -10,6 +10,32 @@ import SidebarCreator from '../../../src/SidebarCreator.astro' import Dialog from '../../../src/Dialog.astro' import Sidebar from '../../../src/Sidebar.astro' import Video from '../../../src/VideoItem.astro' +import Category from '../../../src/Category.astro' +import SearchField from '../../../src/search/Field.astro' + +// Data +/// Fetch Categories for YouTube +const TrendingFetch = 'https://yt.sudovanilla.org' + '/api/v1/trending' +const TrendingResponse = await fetch(TrendingFetch) +const TrendingData = await TrendingResponse.json() +const TrendingSplit = TrendingData.slice(0, 1) + +const MoviesFetch = 'https://yt.sudovanilla.org' + '/api/v1/trending?type=movies' +const MoviesResponse = await fetch(MoviesFetch) +const MoviesData = await MoviesResponse.json() +const MoviesSplit = MoviesData.slice(0, 1) + + +const MusicFetch = 'https://yt.sudovanilla.org' + '/api/v1/trending?type=music' +const MusicResponse = await fetch(MusicFetch) +const MusicData = await MusicResponse.json() +const MusicSplit = MusicData.slice(0, 1) + + +const GamingFetch = 'https://yt.sudovanilla.org' + '/api/v1/trending?type=gaming' +const GamingResponse = await fetch(GamingFetch) +const GamingData = await GamingResponse.json() +const GamingSplit = GamingData.slice(0, 1) // Icons import { @@ -27,6 +53,7 @@ import { LogOut, OpenInBrowser } from '@iconoir/vue' +import { Search } from '@iconoir/vue' --- @@ -93,6 +120,14 @@ import {
+
+ +
+ +
+
+
+