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