From 522e9b1dd79ea8827457bca8ac3935cf81749b3e Mon Sep 17 00:00:00 2001 From: Korbs Date: Wed, 23 Oct 2024 00:16:18 -0400 Subject: [PATCH] Add pages and styles --- source/src/pages/index.astro | 16 ---------------- source/src/pages/web.astro | 31 +++++++++++++++++++++++++++++++ source/src/styles/index.scss | 15 +++++++++++++++ source/src/styles/mobile.scss | 5 +++++ 4 files changed, 51 insertions(+), 16 deletions(-) create mode 100644 source/src/pages/web.astro create mode 100644 source/src/styles/index.scss create mode 100644 source/src/styles/mobile.scss diff --git a/source/src/pages/index.astro b/source/src/pages/index.astro index 2d14107..e69de29 100644 --- a/source/src/pages/index.astro +++ b/source/src/pages/index.astro @@ -1,16 +0,0 @@ ---- - ---- - - - - - - - - Astro - - -

Astro

- - diff --git a/source/src/pages/web.astro b/source/src/pages/web.astro new file mode 100644 index 0000000..85a261a --- /dev/null +++ b/source/src/pages/web.astro @@ -0,0 +1,31 @@ +--- +// Layout +import Search from "@layouts/Search.astro"; + +// Components +import WebLink from "@components/search/WebLink.astro"; +import RelatedSearches from "@components/search/RelatedSearches.astro"; + +// Fetch +const QueryText = Astro.url.href.split("web?=").pop() +const Query = await fetch("https://4get.sudovanilla.org" + "/api/v1/web?s=" + QueryText).then((response) => response.json()); +--- + + + + {Query.web.map((query) => ( + + ))} + + + + {Query.related.map((related) => ( + {related} + ))} + + + \ No newline at end of file diff --git a/source/src/styles/index.scss b/source/src/styles/index.scss new file mode 100644 index 0000000..eb0db95 --- /dev/null +++ b/source/src/styles/index.scss @@ -0,0 +1,15 @@ +body { + margin: auto; + max-width: 1200px; + font-family: arial; + background: #e5e5e5; + padding: 0px 12px; + .disabled-items { + opacity: 0.3; + pointer-events: none; + } + ::selection { + background: gray; + color: white; + } +} \ No newline at end of file diff --git a/source/src/styles/mobile.scss b/source/src/styles/mobile.scss new file mode 100644 index 0000000..dc9137d --- /dev/null +++ b/source/src/styles/mobile.scss @@ -0,0 +1,5 @@ +@media screen and (max-width: 860px){ + .search-results { + grid-template-columns: auto !important; + } +} \ No newline at end of file