diff --git a/bun.lockb b/bun.lockb index 78b0c49..b7e55a3 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index bb813b2..523770e 100644 --- a/package.json +++ b/package.json @@ -25,17 +25,17 @@ "build": "astro build --config ./source/astro.mjs" }, "dependencies": { - "@astrojs/mdx": "^3.1.8", - "@astrojs/node": "^8.3.4", - "@astrojs/vue": "^4.5.2", + "@astrojs/mdx": "4.0.0-beta.2", + "@astrojs/node": "9.0.0-beta.2", + "@astrojs/vue": "5.0.0-beta.0", "@iconoir/vue": "^7.9.0", "@nurodev/astro-bun": "^1.1.5", - "astro": "^5.0.0-beta.5", + "astro": "5.0.0-beta.5", "astro-i18next": "^1.0.0-beta.21", "astro-theme-toggle": "^0.3.5", "astro-tooltips": "^0.6.2" }, "devDependencies": { - "sass": "^1.80.3" + "sass": "^1.80.4" } } \ No newline at end of file diff --git a/source/src/components/global/SearchMenu.astro b/source/src/components/global/SearchMenu.astro index c654ae2..0114213 100644 --- a/source/src/components/global/SearchMenu.astro +++ b/source/src/components/global/SearchMenu.astro @@ -1,13 +1,13 @@ --- // Properties -const {Type} = Astro.props +const {Type, QueryText} = Astro.props // Highlight Type ---
- Web - Images + Web + Images Videos News Map @@ -35,17 +35,17 @@ const {Type} = Astro.props { - ()=> { - if (Type === "Web") { - return - } else if (Type === "Images") { - return - } else if (Type === "Videos") { - return - } else if (Type === "News") { - return - } else if (Type === "Map") { - return - } + ()=> { + if (Type === "Web") { + return + } else if (Type === "Images") { + return + } else if (Type === "Videos") { + return + } else if (Type === "News") { + return + } else if (Type === "Map") { + return } - } \ No newline at end of file + } +} \ No newline at end of file diff --git a/source/src/layouts/Search.astro b/source/src/layouts/Search.astro index 66b6c11..16660f8 100644 --- a/source/src/layouts/Search.astro +++ b/source/src/layouts/Search.astro @@ -10,7 +10,7 @@ import SearchMenu from "@components/global/SearchMenu.astro" --- - +
diff --git a/source/src/pages/images.astro b/source/src/pages/images.astro new file mode 100644 index 0000000..8f1efc3 --- /dev/null +++ b/source/src/pages/images.astro @@ -0,0 +1,89 @@ +--- +// Layout +import Search from "@layouts/Search.astro"; + +// Configuration +import { + DEFAULT_API, + DEFAULT_IMAGE_PROXY +} from "@utils/GetConfig" + +// Components +import Answer from "@components/search/Answer.astro"; +import RelatedSearches from "@components/search/RelatedSearches.astro"; +import WebLink from "@components/search/WebLink.astro"; +import WebLinkSkeleton from "@components/search/WebLinkSkeleton.astro"; + +// Fetch +/// Get Query +const QueryString = Astro.url.href.split("images?=").pop() // Get user's search query from URL +const QueryText = `${QueryString}`.replaceAll("%20", " ") // Replace "%20" with a space + +/// Get Results +const Query = await fetch(DEFAULT_API + "/api/v1/images?s=" + QueryString).then((response) => response.json()); // Response + +/// Pages +const NextPage = Astro.url.href.split("?page=").pop() // Get user's search query from URL +--- + + + +
+ {Query.image.map((img) => ( + + ))} +
+
+ + JSON Response + +
+ + \ No newline at end of file diff --git a/source/src/pages/web.astro b/source/src/pages/web.astro index 38ff682..533e016 100644 --- a/source/src/pages/web.astro +++ b/source/src/pages/web.astro @@ -36,7 +36,6 @@ if (Query.related[0] === undefined) { } else { var ShowRelated = true } -console.log(NextPage) ---